Partially updates a workspace. The project scope is carried by the route id path parameter. Field-only patches return 204; a status-only patch (pause/resume) is mutually exclusive with other fields and returns 200 with ECP's app body (including any warnings).
Body
Required
Fields to update
-
AutoDeploy is an app-level ECP field (not persisted in the gateway DB); forwarded verbatim to ECP's app PATCH.
-
ReleaseMode is an app-level ECP field (not persisted in the gateway DB); forwarded verbatim to ECP's app PATCH. Controls webhook-triggered builds only — API-triggered releases are available in every mode.
-
Status is a pause/resume signal ("active" | "paused"). The gateway does not persist it locally; the handler forwards a status-only patch straight to ECP, which runs pause-teardown / resume-redeploy.
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.
-
Returned for status-only patches; proxied from ECP.
-
Returned for field-update patches.
-
Bad Request
-
Not Found
-
Request Entity Too Large
-
Too Many Requests
-
Internal Server Error
-
ECP transport or pause-teardown failure.
-
Service Unavailable
curl \
--request PATCH 'https://agentengine.mongodb.com/api/v1/projects/{id}/workspaces/{workspace_id}' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"agent_card": {
"a2a_allowed_callers": [
"string"
],
"a2a_enabled": true,
"capabilities": [
"string"
],
"input_modes": [
"string"
],
"output_modes": [
"string"
],
"skills": [
{
"description": "string",
"example_input": "string",
"example_output": "string",
"name": "string"
}
],
"summary": "string"
},
"auto_deploy": true,
"description": "string",
"features": {
"guardrails": true,
"memory": true,
"playground": true,
"use_custom_parser": true
},
"framework": "string",
"gitops": {
"branch": "string",
"connection_ref": "string",
"manifest_path": "string",
"provider": "string",
"repo_url": "string"
},
"name": "string",
"release_mode": "string",
"status": "string",
"subdirectory": "string",
"workspace_name": "string"
}'
{
"agent_card": {
"a2a_allowed_callers": [
"string"
],
"a2a_enabled": true,
"capabilities": [
"string"
],
"input_modes": [
"string"
],
"output_modes": [
"string"
],
"skills": [
{
"description": "string",
"example_input": "string",
"example_output": "string",
"name": "string"
}
],
"summary": "string"
},
"auto_deploy": true,
"description": "string",
"features": {
"guardrails": true,
"memory": true,
"playground": true,
"use_custom_parser": true
},
"framework": "string",
"gitops": {
"branch": "string",
"connection_ref": "string",
"manifest_path": "string",
"provider": "string",
"repo_url": "string"
},
"name": "string",
"release_mode": "string",
"status": "string",
"subdirectory": "string",
"workspace_name": "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"
}
{
"app_id": "string",
"org_id": "string",
"project_id": "string",
"status": "active",
"warnings": [
"string"
]
}
{
"app_id": "string",
"org_id": "string",
"project_id": "string",
"status": "active",
"warnings": [
"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
}
# 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
}