SmoothDeploy Docs
API Reference

Steps

Read, edit, and reorder the steps in a test's working revision using the SmoothDeploy API. Step actions use the tests scope; editing requires tests:update.

Steps make up a test's working revision. The actions on this page read and rearrange a single test's steps. To work on reusable steps shared across tests, see Shared Steps.

Steps are authorized through the tests scope: reading uses tests:read; editing uses tests:update together with tests:read, except steps.promote-screenshot, which needs tests:update only, and step-files.upload-urls, which needs tests:create or tests:update. See Authentication and Scopes.

GET actions take their inputs as query parameters; all other actions take a JSON body. All actions require x-project-id and resolve the branch from x-branch-id (or the project default branch if the header is omitted). Actions that change data require an active subscription and otherwise return 403 { "error": "LICENSE_REQUIRED" }; GET actions do not.

Step IDs on this page are revision-step IDs: the revisionStepId value returned by steps.list.


List Test Steps

GET /v1/actions/steps.list

Scope: tests:read

Returns the full step tree for the test's working revision on the active branch, including group children.

Query Parameters

ParameterTypeRequiredNotes
testIdUUIDyesThe test to read.
revisionIdUUIDnoLoad steps from a specific snapshot revision instead of the working revision.

Response

{
  "data": {
    "steps": [
      {
        "id": "step-uuid",
        "name": "Navigate to login",
        "action": { "name": "navigate", "url": "https://app.example.com/login", "signals": [] },
        "order": 0,
        "group": false,
        "shared": false,
        "children": []
      }
    ]
  }
}

Returns 404 if the test does not exist in the project.


Get a Step

GET /v1/actions/steps.get

Scope: tests:read

Returns a single step from the test's working revision. If the step is a group, its children are included.

Query Parameters

ParameterTypeRequiredNotes
testIdUUIDyesThe test the step belongs to.
stepIdstringyesThe revision-step ID.

Response

{
  "data": {
    "step": {
      "id": "step-uuid",
      "name": "Fill username",
      "action": { "name": "fill", "selector": "#username", "text": "admin", "signals": [] },
      "group": false,
      "shared": false
    },
    "children": []
  }
}

Status Codes

StatusMeaning
200Step found
404Test or step not found

Get Upload URLs

POST /v1/actions/step-files.upload-urls

Scope: tests:create or tests:update

Step files and screenshots are never sent inside a save request. To attach one:

  1. Call this action with one entry per file.
  2. PUT the raw bytes to each returned uploadUrl within 15 minutes. Files over 32 MB come back with partSize and parts instead of uploadUrl: PUT bytes [(partNumber - 1) * partSize, partNumber * partSize) to each part's uploadUrl. Parts upload in any order and in parallel.
  3. Within 6 hours, pass the returned uploadToken values in the uploads field of tests.create, tests.update, steps.create, steps.update, steps.update-children or shared-steps.update.

Body

FieldRequiredNotes
filesyes, unless parts1 to 1,000 items: { "stepId": UUID, "filename": string, "kind": "file" | "screenshot" | "screenshot-element", "size": integer }. filename is the name in the setInputFiles action, without a path. Files are stored as application/octet-stream downloads and screenshots as image/png. size is the byte count, up to 200 MB.
partsinstead of files1 to 1,000 items: { "uploadToken": string, "partNumbers": integer[] }. Returns fresh part URLs for a multipart uploadToken that is still valid, for example after a part URL expired or a save answered 409 with parts.

Response

{
  "data": [
    { "stepId": "step-uuid", "filename": "upload.pdf", "kind": "file", "uploadUrl": "https://...", "uploadToken": "..." },
    { "stepId": "step-uuid", "filename": "video.mp4", "kind": "file", "uploadToken": "...", "partSize": 16777216, "parts": [ { "partNumber": 1, "uploadUrl": "https://..." } ] }
  ]
}

With parts, data holds one { "parts": [ { "partNumber": 1, "uploadUrl": "https://..." } ] } per request item, in order.

Save Errors

StatusErrorMeaning
400invalid_upload_tokenA token is malformed, changed, issued for another project, or names a step or file that is not in this save.
409uploads_missingSome files were not uploaded, do not match their declared size, were replaced during the save, or their token expired. details.files lists them; an entry with parts names the missing parts of a multipart upload: upload only those (same token, URLs from parts) and retry. An entry without parts needs a new upload.
413upload_too_largeAn uploaded file is larger than its declared size.

A failed save changes nothing. A retry with the same tokens works while they are valid.


Create Steps

POST /v1/actions/steps.create

Scope: tests:read and tests:update

Adds steps to the test's working revision, at the root or inside a group. Each action is one built-in action, picked by name. The request schema in the OpenAPI document lists every action and its fields. Optional fields you omit get their defaults.

Body

FieldRequiredNotes
testIdyesUUID of the test.
stepsyesAt least 1 item: { "action": object, "id", "name", "metadata", "condition", "frame" (all optional) }. name defaults to the action name in title case. A step without frame reuses the previous step's page. Set id (UUID) to choose the step ID in advance, so you can request upload URLs for it.
parentRevisionStepIdnorevisionStepId of the group to add into, from steps.list. Omit for the top level.
afterRevisionStepIdnorevisionStepId of a step in the same level to insert after. Omit to append.
uploadsnoUp to 10,000 uploadToken values from step-files.upload-urls.

