Creates a Flex cluster when tier is omitted or FLEX, or a dedicated replica set for a dedicated instance size such as M10. Uses a human caller's delegated token or a paired Agent Engine service account. Agent Engine API keys are not accepted. Invalid project_id is rejected before any Atlas call. Atlas 402 (no payment method) and 403 (insufficient Atlas permission) are mapped to distinct Agent Engine error codes.
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.
-
Created
-
Bad Request
-
Unauthorized
-
ATLAS_PAYMENT_METHOD_REQUIRED
-
ATLAS_PERMISSION_REQUIRED, ATLAS_SERVICE_ACCOUNT_NOT_PAIRED, or FORBIDDEN
-
NOT_FOUND
-
Conflict
-
request body too large
-
INTERNAL_ERROR
-
Bad Gateway
-
PLATFORM_OAUTH_NOT_CONFIGURED or SERVICE_UNAVAILABLE when a delegated token refresh is already in progress
curl \
--request POST 'https://agentengine.mongodb.com/api/v1/atlas/projects/{project_id}/clusters' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json"
{}
{
"name": "string",
"provider": "string",
"region": "string",
"tier": "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"
}
{
"connection_string_srv": "string",
"id": "string",
"is_flex": true,
"name": "string",
"provider": "string",
"region": "string",
"state_name": "string",
"tier": "string"
}
{
"connection_string_srv": "string",
"id": "string",
"is_flex": true,
"name": "string",
"provider": "string",
"region": "string",
"state_name": "string",
"tier": "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
}
{
"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
}