Copies an existing succeeded build's image from another workspace in the same org into this workspace and creates a deployable build. Requires deployment management on both the source build's project and the target project; force additionally requires the target project owner role. Processing is asynchronous — poll the returned promotion until ready or failed.
Body
Required
Promotion request
-
Confirmed must be true: promotion copies an artifact into another project, so the API requires the explicit confirmation the CLI/UI collect from the user.
-
Force bypasses ECP's deploy-proof gate; requires the target project owner role.
-
SourceBuildID identifies the succeeded build to promote. It may live in any project of the caller's org.
Responses
-
Unsupported or malformed API version, an operation unavailable in the selected published contract, or an unacceptable representation (including unsupported media-type parameters or excluded SSE). Existing authentication, authorization, and rate-limit failures take precedence.
-
Accepted
-
Bad Request
-
Forbidden
-
Not Found
-
Conflict
-
Request Entity Too Large
-
Too Many Requests
-
Internal Server Error
-
Bad Gateway
-
Service Unavailable
curl \
--request POST 'https://agentengine.mongodb.com/api/v1/projects/{id}/workspaces/{workspace_id}/promotions' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"confirmed": true,
"force": true,
"source_build_id": "string"
}'
{
"confirmed": true,
"force": true,
"source_build_id": "string"
}
{
"detail": "This operation is not available in API version 2026-09-20-preview.",
"error": 406,
"errorCode": "OPERATION_NOT_IN_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "This operation supports text/event-stream, which the Accept header excludes. Remove unsupported media-type parameters or accept this type with a positive q value.",
"error": 406,
"errorCode": "UNACCEPTABLE_MEDIA_TYPE",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "The requested API version is not supported. Supported versions: 2026-09-20-preview.",
"error": 406,
"errorCode": "UNSUPPORTED_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "This operation is not available in API version 2026-09-20-preview.",
"error": 406,
"errorCode": "OPERATION_NOT_IN_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"created_at": "string",
"failure_reason": "string",
"finished_at": "string",
"force": true,
"initiated_by": "string",
"org_id": "string",
"promotion_id": "string",
"source_build_id": "string",
"status": "pending",
"target_build_id": "string",
"target_project_id": "string",
"target_workspace_id": "string"
}
{
"created_at": "string",
"failure_reason": "string",
"finished_at": "string",
"force": true,
"initiated_by": "string",
"org_id": "string",
"promotion_id": "string",
"source_build_id": "string",
"status": "pending",
"target_build_id": "string",
"target_project_id": "string",
"target_workspace_id": "string"
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
# Headers
Retry-After: string
# Payload
{
"code": "string",
"error": "string",
"success": true
}
# Headers
Retry-After: string
# Payload
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
{
"code": "string",
"error": "string",
"success": true
}
# Headers
Retry-After: string
# Payload
{
"code": "string",
"error": "string",
"success": true
}
# Headers
Retry-After: string
# Payload
{
"code": "string",
"error": "string",
"success": true
}