Response

{ "data": { "steps": [ { "id": "step-uuid", "revisionStepId": "rev-step-uuid", "name": "Click Save", "action": { "name": "click", "selector": "internal:role=button[name=\"Save\"i]", "signals": [], "button": "left", "modifiers": 0, "clickCount": 1 } } ] } }

data.steps is the level that was edited after the change: the top-level steps, or the children of the group. Steps have the same shape as in steps.list.

Adding into a shared group changes that group in every test that uses it.

Status Codes

StatusMeaning
200Created
400An action fails validation, or the parent is not a group
404Test, parent group, or afterRevisionStepId step not found

Update a Step

PUT /v1/actions/steps.update

Scope: tests:read and tests:update

Patches one step of the test's working revision. Fields you omit keep their value; action replaces the whole action. Editing a step inside a shared group changes it in every test that uses the group.

Body

FieldRequiredNotes
testIdyesUUID of the test.
revisionStepIdyesrevisionStepId of the step, from steps.list.
name, action, metadata, condition, framenoNew values.
uploadsnoUp to 10,000 uploadToken values from step-files.upload-urls.

Response

Same as steps.create. Returns 400 when no field to change is given, when action fails validation, or when it would turn a group into a non-group step or back. Returns 404 when the test or step is not found.


Delete Steps

DELETE /v1/actions/steps.delete

Scope: tests:read and tests:update

Removes steps from the test's working revision. All revisionStepIds must be siblings in one level. A shared step is unlinked from the test; the shared step itself and its other uses stay.

Body

FieldRequiredNotes
testIdyesUUID of the test.
revisionStepIdsyesAt least 1 revisionStepId, from steps.list. Deleting a group deletes its children.

Response

Same as steps.create. Returns 400 when the IDs are not siblings and 404 when the test or a step is not found.


Group Steps

POST /v1/actions/steps.group

Scope: tests:read and tests:update

Wraps steps of the test's working revision into a new group step. The group takes the position of the earliest selected step, and the steps keep their relative order inside it.

Body

FieldRequiredNotes
testIdyesUUID of the test.
groupNameyesName of the new group. At least 1 character.
stepsyesAt least 2 items: { "revisionStepId": UUID, "frame": object (optional) }.
parentGroupRevisionStepIdnoUUID of an existing group to create the new group in. Omit or null for the root.

Response

{
  "data": {
    "id": "group-step-uuid",
    "name": "Log in",
    "group": true
  }
}

The data object is the new group step row with name set to groupName.


Move Steps

POST /v1/actions/steps.move

Scope: tests:read and tests:update

Moves steps into a group, or to the root of the test when targetGroupId is null.

Body

FieldRequiredNotes
testIdyesUUID of the test.
stepIdsyesArray of at least 1 step UUID to move.
targetGroupIdyesUUID of the destination group, or null for the root.

Response

{ "data": { "success": true } }

Status Codes

StatusMeaning
200Moved
400A group cannot be moved into itself, or a shared group into a group of another test
404Test, target group, or one or more steps not found

Promote a Screenshot

POST /v1/actions/steps.promote-screenshot

Scope: tests:update

Promotes a screenshot captured during a run to the stored baseline of a step.

Body

FieldRequiredNotes
testIdyesUUID of the test.
revisionStepIdyesThe revision-step ID of the step.
runIdyesUUID of the run that captured the screenshot.
typeyespage or element.

Response

{ "data": { "success": true, "contentStepId": "step-uuid" } }

Returns 404 if the run, the step, or the screenshot within the run is not found.


Remove a Baseline

POST /v1/actions/steps.remove-baseline

Scope: tests:update

Removes the stored baseline screenshots (page and element) of a step. The next run fills them again.

Body

FieldRequiredNotes
testIdyesUUID of the test.
revisionStepIdyesThe revision-step ID of the step.

Response

{ "data": { "success": true, "contentStepId": "step-uuid" } }

Returns 404 if the test or the step is not found.


Share a Step

PUT /v1/actions/steps.share

Scope: tests:read and tests:update

Marks a step of a test as shared (reusable across tests) or unshared.

Body

FieldRequiredNotes
testIdyesUUID of the test.
revisionStepIdyesThe revision-step ID of the step.
sharedyestrue to share, false to unshare.

Response

{
  "data": {
    "id": "step-uuid",
    "name": "Log in as admin",
    "shared": true
  }
}

The data object is the step record with shared set to the new value.


Update a Group Step's Children

PUT /v1/actions/steps.update-children

Scope: tests:read and tests:update

Replaces the children of a group step with the provided array. Steps with a matching revisionStepId are updated in place; steps without one are created; steps in the existing group that are not in the submitted array are deleted.

Body

FieldRequiredNotes
stepIdyesUUID of the group's revision step.
childrenyesArray of child step objects. Each item requires id (UUID) and may include name, action, metadata, condition, order, frame, group, shared, and revisionStepId (UUID).
uploadsnoUp to 10,000 uploadToken values from step-files.upload-urls.

Response

{
  "data": {
    "step": { "id": "step-uuid", "name": "Log in as admin" },
    "children": [
      { "id": "child-uuid", "name": "Go to login page", "order": 0 }
    ]
  }
}

Returns 400 when a child's action fails validation and 404 when the group is not found.