Skip to main content
POST
/
test_blueprint
/
create
Create Test
curl --request POST \
  --url https://api.docketqa.com/test_blueprint/create \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "title": "<string>",
  "type": "<string>",
  "test_blueprint_category_id": 123,
  "starting_url": "<string>",
  "steps": [
    {
      "step_number": 123,
      "type": "<string>",
      "action": "<string>"
    }
  ]
}
'
{
  "message": "<string>",
  "test_blueprint": {
    "id": 123,
    "company_id": 123,
    "title": "<string>",
    "type": "<string>",
    "starting_url": "<string>",
    "starting_prompt": "<string>",
    "test_blueprint_category_id": 123,
    "steps": [
      {}
    ],
    "created_by": 123,
    "created_at": "<string>",
    "updated_at": "<string>"
  }
}
Create a new test blueprint with a title, starting URL, and a sequence of steps.
title
string
required
The name of the test.
type
string
required
The test type. Must be "integration".
test_blueprint_category_id
integer
The ID of the test suite (folder) this test belongs to. You can find this ID in the Docket dashboard URL when on the Test Suites Tab.
starting_url
string
required
The URL the browser navigates to before executing steps.
steps
object[]
required
An ordered list of steps for the test to execute.

Example request body

{
  "title": "Login Flow",
  "type": "integration",
  "test_blueprint_category_id": 12,
  "starting_url": "https://example.com/login",
  "steps": [
    {
      "step_number": 1,
      "type": "act",
      "action": "Enter 'user@example.com' in the email field"
    },
    {
      "step_number": 2,
      "type": "act",
      "action": "Enter 'password123' in the password field"
    },
    {
      "step_number": 3,
      "type": "act",
      "action": "Click the 'Log In' button"
    },
    {
      "step_number": 4,
      "type": "assert",
      "action": "Verify user is redirected to the dashboard page"
    },
    {
      "step_number": 5,
      "type": "assert",
      "action": "Verify the welcome message displays the user's name"
    }
  ]
}
message
string
A confirmation message (e.g. "Test blueprint created successfully").
test_blueprint
object
The created test blueprint object.

Example response

{
  "message": "Test blueprint created successfully",
  "test_blueprint": {
    "company_id": 2,
    "created_at": "2025-07-03T01:45:55.486917+00:00",
    "created_by": 4,
    "id": 181,
    "starting_prompt": null,
    "starting_url": "https://example.com/login",
    "steps": [
      {
        "action": "Enter 'user@example.com' in the email field",
        "id": 564,
        "step_number": 1,
        "test_blueprint_id": 181,
        "type": "act",
        "use_vision": false
      },
      {
        "action": "Enter 'password123' in the password field",
        "id": 565,
        "step_number": 2,
        "test_blueprint_id": 181,
        "type": "act",
        "use_vision": false
      },
      {
        "action": "Click the 'Log In' button",
        "id": 566,
        "step_number": 3,
        "test_blueprint_id": 181,
        "type": "act",
        "use_vision": false
      },
      {
        "action": "Verify user is redirected to the dashboard page",
        "id": 567,
        "step_number": 4,
        "test_blueprint_id": 181,
        "type": "assert",
        "use_vision": false
      },
      {
        "action": "Verify the welcome message displays the user's name",
        "id": 568,
        "step_number": 5,
        "test_blueprint_id": 181,
        "type": "assert",
        "use_vision": false
      }
    ],
    "test_blueprint_category_id": 4,
    "title": "Login Flow",
    "type": "integration",
    "updated_at": "2025-07-03T01:45:55.486923+00:00"
  }
}