Skip to main content
GET
List published workflow versions
Requires agents:read. This is publication history, not call execution history.
string
required
Local agent UUID.
integer
default:"50"
Page size, 1–100.
integer
Exclusive version cursor returned as next_cursor.
A limit outside 1–100 is refused, not clamped, and so is a cursor that is not a version number: 400 WORKFLOW_REQUEST_INVALID, with the parameter in issues[0].path and what it takes in error. The response has data and nullable next_cursor. Summaries are newest first and contain id, version, draft_version, content_hash, compiler_version, environment, published_at and three fields that say how the version came to be: source, source_run_id and restored_from_version. This read does not restore a draft, republish a version or grant access to a run journal.

Where a version came from

Read one version with its document through Get workflow version.

What environment says, and what it does not

environment is the deployment plane that compiled and stored the revision: production, testing or local. It is not a rehearsal flag, not a sandbox switch and not something you send — there is no field for it on Publish workflow, and no query parameter selects one. It is decided by the deployment you are talking to. Every Yappr deployment is configured with exactly one plane, and everything published through it is stored on that plane. The hosted API you are reading about publishes as testing. That is the deployment’s own configuration, not a property of your agent and not something gone wrong: testing here names the plane, not a lesser copy of your workflow. A self-hosted or on-premise deployment configured as production stores its versions as production, and nothing else about publishing differs.

What the dashboard calls it

The dashboard labels a plane by what it means for your callers, and keeps the API value off the screen: So Version 3 is live. in the dashboard and "version": 3, "environment": "testing" here describe the same published version. In the dashboard’s version list only the version callers reach now is marked live now; an older row shows its number and when it was published.

How a call finds the version to run

A call runs on the plane of the deployment that admitted it, and it loads the agent’s published version only if that version was stored on the same plane. That is why you do not have to think about this. Publish through this API and place the call through this API — POST /calls, POST /call-requests, a phone number, a shared link — and both are the same deployment, so both are the same plane. The version you publish is the version your next call runs. The two can only come apart if a version was published through a different deployment than the one placing the call — moving a workspace between deployments, or an on-premise stack pointed at a hosted one. Publishing is not plane-scoped, so such a version still becomes the agent’s published version, and a call then finds nothing to run however active the agent is: the request ends failed with error_code: "artifact_unavailable" (see Read a call request). The fix is one call — publish the draft again through the deployment that will place the call, and the new version is stored on its plane. The same code also answers a call whose channel the published version does not list in its channels — see Which ways in the agent allows. The other conditions on being callable are unchanged: the agent must be active and have a published version. See Place a call.

Reading it

Publish workflow returns environment on the revision it creates, so you can record the plane at publish time without a second request. It is also on every row here. Every version of the agent is listed whatever plane published it, so this is also the only field on which two of one agent’s versions can differ without the document differing. Tell versions apart by version, content_hash and published_at.

Authorizations

Authorization
string
header
required

Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys. No key is 401 MISSING_KEY; a key that is not one of ours, or is revoked, is 401 INVALID_KEY; an expired one is 401 EXPIRED_KEY. A valid key without the scope an operation needs is 403 INSUFFICIENT_SCOPE on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's RATE_LIMIT asks for what is left of the minute, a route's daily cap (RATE_LIMITED) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is 404 ROUTE_NOT_FOUND, and a method a served path does not take is 405 METHOD_NOT_ALLOWED with an Allow header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (POST /calls/ is POST /calls) and refused where it can (GET /calls/). A doubled slash inside a path is merged into one before the request reaches the API (GET //calls is GET /calls).

Headers

x-company-id
string<uuid>

Explicit active workspace. Optional; when sent it must be the API key's own workspace — any other value is refused with 403 WORKSPACE_MISMATCH.

Path Parameters

id
string<uuid>
required

Query Parameters

cursor
integer

Exclusive version cursor from next_cursor.

Required range: x >= 1
limit
integer
default:50
Required range: 1 <= x <= 100

Response

Published versions.

next_cursor
integer | null
required
data
object[]
required