Deployments.ai Docs
Runtime

Reserve conversation order before an external automation delivery

POST /v1/threads/{threadId}/runs/{runId}/message/publication-reservations · SDK reserveRunMessagePublication · CLI deployments run reserve-message-publication

POST
/v1/threads/{threadId}/runs/{runId}/message/publication-reservations

Requires runs:write.

Authorization

headerAuthorizationBearer <token>

Opaque bearer credential scoped to one service account and tenant.

Path Parameters

threadId*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
runId*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Header Parameters

x-deployments-environment?string

Required with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
x-deployments-organization?string

Required with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
x-deployments-project?string

Required with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
idempotency-key*string

Must contain 1–256 UTF-8 bytes with no surrounding whitespace or control characters (U+0000–U+001F and U+007F); maxLength is only a character-count approximation.

Match^(?!\s)(?!.*\s$)[^\u0000-\u001F\u007F]+$
Length1 <= length <= 256

Request Body

application/json
  1. body
content*string
Match^\S[\s\S]*\S$|^\S$|^$
Length1 <= length

Response Body

MessagePublicationResponse

application/json
  1. response
createdAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
updatedAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
version*number|||
environmentId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
organizationId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
projectId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
agentDeploymentId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
committedAt?string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
id*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
messageId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
messageSequence*number|||
object*"message-publication"
Value in"message-publication"
publishedAt?string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
releasedAt?string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
runId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
sourceMessageId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
sourceMessageSequence*number|||
status*string
Value in"reserved""committed""published""released"
streamEventId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
threadId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
curl -X POST "https://example.com/v1/threads/string/runs/string/message/publication-reservations" \  -H "idempotency-key: string" \  -H "Content-Type: application/json" \  -d '{    "content": "string"  }'
{  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "version": 0,  "environmentId": "string",  "organizationId": "string",  "projectId": "string",  "agentDeploymentId": "string",  "committedAt": "2019-08-24T14:15:22Z",  "id": "string",  "messageId": "string",  "messageSequence": 0,  "object": "message-publication",  "publishedAt": "2019-08-24T14:15:22Z",  "releasedAt": "2019-08-24T14:15:22Z",  "runId": "string",  "sourceMessageId": "string",  "sourceMessageSequence": 0,  "status": "reserved",  "streamEventId": "string",  "threadId": "string"}