smoke, checkout, regression). These endpoints manage labels, attach them to flows and suites, and trigger runs by label — useful for CI pipelines that run a subset of tests per branch or PR.
All requests require an API key in the X-API-Key header. See API Reference for authentication and the standard 401 / 403 / 429 / 500 error shapes shared by every endpoint on this page.
Labels are also managed in the dashboard (Settings → Labels, and inline on any flow or suite). The dashboard uses your signed-in session; this API is for programmatic and CI use with an organization API key.
List Labels
Returns every label in your organization, ordered by name.GET
/api/v1/labels — Returns 200 OKExample Request
Response Fields
Example Response
Create Label
POST
/api/v1/labels — Returns 201 Created. Returns 409 Conflict if a label with the same name already exists (names are unique per organization, case-insensitive).Request Body
Example Request
Example Response
Get Label
GET
/api/v1/labels/{label_id} — Returns 200 OK with the same shape as items in List Labels, or 404 if the label does not exist.Update Label
Rename or recolor a label. Only provided fields change; omitted fields are unchanged.PATCH
/api/v1/labels/{label_id} — Returns 200 OK. 400 if no recognized fields are provided. 404 if the label does not exist. 409 if renaming collides with another label, or renames the built-in snoozed label.Delete Label
Deletes the label and removes it from every flow and suite it’s attached to.DELETE
/api/v1/labels/{label_id} — Returns 204 No Content. 404 if the label does not exist. 409 for the built-in snoozed label.Attach & Detach Labels
Attach or detach a single label to a flow or suite. There is no bulk endpoint — issue one call per (entity, label) pair.Attach to a flow
POST
/api/v1/flows/{flow_id}/labels/{label_id} — Returns 204 No Content. 404 if the flow or label does not exist. Attaching a label that is already attached does nothing.Detach from a flow
DELETE
/api/v1/flows/{flow_id}/labels/{label_id} — Returns 204 No Content. 404 if the label is not attached to the flow. 409 if the label is snoozed and only the flow’s YAML file snoozed it.Attach to / detach from a suite
Same shape, with/suites/{suite_id} instead of /flows/{flow_id}:
Run by Label
Trigger a run of everything carrying one or more labels by passinglabels (label names) to the Runs API. Autosana runs the union of the suites and flows that carry any of those labels; a flow already covered by a matched suite runs once. As with any run, provide app_id (web) or bundle_id + platform (mobile). A request whose labels match nothing returns 400. Snoozed tests are skipped, even when they carry a requested label.
POST
/api/v1/flows/run — Returns 200 OK with a batch_id to poll via Run Status.The Snoozed Label
Every organization has a built-insnoozed label. A flow carrying it is skipped by runs by label, suite, folder, and schedule. See Snoozing a Test for what it skips and what still runs.
- Attach it to a flow to snooze the flow. Detach it to unsnooze.
- If the flow’s YAML file also snoozes it, detaching returns
204but the flow stays snoozed until the file drops it. If only the file snoozes it, detaching returns409. - You can change its color. Renaming or deleting it returns
409:
CI Usage
In CI, the simplest entry point is the autosana-ci GitHub Action — pass a comma-separatedlabels input to run the matching suites and flows after your build is uploaded, instead of listing suite-ids / flow-ids: