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
List of label objects.
Total number of labels returned.
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
Label name (1–255 characters). Must be unique within your organization.
Optional hex color (e.g.
"#eb5757"). Defaults to a stable color derived from the name.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.UUID of the label.
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.UUID of the label.
New name (1–255 characters).
New hex color.
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, or 404 if the label does not exist.UUID of the 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 201 Created. 404 if the flow or label does not exist. 409 if the label is already attached.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.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.
POST
/api/v1/flows/run — Returns 200 OK with a batch_id to poll via Run Status.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: