Skip to main content
POST
/
v1
/
agents
/
{agentId}
/
deployments
/
{deploymentId}
/
promote
Promote a deployment to the next environment
curl --request POST \
  --url https://api.us.poly.ai/v1/agents/{agentId}/deployments/{deploymentId}/promote \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "deploymentMessage": "",
  "targetEnvironment": "<string>"
}
'
{
  "deployment": {
    "id": "<string>",
    "accountId": "<string>",
    "agentId": "<string>",
    "environment": "<string>",
    "artifactVersion": "<string>",
    "version": "<string>",
    "createdBy": "<string>",
    "createdAt": "<string>",
    "metadata": {}
  },
  "testRunIds": [
    "<string>"
  ]
}

Authorizations

x-api-key
string
header
required

Path Parameters

agentId
string
required
deploymentId
string
required

Body

application/json

Metadata attached to a promote action: an optional message and an explicit target environment override.

deploymentMessage
string
default:""

Message describing this promotion

targetEnvironment
string

Target environment to promote to. If omitted, promotes to the next environment in sequence (sandbox->pre-release->live).

Response

Successful response

The resulting deployment from a promote / rollback / publish action, plus any test runs it triggered.

deployment
object
required

A deployment of an agent version to a specific environment, plus who created it and when.

testRunIds
string[]

IDs of test runs triggered by this deployment action

Last modified on April 22, 2026