Deployments API reference
Platform API v1, Deployments: every operation's path, parameters, request and response fields, scopes, idempotency and errors, from the contract.
Generated from the API contract (Agent Lab Platform API 1.0.0-alpha.1). Descriptions are the contract's own words.
What answers each channel entry point. An application deploys itself as an entry's responder, optionally with a deployed configuration: an agent configuration it publishes for the entry, which the platform runs on every event of the entry. Without one, the entry's events are delivered to the application (sdk-event/v1).
The workspace's channel deployments#
GET /v1/workspaces/{workspaceId}/deployments
Every channel entry point of the workspace and what answers it, active and disabled: an application (responder: "application"), or an assistant the console deployed (responder: "agent"). Of a deployed configuration only its agentRef, revision and time are answered. Any member may read it.
| Scopes | Acts as | Authentication | Idempotency-Key |
|---|---|---|---|
channels:read | member | installationToken | — |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workspaceId | path | string | yes | The workspace, by id. It must be the installation's. |
Agentlab-On-Behalf-Of | header | string | yes | The account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again. |
cursor | query | string | no | The nextCursor of the previous page. Opaque. |
limit | query | integer | no | Items per page. Default: 50. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json: DeploymentPage | A page of deployments. |
400 | application/json: Error | The request itself is wrong, such as a cursor this list did not answer (recovery: none). |
401 | application/json: Error | No token, or a token the platform does not honor. |
403 | application/json: Error | Refused: SCOPE_NOT_GRANTED (configure); WORKSPACE_NOT_INSTALLED, the path names a workspace other than the installation's (configure); MEMBER_REQUIRED, no single Agentlab-On-Behalf-Of (none); MEMBER_NOT_AUTHORIZED, the named account is not a current member who signed in to the application here, or the member may not read or do this (authorize); SERVER_TO_SERVER_ONLY, sent from a browser (none); PRODUCT_ACCESS_DENIED, the workspace's plan does not include it (configure). |
404 | application/json: Error | No such operation or resource. |
429 | application/json: Error | Rate limited (recovery: retry). |
503 | application/json: Error | Try again later (recovery: retry). |
Answer a channel entry point with this application#
POST /v1/workspaces/{workspaceId}/deployments
Makes the calling installation's application the responder of one entry point: a Slack workspace (entryKind: "slack", entryRef its team id), one Slack channel ("slack_channel", entryRef teamId/channelId) or a LINE official account ("line", entryRef its destination id), held by a channel connection of this workspace. The acting member must be one who may manage the workspace (MEMBER_NOT_AUTHORIZED). An entry point something already answers is ENTRY_ALREADY_DEPLOYED; one the workspace does not hold is not found.
With agent, the entry gets a deployed configuration as its revision 1: the platform runs every event of the entry with it, for the acting member, and the application's server need not be up. It is checked as POST …/runs checks a run's configuration, for the acting member, and every problem is answered at once (RUN_CONFIGURATION_INVALID); its MCP connections must be organization-shared ones, because its answers reach everyone in the channel. Without agent, the entry's events are delivered to the application as sdk-event/v1 (which needs channels:respond), and it answers them itself or with a run's replyTo.
Send Idempotency-Key: without one, a retried request may answer ENTRY_ALREADY_DEPLOYED.
| Scopes | Acts as | Authentication | Idempotency-Key |
|---|---|---|---|
deployments:write | member | installationToken | accepted |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workspaceId | path | string | yes | The workspace, by id. It must be the installation's. |
Agentlab-On-Behalf-Of | header | string | yes | The account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again. |
Idempotency-Key | header | string | no | Makes a creating call safe to retry. The same key and body within 24 hours answer the first answer again; the same key with a different body is 409. |
Request body
application/json: DeploymentCreate
| Field | Type | Required | Description |
|---|---|---|---|
entryKind | string | yes | slack, slack_channel or line; values may be added later. |
entryRef | string | yes | The entry point in the channel's own terms, as createDeployment describes. |
agent | AgentConfig | no | — |
Responses
| Status | Body | Description |
|---|---|---|
201 | application/json: Deployment | The deployment. |
400 | application/json: Error | The request itself is wrong, such as a cursor this list did not answer (recovery: none). |
401 | application/json: Error | No token, or a token the platform does not honor. |
403 | application/json: Error | Refused: SCOPE_NOT_GRANTED (configure); WORKSPACE_NOT_INSTALLED, the path names a workspace other than the installation's (configure); MEMBER_REQUIRED, no single Agentlab-On-Behalf-Of (none); MEMBER_NOT_AUTHORIZED, the named account is not a current member who signed in to the application here, or the member may not read or do this (authorize); SERVER_TO_SERVER_ONLY, sent from a browser (none); PRODUCT_ACCESS_DENIED, the workspace's plan does not include it (configure). |
404 | application/json: Error | No such operation or resource. |
409 | application/json: Error | Nothing changed: REVISION_CONFLICT, the entry's deployed configuration is no longer the revision named, read the deployment again (none); ENTRY_ALREADY_DEPLOYED, something already answers the entry point (none); or the Idempotency-Key conflict IdempotencyConflict describes. |
413 | application/json: Error | The body is larger than the operation accepts (PAYLOAD_TOO_LARGE, recovery: none). |
422 | application/json: Error | RUN_CONFIGURATION_INVALID: the body or its configuration has problems, each in problems with its field (none); nothing was stored. |
429 | application/json: Error | Rate limited (recovery: retry). |
503 | application/json: Error | Try again later (recovery: retry). |
Publish a deployed configuration for an entry point#
PUT /v1/workspaces/{workspaceId}/deployments/{deploymentId}/agent
Replaces the deployed configuration of an active entry point this application answers with agent, as its next revision, when the entry still holds expectedRevision (0 for an entry with none yet); otherwise REVISION_CONFLICT and nothing changes. The replacement is atomic: an event is answered by the configuration deployed when it arrived, never by a mix, and a run already started keeps the configuration it started with. The configuration is immutable once deployed; publishing again is another revision. It is checked as createDeployment checks one, for the acting member, who must be one who may manage the workspace; its runs then act for that member. An entry of another application, a disabled one or another workspace's is not found.
| Scopes | Acts as | Authentication | Idempotency-Key |
|---|---|---|---|
deployments:write | member | installationToken | — |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workspaceId | path | string | yes | The workspace, by id. It must be the installation's. |
Agentlab-On-Behalf-Of | header | string | yes | The account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again. |
deploymentId | path | string | yes | The deployment, by id. |
Request body
application/json: DeployedAgentReplace
| Field | Type | Required | Description |
|---|---|---|---|
agent | AgentConfig | yes | — |
expectedRevision | integer | yes | The revision this replaces, as the deployment answered it; 0 for the first. |
Responses
| Status | Body | Description |
|---|---|---|
200 | application/json: Deployment | The deployment with its new revision. |
400 | application/json: Error | The request itself is wrong, such as a cursor this list did not answer (recovery: none). |
401 | application/json: Error | No token, or a token the platform does not honor. |
403 | application/json: Error | Refused: SCOPE_NOT_GRANTED (configure); WORKSPACE_NOT_INSTALLED, the path names a workspace other than the installation's (configure); MEMBER_REQUIRED, no single Agentlab-On-Behalf-Of (none); MEMBER_NOT_AUTHORIZED, the named account is not a current member who signed in to the application here, or the member may not read or do this (authorize); SERVER_TO_SERVER_ONLY, sent from a browser (none); PRODUCT_ACCESS_DENIED, the workspace's plan does not include it (configure). |
404 | application/json: Error | No such operation or resource. |
409 | application/json: Error | Nothing changed: REVISION_CONFLICT, the entry's deployed configuration is no longer the revision named, read the deployment again (none); ENTRY_ALREADY_DEPLOYED, something already answers the entry point (none); or the Idempotency-Key conflict IdempotencyConflict describes. |
413 | application/json: Error | The body is larger than the operation accepts (PAYLOAD_TOO_LARGE, recovery: none). |
422 | application/json: Error | RUN_CONFIGURATION_INVALID: the body or its configuration has problems, each in problems with its field (none); nothing was stored. |
429 | application/json: Error | Rate limited (recovery: retry). |
503 | application/json: Error | Try again later (recovery: retry). |