Skip to main content
POST
/
modules
/
create
Create Module
curl --request POST \
  --url https://api.docketqa.com/modules/create \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "title": "<string>",
  "steps": [
    {
      "step_number": 123,
      "type": "<string>",
      "action": "<string>",
      "use_vision": true,
      "test_blueprint_module_id": 123,
      "api_request": {
        "url": "<string>",
        "method": "<string>",
        "headers": {},
        "body": {},
        "timeout": 123,
        "retries": 123,
        "backoff_seconds": 123,
        "should_refresh_page": true
      },
      "trigger_run_config": {
        "test_blueprint_id": 123
      },
      "assert_images_count": 123,
      "disable_self_healing": true,
      "click_count": 123,
      "hold_start_duration": 123,
      "hold_end_duration": 123
    }
  ],
  "test_blueprint_category_id": 123,
  "folder_path": "<string>"
}
'
{
  "message": "<string>",
  "test_blueprint": {
    "id": 123,
    "title": "<string>",
    "type": "<string>",
    "status": "<string>",
    "company_id": 123,
    "test_blueprint_category_id": 123,
    "folder_path": "<string>",
    "steps": [
      {
        "id": 123,
        "step_number": 123,
        "type": "<string>",
        "action": "<string>",
        "use_vision": true,
        "test_blueprint_module_id": 123,
        "api_request": {},
        "trigger_run_config": {},
        "disable_self_healing": true,
        "click_count": 123,
        "hold_start_duration": 123,
        "hold_end_duration": 123,
        "assert_images_count": 123,
        "attached_file_ids": [
          123
        ]
      }
    ],
    "usage_count": 123,
    "test_blueprints_using_module": [
      {}
    ],
    "created_at": "<string>",
    "updated_at": "<string>"
  }
}
Create a reusable module that can be shared across multiple tests. A single module is reusable across every browser viewport, iOS device, and Android device. Modules support all step types including AI steps, assertions, API steps, recorded steps, and nested modules.

Request body

title
string
required
The name of the module. Must be between 1 and 128 characters and unique within your account.
steps
object[]
required
An ordered list of steps for the module.
test_blueprint_category_id
integer
The ID of the test suite this module belongs to.
folder_path
string
The folder path for organizing the module. Defaults to "/".

Example request body

{
  "title": "Login Setup Module",
  "steps": [
    {
      "step_number": 1,
      "type": "act",
      "action": "Navigate to the login page",
      "use_vision": false
    },
    {
      "step_number": 2,
      "type": "api",
      "action": "",
      "api_request": {
        "url": "https://api.example.com/auth/token",
        "method": "POST",
        "headers": {},
        "body": {
          "username": "testuser",
          "password": "testpass"
        },
        "timeout": 60,
        "retries": 1,
        "backoff_seconds": 2.5,
        "should_refresh_page": false
      }
    },
    {
      "step_number": 3,
      "type": "assert",
      "action": "Verify the auth token was returned",
      "use_vision": false
    }
  ]
}

Response

message
string
A confirmation message (e.g. "Test blueprint created successfully").
test_blueprint
object
The created module object.

Example response

{
  "message": "Test blueprint created successfully",
  "test_blueprint": {
    "id": 964,
    "title": "Login Setup Module",
    "type": "step_module",
    "status": "active",
    "company_id": 23,
    "test_blueprint_category_id": null,
    "folder_path": "/",
    "usage_count": 0,
    "test_blueprints_using_module": [],
    "steps": [
      {
        "id": 23103,
        "step_number": 1,
        "type": "act",
        "action": "Navigate to the login page",
        "use_vision": false,
        "test_blueprint_module_id": null,
        "api_request": null,
        "trigger_run_config": null,
        "disable_self_healing": false,
        "click_count": 1
      },
      {
        "id": 23104,
        "step_number": 2,
        "type": "api",
        "action": "",
        "use_vision": false,
        "test_blueprint_module_id": null,
        "api_request": {
          "url": "https://api.example.com/auth/token",
          "method": "POST",
          "headers": {},
          "body": { "username": "testuser", "password": "testpass" },
          "timeout": 60,
          "retries": 1,
          "backoff_seconds": 2.5,
          "should_refresh_page": false
        },
        "trigger_run_config": null,
        "disable_self_healing": false,
        "click_count": 1
      },
      {
        "id": 23105,
        "step_number": 3,
        "type": "assert",
        "action": "Verify the auth token was returned",
        "use_vision": false,
        "test_blueprint_module_id": null,
        "api_request": null,
        "trigger_run_config": null,
        "disable_self_healing": false,
        "click_count": 1
      }
    ],
    "created_at": "2025-12-13T18:58:45.895773+00:00",
    "updated_at": "2025-12-13T18:58:45.895781+00:00"
  }
}