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>"
}
'import requests
url = "https://api.docketqa.com/modules/create"
payload = {
"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>"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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: JSON.stringify({}),
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>'
})
};
fetch('https://api.docketqa.com/modules/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.docketqa.com/modules/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.docketqa.com/modules/create"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"steps\": [\n {\n \"step_number\": 123,\n \"type\": \"<string>\",\n \"action\": \"<string>\",\n \"use_vision\": true,\n \"test_blueprint_module_id\": 123,\n \"api_request\": {\n \"url\": \"<string>\",\n \"method\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"timeout\": 123,\n \"retries\": 123,\n \"backoff_seconds\": 123,\n \"should_refresh_page\": true\n },\n \"trigger_run_config\": {\n \"test_blueprint_id\": 123\n },\n \"assert_images_count\": 123,\n \"disable_self_healing\": true,\n \"click_count\": 123,\n \"hold_start_duration\": 123,\n \"hold_end_duration\": 123\n }\n ],\n \"test_blueprint_category_id\": 123,\n \"folder_path\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.docketqa.com/modules/create")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"steps\": [\n {\n \"step_number\": 123,\n \"type\": \"<string>\",\n \"action\": \"<string>\",\n \"use_vision\": true,\n \"test_blueprint_module_id\": 123,\n \"api_request\": {\n \"url\": \"<string>\",\n \"method\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"timeout\": 123,\n \"retries\": 123,\n \"backoff_seconds\": 123,\n \"should_refresh_page\": true\n },\n \"trigger_run_config\": {\n \"test_blueprint_id\": 123\n },\n \"assert_images_count\": 123,\n \"disable_self_healing\": true,\n \"click_count\": 123,\n \"hold_start_duration\": 123,\n \"hold_end_duration\": 123\n }\n ],\n \"test_blueprint_category_id\": 123,\n \"folder_path\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.docketqa.com/modules/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"steps\": [\n {\n \"step_number\": 123,\n \"type\": \"<string>\",\n \"action\": \"<string>\",\n \"use_vision\": true,\n \"test_blueprint_module_id\": 123,\n \"api_request\": {\n \"url\": \"<string>\",\n \"method\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"timeout\": 123,\n \"retries\": 123,\n \"backoff_seconds\": 123,\n \"should_refresh_page\": true\n },\n \"trigger_run_config\": {\n \"test_blueprint_id\": 123\n },\n \"assert_images_count\": 123,\n \"disable_self_healing\": true,\n \"click_count\": 123,\n \"hold_start_duration\": 123,\n \"hold_end_duration\": 123\n }\n ],\n \"test_blueprint_category_id\": 123,\n \"folder_path\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"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>"
}
}Modules
Create Module
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>"
}
'import requests
url = "https://api.docketqa.com/modules/create"
payload = {
"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>"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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: JSON.stringify({}),
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>'
})
};
fetch('https://api.docketqa.com/modules/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.docketqa.com/modules/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.docketqa.com/modules/create"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"steps\": [\n {\n \"step_number\": 123,\n \"type\": \"<string>\",\n \"action\": \"<string>\",\n \"use_vision\": true,\n \"test_blueprint_module_id\": 123,\n \"api_request\": {\n \"url\": \"<string>\",\n \"method\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"timeout\": 123,\n \"retries\": 123,\n \"backoff_seconds\": 123,\n \"should_refresh_page\": true\n },\n \"trigger_run_config\": {\n \"test_blueprint_id\": 123\n },\n \"assert_images_count\": 123,\n \"disable_self_healing\": true,\n \"click_count\": 123,\n \"hold_start_duration\": 123,\n \"hold_end_duration\": 123\n }\n ],\n \"test_blueprint_category_id\": 123,\n \"folder_path\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.docketqa.com/modules/create")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"steps\": [\n {\n \"step_number\": 123,\n \"type\": \"<string>\",\n \"action\": \"<string>\",\n \"use_vision\": true,\n \"test_blueprint_module_id\": 123,\n \"api_request\": {\n \"url\": \"<string>\",\n \"method\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"timeout\": 123,\n \"retries\": 123,\n \"backoff_seconds\": 123,\n \"should_refresh_page\": true\n },\n \"trigger_run_config\": {\n \"test_blueprint_id\": 123\n },\n \"assert_images_count\": 123,\n \"disable_self_healing\": true,\n \"click_count\": 123,\n \"hold_start_duration\": 123,\n \"hold_end_duration\": 123\n }\n ],\n \"test_blueprint_category_id\": 123,\n \"folder_path\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.docketqa.com/modules/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"steps\": [\n {\n \"step_number\": 123,\n \"type\": \"<string>\",\n \"action\": \"<string>\",\n \"use_vision\": true,\n \"test_blueprint_module_id\": 123,\n \"api_request\": {\n \"url\": \"<string>\",\n \"method\": \"<string>\",\n \"headers\": {},\n \"body\": {},\n \"timeout\": 123,\n \"retries\": 123,\n \"backoff_seconds\": 123,\n \"should_refresh_page\": true\n },\n \"trigger_run_config\": {\n \"test_blueprint_id\": 123\n },\n \"assert_images_count\": 123,\n \"disable_self_healing\": true,\n \"click_count\": 123,\n \"hold_start_duration\": 123,\n \"hold_end_duration\": 123\n }\n ],\n \"test_blueprint_category_id\": 123,\n \"folder_path\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"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
string
required
The name of the module. Must be between 1 and 128 characters and unique within your account.
object[]
required
An ordered list of steps for the module.
Show Step object properties
Show Step object properties
integer
required
The position of this step in the sequence (starting from 1). Must be unique within the module.
string
required
The step type. Available types:AI steps:
"act"— an AI-driven browser action (e.g. click, type, navigate). Action text must not be empty."assert"— an AI-driven assertion that verifies something on the page.
"step_module"— execute another module (nested). Requirestest_blueprint_module_id."trigger_run"— trigger another test as a sub-run. Requirestrigger_run_config.
"api"— make an HTTP request. Requiresapi_request.
"key"— press a keyboard key."type"— type text into the focused element."mouse_move"— move the mouse to coordinates."left_click"— left click at coordinates."left_click_drag"— click and drag from one point to another."right_click"— right click at coordinates."double_click"— double click at coordinates."triple_click"— triple click at coordinates."scroll"— scroll the page."wait"— wait for a duration.
"deeplink"— open a deep link URL. Only executed when the module runs on an iOS or Android worker; ignored on browser workers.
The legacy
"module" type is not allowed. Use "step_module" for nested modules.string
required
A natural language instruction describing what the step should do. For recorded steps, this contains the coordinates or key data. For
api steps, this can be left empty.boolean
Whether to enable vision (screenshot analysis) for this step. Defaults to
false.integer
The ID of the module to execute. Required when
type is "step_module".object
The HTTP request configuration. Required for steps with
type: "api".Show API request properties
Show API request properties
string
required
The full URL to send the request to.
string
required
The HTTP method (e.g.
"GET", "POST", "PUT", "DELETE").object
Key-value pairs for request headers.
object
The request body (for POST, PUT, PATCH requests).
integer
Request timeout in seconds. Defaults to
60.integer
Number of retries on failure. Defaults to
1.number
Delay between retries in seconds. Defaults to
2.5.boolean
Whether to refresh the browser page after the API call. Defaults to
false.object
Configuration for triggering another test. Required when
type is "trigger_run".Show Trigger run config properties
Show Trigger run config properties
integer
required
The ID of the test blueprint to trigger as a sub-run.
integer
Number of screenshot images to capture for assertion steps. Defaults to
5.boolean
Disable automatic self-healing for this step. Defaults to
false.integer
Number of clicks to perform for click-type steps. Defaults to
1.number
Duration in seconds to hold before the action. Defaults to
0.number
Duration in seconds to hold after the action. Defaults to
0.integer
The ID of the test suite this module belongs to.
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
string
A confirmation message (e.g.
"Test blueprint created successfully").object
The created module object.
Show Properties
Show Properties
integer
The unique ID of the module.
string
The module name.
string
Always
"step_module" for modules.string
The module status (e.g.
"active").integer
Your company ID.
integer
The test suite ID, if set.
string
The folder path of the module.
object[]
The list of module steps with generated IDs.
Show Step response properties
Show Step response properties
integer
The unique step ID.
integer
Position of this step in the sequence.
string
The step type (see step types for all values).
string
The step instruction.
boolean
Whether vision is enabled for this step.
integer
The referenced module ID (for
step_module steps).object
The API request configuration (for
api steps).object
The trigger run configuration (for
trigger_run steps).boolean
Whether self-healing is disabled.
integer
Number of clicks for this step.
number
Hold duration before the action.
number
Hold duration after the action.
integer
Number of assertion images captured.
integer[]
IDs of files attached to this step.
integer
Number of tests using this module (always
0 for newly created modules).object[]
Tests referencing this module (empty for new modules).
string
ISO 8601 timestamp of when the module was created.
string
ISO 8601 timestamp of the last update.
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"
}
}
⌘I

