Stack Moxie How To: Test API
Use these calls to define test Scenarios, Run them, and retrieve their results.
Use these calls to define test Scenarios, Run them, and retrieve their results.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/stack-moxie:stack-moxie-how-to-test-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
description: 'Stack Moxie is a QA Automation platform for Marketing, Sales, and Enterprise
Business technologists.
This REST API can be used by developers like you to further automate, extend,
and integrate quality into the workflows that matter most to you.
Don''t have an account? Sign up here.
# Authentication
The Stack Moxie REST API uses HTTP Bearer Authentication, in the form of a
JWT token, across all endpoints for authentication. You can manage your API
tokens on your account settings page.'
title: 'Stack Moxie REST How To: Test API'
x-logo:
url: https://app.stackmoxie.com/api/logo.png
altText": Stack Moxie Logo
servers:
- url: https://app.stackmoxie.com/api/
security:
- jwtBearerAuth: []
tags:
- name: 'How To: Test'
description: Use these calls to define test Scenarios, Run them, and retrieve their results.
paths:
/v1/organizations/{org}/scenarios:
get:
summary: List Scenarios
description: Retrieve the list of test Scenarios for the given Organization.
tags:
- 'How To: Test'
parameters:
- $ref: '#/components/parameters/OrgPathParam'
responses:
'200':
description: Returns a list of the Organization's test Scenarios.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Scenario'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
operationId: getV1OrganizationsByOrgScenarios
x-operation-id-source: derived
post:
summary: Create a Scenario
description: Creates a test Scenario for the given Organization.
tags:
- 'How To: Test'
parameters:
- $ref: '#/components/parameters/OrgPathParam'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Scenario'
responses:
'200':
description: Returns the test Scenario just created.
content:
application/json:
schema:
$ref: '#/components/schemas/Scenario'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
description: Returned if the provided scenario definition is malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: postV1OrganizationsByOrgScenarios
x-operation-id-source: derived
/v1/organizations/{org}/scenarios/{id}:
get:
summary: Get a Scenario
description: Retrieves an individual test Scenario by ID.
tags:
- 'How To: Test'
parameters:
- $ref: '#/components/parameters/OrgPathParam'
- name: id
in: path
description: The Scenario's ID.
required: true
schema:
type: integer
responses:
'200':
description: Returns the test Scenario.
content:
application/json:
schema:
$ref: '#/components/schemas/Scenario'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
operationId: getV1OrganizationsByOrgScenariosById
x-operation-id-source: derived
patch:
summary: Update a Scenario
description: Updates an individual test Scenario by ID.
tags:
- 'How To: Test'
parameters:
- $ref: '#/components/parameters/OrgPathParam'
- name: id
in: path
description: The Scenario's ID.
required: true
schema:
type: integer
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Scenario'
responses:
'200':
description: Returns the updated test Scenario.
content:
application/json:
schema:
$ref: '#/components/schemas/Scenario'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'422':
description: Returned if the provided scenario definition is malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: patchV1OrganizationsByOrgScenariosById
x-operation-id-source: derived
delete:
summary: Delete a Scenario
description: Deletes an individual test scenario by ID.
tags:
- 'How To: Test'
parameters:
- $ref: '#/components/parameters/OrgPathParam'
- name: id
in: path
description: The Scenario's ID.
required: true
schema:
type: integer
responses:
'204':
description: Scenario successfully deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
operationId: deleteV1OrganizationsByOrgScenariosById
x-operation-id-source: derived
/v1/organizations/{org}/asyncScenario:
post:
summary: Create an Async Scenario
description: Creates a Scenario Asynchronously.
tags:
- 'How To: Test'
parameters:
- $ref: '#/components/parameters/OrgPathParam'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Scenario'
responses:
'200':
description: Returns an async job.
content:
application/json:
schema:
type: object
properties:
jobId:
type: string
format: uuid
'400':
description: Returned if the provided scenario definition does not match async requirements.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
operationId: postV1OrganizationsByOrgAsyncScenario
x-operation-id-source: derived
/v1/organizations/{org}/job/{jobId}:
get:
summary: Get Async Job Status
description: Retrieves the status of an async job, including the created scenario if finished.
tags:
- 'How To: Test'
parameters:
- $ref: '#/components/parameters/OrgPathParam'
- name: jobId
in: path
description: This Job's UUID.
required: true
schema:
type: string
format: uuid
responses:
'200':
description: Returns the job status, including the created scenario if finished.
content:
application/json:
schema:
$ref: '#/components/schemas/Job'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
operationId: getV1OrganizationsByOrgJobByJobId
x-operation-id-source: derived
/v1/organizations/{org}/scenarios/allTemplates:
get:
summary: List Templates
description: Retrieve the list of all Template Scenarios for the given Organization.
tags:
- 'How To: Test'
parameters:
- $ref: '#/components/parameters/OrgPathParam'
responses:
'200':
description: Returns a list of the Organization's Template Scenarios.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Scenario'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
operationId: getV1OrganizationsByOrgScenariosAllTemplates
x-operation-id-source: derived
/v1/organizations/{org}/scenarios/linkableTemplates:
get:
summary: List Linkable Templates
description: Retrieve the list of all Linkable Template Scenarios for the given Organization.
tags:
- 'How To: Test'
parameters:
- $ref: '#/components/parameters/OrgPathParam'
responses:
'200':
description: Returns a list of the Organization's Linkable Template Scenarios.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Scenario'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
operationId: getV1OrganizationsByOrgScenariosLinkableTemplates
x-operation-id-source: derived
/v1/organizations/{org}/scenarios/exposedTemplates:
get:
summary: List Exposed Templates
description: Retrieve the list of all Template Scenarios that are exposed to external APIs.
tags:
- 'How To: Test'
parameters:
- $ref: '#/components/parameters/OrgPathParam'
responses:
'200':
description: Returns a list of all Template Scenarios that are exposed to external APIs.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Scenario'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
operationId: getV1OrganizationsByOrgScenariosExposedTemplates
x-operation-id-source: derived
/v1/organizations/{org}/scenarios/{id}/runs:
get:
summary: List Scenario Runs
description: Retrieves a list of Runs for the given Scenario ID.
tags:
- 'How To: Test'
parameters:
- $ref: '#/components/parameters/OrgPathParam'
- name: id
in: path
description: Scenario's ID.
required: true
schema:
type: integer
- $ref: '#/components/parameters/PageQueryParam'
- $ref: '#/components/parameters/OutcomeQueryParam'
- $ref: '#/components/parameters/RanAfterQueryParam'
- $ref: '#/components/parameters/RanBeforeQueryParam'
responses:
'200':
description: Returns a list of the Scenario's Runs.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Run'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
operationId: getV1OrganizationsByOrgScenariosByIdRuns
x-operation-id-source: derived
post:
summary: Create a Scenario Run
description: Creates a Run for the given scenario given an optional set of token replacements.
tags:
- 'How To: Test'
parameters:
- $ref: '#/components/parameters/OrgPathParam'
- name: id
in: path
description: Scenario's ID.
required: true
schema:
type: integer
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
tokens:
type: object
notify:
type: string
enum:
- me
- team
default: me
description: 'Determines who receives notifications. The default `me` means notifications are only sent to the authenticated user initiating the run creation request, while `team` will send to any associated Notification Group(s) or the Organization''s global notification alias.
'
responses:
'200':
description: Returns the Run just created.
content:
application/json:
schema:
$ref: '#/components/schemas/Run'
'400':
description: Returns when notify value is invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
operationId: postV1OrganizationsByOrgScenariosByIdRuns
x-operation-id-source: derived
/v1/organizations/{org}/scenarios/{scenarioId}/runs/{id}:
get:
summary: Get a Scenario Run
description: Retrieves an individual Run by its ID.
tags:
- 'How To: Test'
parameters:
- $ref: '#/components/parameters/OrgPathParam'
- name: scenarioId
in: path
description: Scenario's ID.
required: true
schema:
type: integer
- name: id
in: path
description: Run's ID.
required: true
schema:
type: integer
responses:
'200':
description: Returns the Run.
content:
application/json:
schema:
$ref: '#/components/schemas/Run'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
operationId: getV1OrganizationsByOrgScenariosByScenarioIdRunsById
x-operation-id-source: derived
/v1/organizations/{org}/scenarios/{scenarioId}/mostRecentRun:
get:
summary: Get a Scenario's Most Recent Run
description: Retrieves the most recent Run of the given Scenario.
tags:
- 'How To: Test'
parameters:
- $ref: '#/components/parameters/OrgPathParam'
- name: scenarioId
in: path
description: Scenario's ID.
required: true
schema:
type: integer
responses:
'200':
description: Returns the Run.
content:
application/json:
schema:
$ref: '#/components/schemas/Run'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
operationId: getV1OrganizationsByOrgScenariosByScenarioIdMostRecentRun
x-operation-id-source: derived
/v1/organizations/{org}/scenarios/{scenarioId}/runs/{runId}/log/{id}:
get:
summary: Get a Scenario Run Log
description: Retrieves an individual Run Log given its ID.
tags:
- 'How To: Test'
parameters:
- $ref: '#/components/parameters/OrgPathParam'
- name: scenarioId
in: path
description: Scenario's ID.
required: true
schema:
type: integer
- name: runId
in: path
description: Run's ID.
required: true
schema:
type: integer
- name: id
in: path
description: Run Log's ID.
required: true
schema:
type: integer
responses:
'200':
description: Returns the Run Log.
content:
application/json:
schema:
$ref: '#/components/schemas/RunLog'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
operationId: getV1OrganizationsByOrgScenariosByScenarioIdRunsByRunIdLogById
x-operation-id-source: derived
components:
schemas:
Job:
description: The status of the job that is running asynchronously.
type: object
properties:
createdAt:
type: integer
readOnly: true
description: Unix timestamp (ms) of this Job's creation.
updatedAt:
type: integer
readOnly: true
description: Unix timestamp (ms) of this Job's last update.
id:
type: integer
readOnly: true
description: A numeric identifier for this Job.
jobId:
type: string
format: uuid
description: UUID of the job that is running.
status:
type: string
readOnly: true
description: Status of the job.
enum:
- Processing
- Complete
- Failed
type:
type: string
readOnnly: true
description: The type of async Job.
enum:
- Scenario
data:
type: string
readOnly: true
description: JSON string containing all data from the job.
Scenario:
required:
- definition
- name
type: object
properties:
name:
type: string
description: The name of the Scenario.
description:
type: string
description: A brief description of the Scenario.
definition:
$ref: '#/components/schemas/ScenarioDefinition'
type:
type: string
description: The type of scenario. Determines how the scenario will be used and how it is handled in the UI.
enum:
- default
- template
- from-template
severity:
type: integer
description: Issue severity status of the scenario, 1 being the most severe and 4 being the least.
enum:
- 1
- 2
- 3
- 4
dashboardSetting:
type: string
description: Value that indicates whether to include this scenario in the Status Dashboard or not.
enum:
- default
- include
- exclude
feature:
description: The ID or Folder object under which this Scenario lives (if any).
oneOf:
- type: integer
- $ref: '#/components/schemas/Folder'
schedule:
description: The ID or Schedule object associated with this Scenario (if any).
oneOf:
- type: integer
- $ref: '#/components/schemas/Folder'
notificationGroups:
description: The Notification Groups that will be notified for scenario run results.
type:
- array
- 'null'
items:
type: object
$ref: '#/components/schemas/NotificationGroup'
instructions:
type: string
description: For templates only. Additional guidelines on how to work with this scenarios.
exposedToApis:
type: boolean
description: For templates only. Value that indicates whether to include this scenario when querying the exposedTemplates endpoint.
isLinkable:
type: boolean
description: For templates only. Indicates whether this scenario can be chained onto other scenarios.
uuid:
type: string
format: uuid
readOnly: true
description: An identifier for this Scenario in the form of a UUID.
id:
type: integer
readOnly: true
description: A numeric identifier for this Scenario.
createdAt:
type: integer
readOnly: true
description: Unix timestamp (ms) of this Scenario's creation.
updatedAt:
type: integer
readOnly: true
description: Unix timestamp (ms) of this Scenario's last update.
createdBy:
readOnly: true
oneOf:
- type: integer
- $ref: '#/components/schemas/User'
description: The ID or User object who created this Scenario.
lastUpdatedBy:
readOnly: true
oneOf:
- type: integer
- $ref: '#/components/schemas/User'
description: The ID or User object who last updated this Scenario.
RunLog:
description: Represents a detailed log associated with a specific test Scenario Run.
type: object
properties:
id:
type: integer
readOnly: true
description: A numeric identifier for this Run Log.
uuid:
type: string
format: uuid
readOnly: true
description: An identifier for this Run Log in the form of a UUID.
createdAt:
type: integer
readOnly: true
description: Unix timestamp (ms) of this Run Log's creation.
updatedAt:
type: integer
readOnly: true
description: Unix timestamp (ms) of when this Run Log was last modified.
body:
type: array
items:
type: object
properties:
outcome:
type: string
enum:
- Passed
- Failed
- Error
message:
type: string
cog:
type: string
stepId:
type: string
stepData:
type: object
readOnly: true
User:
required:
- emailAddress
- fullName
- password
type: object
properties:
uuid:
type: string
emailAddress:
maxLength: 200
type: string
emailStatus:
type: string
emailChangeCandidate:
type: string
password:
type: string
fullName:
maxLength: 120
type: string
notificationSetting:
type: string
notificationOverride:
maxLength: 200
type: string
maxTrials:
type: string
isSuperAdmin:
type: boolean
passwordResetToken:
type: string
passwordResetTokenExpiresAt:
type: string
emailProofToken:
type: string
emailProofTokenExpiresAt:
type: string
tosAcceptedByIp:
type: string
lastSeenAt:
type: string
LinkedScenarioOutcome:
description: The scenario that should run based on the outcome of this scenario.
type: object
properties:
templateId:
type: integer
description: Id of the template scenario that should be run.
steps:
type: array
$ref: '#/components/schemas/Steps'
ScenarioDefinition:
required:
- steps
type: object
properties:
scenario:
type: string
description: The name of the scenario.
description:
type: string
description: Description of the scenario's purpose.
steps:
type: array
$ref: '#/components/schemas/Steps'
linkedScenarios:
type: object
description: Scenarios that should run based on the outcome of this scenario.
$ref: '#/components/schemas/LinkedScenarios'
Run:
description: Represents a single run of a Test Scenario.
type: object
properties:
outcome:
type: string
readOnly: true
description: The status or outcome of the test.
enum:
- Created
- Running
- Passed
- Failed
- Error
- Waiting
duration:
type: integer
readOnly: true
description: Duration (in ms) that this run took to complete.
scenario:
oneOf:
- type: integer
- $ref: '#/components/schemas/Scenario'
readOnly: true
description: The ID or Scenario object this Run is associated with.
id:
type: number
readOnly: true
description: A numeric identifier for this Run.
uuid:
type: string
format: uuid
readOnly: true
description: An identifier for this Run in the form of a UUID.
log:
oneOf:
- type: integer
- $ref: '#/components/schemas/RunLog'
readOnly: true
description: The ID or RunLog object corresponding to this Run.
createdAt:
type: string
readOnly: true
description: Unix timestamp (ms) of this Run's creation.
updatedAt:
type: string
readOnly: true
description: Unix timestamp (ms) of when this Run was last updated.
createdBy:
oneOf:
- type: integer
- $ref: '#/components/schemas/User'
readOnly: true
description: The ID or User object who created this Run.
Folder:
required:
- name
type: object
properties:
name:
type: string
description: Folder Name
description:
type: string
description: Brief description of the Folder's purpose or intention.
uuid:
type: string
format: uuid
readOnly: true
description: An identifier for this Folder in the form of a UUID.
id:
type: integer
readOnly: true
description: A numeric identifier for this Folder.
createdBy:
readOnly: true
oneOf:
- type: integer
- $ref: '#/components/schemas/User'
description: The ID or User who created this Folder.
lastUpdatedBy:
readOnly: true
oneOf:
- type: integer
- $ref: '#/components/schemas/User'
description: The ID or User who last updated this Folder.
createdAt:
type: integer
readOnly: true
description: Unix timestamp (ms) of this Folder's creation.
updatedAt:
type: integer
readOnly: true
description: Unix timestamp (ms) of when this Folder was last updated.
Steps:
type: array
items:
type: object
required:
- cog
- stepId
properties:
cog:
type: string
description: The name of the Cog (e.g. vendor/cog-name)
stepId:
type: string
description: The ID of the step to be executed.
name:
type: string
description: The human-readable name of the step.
data:
type: object
description: Data to be supplied to the step during step execution.
waitFor:
type: integer
default: 0
description: The amount of time (in seconds) to wait before executing the step.
failAfter:
type: integer
default: 0
description: The amount of time (in seconds) to retry this step before considering the scenario run to have failed.
LinkedScenarios:
description: Scenarios that should run based on the outcome of this scenario.
properties:
onPass:
$ref: '#/components/schemas/LinkedScenarioOutcome'
onFail:
$ref: '#/components/schemas/LinkedScenarioOutcome'
NotificationGroup:
description: Represents a notification group that can be notified during a scenario run.
required:
- name
type: object
properties:
name:
type: string
description: Notification Group name.
email:
type:
- string
- 'null'
description: The email alias of the notification group.
members:
description: The users that are members of this notification group.
type:
- array
- 'null'
items:
type: object
$ref: '#/components/schemas/User'
id:
type: integer
readOnly: true
description: A numeric identifier for this Notification Group.
uuid:
type: string
readOnly: true
description: An identifier for this Notification Group in the form of a UUID.
createdAt:
type: string
readOnly: true
description: Unix timestamp (ms) of this Notification Group's creation.
updatedAt:
type: string
readOnly: true
description: Unix timestamp (ms) of when this Notification Group was last modified.
createdBy:
readOnly: true
oneOf:
- type: integer
- $ref: '#/components/schemas/User'
description: The ID or User object who created this Notification Group.
Error:
type: object
properties:
name:
type: string
message:
type: string
responses:
Forbidden:
description: 'Returned if the authenticated user isn''t allowed to perform this action.
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Unauthorized:
description: 'Returned when there may be a problem with your API token.
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
parameters:
RanBeforeQueryParam:
name: ranBefore
in: query
description: Used to filter scenario runs that ran before the specified date. e.g. ?ranBefore=1591702698140
schema:
type: integer
PageQueryParam:
name: page
in: query
description: This helps with pagination and when the limit is known
schema:
type: integer
OrgPathParam:
name: org
in: path
description: Organization's UUID (to scope the API call).
required: true
schema:
type: string
format: uuid
OutcomeQueryParam:
name: outcome
in: query
description: Used for filtering scenario runs by outcome by passing in comma-delimited values. e.g. ?outcome=Passed,Failed
schema:
type: integer
RanAfterQueryParam:
name: ranAfter
in: query
description: Used to filter scenario runs that ran after the specified date. e.g. ?ranAfter=1591702698140
schema:
type: integer
securitySchemes:
jwtBearerAuth:
type: http
scheme: bearer
bearerFormat: JWT