Skip to main content
TroopyDocs
Open Troopy
Troopy

API reference / Tests and incidents

Add a test

Adds a test: a title and up to 30 steps in order. A step does something, checks what shows, or takes a picture. smoke puts it on the main path, which runs after each release. production says that no step changes data, so it can run on the live product. account names the test account that it signs in with. A teammate's test is proposed until a person makes it active. 500 tests at most.

post/api/v1/tests

Authorization

HeaderAuthorization: Bearer <API key>
Or the headerX-API-Key: <API key>
API keyMake one in Troopy under Settings > API keys. It acts as you, in its workspace.

Other ways to call it

CLItroopy tests create
MCP tooltroopy_create_test
Rate limit60 calls in 60 seconds, for each key
RetriesSend an Idempotency-Key header. A retry with the same key gets the first answer back, and the operation runs one time.

Body

application/json
title*string

At least 1 characters · At most 120 characters

steps*array<object>

The steps in order. Troopy numbers them s1, s2 and so on

At most 30 items

2 properties
kind*enum<string>

do: an action. check: what must show. picture: a picture to take

docheckpicture

text*string

At least 1 characters · At most 500 characters

tagsarray<string>

At most 10 items

smokeboolean
productionboolean
accountstring | null

The label of a test account of the place where it runs, or null

statusenum<string>

A person's test is active unless paused. A teammate's is always proposed

activepaused

Response

201 · application/json
data*object
13 properties
id*string

A 24-character id

title*string
steps*array<object>
3 properties
id*string

s1, s2 and so on, in order

kind*enum<string>

do: an action. check: what must show. picture: a picture to take

docheckpicture

text*string
tags*array<string>
smoke*boolean

On the main path: it runs after each release

production*boolean

Safe for Production: no step changes data

account*string | null

The label of the test account that it signs in with. null when it signs in with none

status*enum<string>

A teammate's test is proposed until a person makes it active. A paused test does not run

proposedactivepaused

createdBy*object

Who wrote it

3 properties
type*enum<string>

personagentapi

id*string
name*string
updatedBy*object

Who wrote it

3 properties
type*enum<string>

personagentapi

id*string
name*string
version*integer
createdAt*string

ISO 8601 date and time

updatedAt*string

ISO 8601 date and time

Errors

400 invalid_inputFix the field named in detail. Each operation's schema is in /api/v1/openapi.json.
401 unauthorizedSend an API key as `Authorization: Bearer tr_live_...`. Create one in Troopy under Settings.
403 forbiddenThe key lacks a scope this operation needs, or its owner lacks the role. detail says which; create a key with the scope, or ask an organization owner or admin.
409 conflictThis Idempotency-Key was used for a different request, or that request is still running. Use a new key for a new request.
429 rate_limitedWait the number of seconds in Retry-After, then retry.