Everything an AI agent can do with the MongoDB Atlas API.

A reference guide for building AI agents: every method, how to authenticate, and the permissions each one needs.

Endpoints25
API version2025-03-12
Last updated23 June 2026
Orientation

How the MongoDB Atlas API works.

The MongoDB Atlas API is how an app or AI agent manages an Atlas deployment: launching and resizing clusters, creating database users, opening network access to a database, and taking or restoring backups. Access is granted through a service account or an API key, and each one is assigned an organization or project role that sets which operations it can perform. Atlas versions the API per resource by date, so a request names the exact resource version it wants.

25Endpoints
8Capability groups
11Read
14Write
10Permissions
Authentication
Atlas offers two ways to authenticate the Administration API. Service accounts use OAuth 2.0 client credentials: a client ID and secret are exchanged for a Bearer access token that is valid for one hour, and this is the recommended method. Programmatic API keys are the legacy method and use HTTP Digest authentication with a public and a private key. Each credential belongs to one organization and can be granted access to projects within it.
Permissions
Atlas governs access by role, not by per-endpoint scopes. A service account or API key is assigned organization roles like ORG_OWNER or ORG_READ_ONLY, or project roles like GROUP_OWNER, GROUP_READ_ONLY, GROUP_CLUSTER_MANAGER, or GROUP_DATABASE_ACCESS_ADMIN, and that role set decides which calls succeed. A call that the role does not allow returns a 403.
Versioning
The Administration API versions each resource by a release date, like 2025-03-12, named in the Accept header as application/vnd.atlas.2025-03-12+json. Breaking changes ship as a new dated resource version, while non-breaking changes are added to the current one. A deprecated version keeps working for at least twelve months. Omitting or naming an unknown version returns a 406.
Data model
The Administration API manages Atlas infrastructure, not the documents inside a database. A project is called a group in the API, so most paths are scoped under a group ID, and clusters, database users, network access, and backups live within a group. It returns JSON and pages large lists with a page number and items-per-page count.
Connect & authenticate

Connection & authentication methods.

How an app or AI agent connects to Atlas determines what it can reach. There is a route for making calls, a token route for service accounts, and a hosted server that exposes Atlas tools to agents, and each is governed by the key or token behind it and the organization or project role it carries.

Ways to connect

REST API

The Atlas Administration API is a JSON REST API at https://cloud.mongodb.com/api/atlas/v2. A call authenticates with a service account Bearer token or a Digest API key, and names the resource version it wants in the Accept header, for example application/vnd.atlas.2025-03-12+json. Most paths are scoped under a project (group) ID.

Best forConnecting an app or AI agent to manage Atlas infrastructure.
Governed byThe service account or API key and the organization or project role it carries.
Docs ↗

MongoDB MCP Server

MongoDB publishes an official Model Context Protocol server (mongodb-js/mongodb-mcp-server) that exposes Atlas administration as tools an AI agent can call, like atlas-list-clusters, atlas-create-cluster, atlas-create-db-user, atlas-create-access-list, and atlas-list-alerts. It runs locally and authenticates to the Administration API with a service account or an API key, so the tools inherit that credential's roles.

Best forConnecting an AI agent to Atlas administration through MCP.
Governed byThe Atlas credential the server is configured with and the roles it carries.
Docs ↗
Authentication

Service account (OAuth 2.0)

A service account uses the OAuth 2.0 client credentials flow, exchanging a client ID and secret for a Bearer access token at the token endpoint. The token is valid for one hour and is then refreshed. This is the recommended method for machine-to-machine access. The service account is assigned organization and project roles that govern what its token can do.

TokenOAuth 2.0 Bearer access token (1 hour)
Best forApps and AI agents authenticating without a user.
Docs ↗

Programmatic API key (Digest)

An API key is the legacy method. It has a public key and a private key, sent with HTTP Digest authentication, where Atlas hashes the keys with a short-lived nonce to guard against replay. A key belongs to one organization and is assigned organization and project roles. An IP access list can restrict which addresses may use it.

TokenPublic + private key pair (HTTP Digest)
Best forExisting integrations not yet moved to service accounts.
Docs ↗
Capability map

What an AI agent can do in MongoDB Atlas.

The Atlas Administration API is split into areas an agent can act on, like clusters, projects, database users, network access, backups, organizations, and alerts. Each area has its own methods, and a write can launch infrastructure, change who can reach a database, or open it to new network addresses.

Clusters

5 endpoints

Methods for launching, resizing, and removing database clusters in a project.

A write here launches, changes, or tears down real database infrastructure.
View endpoints

Projects (Groups)

4 endpoints

Methods for working with projects, called groups in the API.

A write here creates or deletes a project and everything scoped under it.
View endpoints

Database Users

3 endpoints

Methods for the accounts that authenticate to the databases in a project.

A write here changes who can log in to a database and with what privileges.
View endpoints

Network access (IP access list)

3 endpoints

Methods for the IP and CIDR ranges allowed to reach a project's databases.

A write here opens or closes which network addresses can reach a database.
View endpoints

Backups & snapshots

3 endpoints

Methods for cloud backup snapshots and restore jobs on a cluster.

A write here starts a restore that can overwrite live cluster data.
View endpoints

Organizations

2 endpoints

Methods for organizations, which hold projects, billing, and API keys.

A write here changes organization-level settings or membership.
View endpoints

Alerts

2 endpoints

Methods for open alerts and the alert configurations that raise them.

A write here changes which conditions raise an alert and where it is sent.
View endpoints

Programmatic API keys

3 endpoints

Methods for the organization API keys that authenticate to this very API.

A write here mints or removes a credential that can call the Administration API.
View endpoints
Endpoint reference

Every MongoDB Atlas API method.

Filter by method, access, or permission, or search any path. Select a row for version detail, rate limits, the related webhook event, and the source.

MethodEndpointWhat it doesAccessPermissionVersion

Clusters

Methods for launching, resizing, and removing database clusters in a project.5

Read-only; any project role that can view the project can list clusters.

Acts oncluster
Permission (capability)GROUP_READ_ONLY
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitClusters set: capacity 10,000, refill 5,000 / 60s (per project)

Read-only.

Acts oncluster
Permission (capability)GROUP_READ_ONLY
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitClusters set: capacity 10,000, refill 5,000 / 60s (per project)

Provisions real, billable infrastructure; needs a project role that can manage clusters.

Acts oncluster
Permission (capability)GROUP_CLUSTER_MANAGER
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitClusters set: capacity 10,000, refill 5,000 / 60s (per project)

Can change cost and capacity of a running cluster.

Acts oncluster
Permission (capability)GROUP_CLUSTER_MANAGER
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitClusters set: capacity 10,000, refill 5,000 / 60s (per project)

Irreversible; tears down the cluster and its data.

Acts oncluster
Permission (capability)GROUP_CLUSTER_MANAGER
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitClusters set: capacity 10,000, refill 5,000 / 60s (per project)

Projects (Groups)

Methods for working with projects, called groups in the API.4

Returns only projects the credential's roles can see.

Acts onproject
Permission (capability)ORG_READ_ONLY
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts onproject
Permission (capability)GROUP_READ_ONLY
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Needs an organization role that can create projects.

Acts onproject
Permission (capability)ORG_GROUP_CREATOR
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Irreversible; the project must have no active clusters.

Acts onproject
Permission (capability)GROUP_OWNER
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Database Users

Methods for the accounts that authenticate to the databases in a project.3

Read-only.

Acts ondatabaseUser
Permission (capability)GROUP_READ_ONLY
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitDatabase Users set: capacity 10,000, refill 5,000 / 60s (per project)

Grants a new login to the databases, with the privileges set on the user.

Acts ondatabaseUser
Permission (capability)GROUP_DATABASE_ACCESS_ADMIN
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitDatabase Users set: capacity 10,000, refill 5,000 / 60s (per project)

Removes that login's access to the databases.

Acts ondatabaseUser
Permission (capability)GROUP_DATABASE_ACCESS_ADMIN
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitDatabase Users set: capacity 10,000, refill 5,000 / 60s (per project)

Network access (IP access list)

Methods for the IP and CIDR ranges allowed to reach a project's databases.3

Read-only.

Acts onprojectIpAccessList
Permission (capability)GROUP_READ_ONLY
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Opens new network addresses to the project's databases.

Acts onprojectIpAccessList
Permission (capability)GROUP_NETWORK_ACCESS_MANAGER
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Closes a network address's reach to the databases.

Acts onprojectIpAccessList
Permission (capability)GROUP_NETWORK_ACCESS_MANAGER
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Backups & snapshots

Methods for cloud backup snapshots and restore jobs on a cluster.3

Read-only.

Acts ondiskBackupSnapshot
Permission (capability)GROUP_READ_ONLY
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Creates a new snapshot of the cluster's data.

Acts ondiskBackupSnapshot
Permission (capability)GROUP_BACKUP_MANAGER
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A restore can overwrite live data on the target cluster.

Acts ondiskBackupRestoreJob
Permission (capability)GROUP_BACKUP_MANAGER
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Organizations

Methods for organizations, which hold projects, billing, and API keys.2

Read-only.

Acts onorganization
Permission (capability)ORG_READ_ONLY
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only.

Acts onorganization
Permission (capability)ORG_READ_ONLY
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Alerts

Methods for open alerts and the alert configurations that raise them.2

Read-only.

Acts onalert
Permission (capability)GROUP_READ_ONLY
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Sets which conditions raise an alert and the integration it notifies, like email, Slack, or a webhook target.

Acts onalertConfig
Permission (capability)GROUP_ALERTS_MANAGER
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Programmatic API keys

Methods for the organization API keys that authenticate to this very API.3

Read-only; the private key is never returned after creation.

Acts onapiKey
Permission (capability)ORG_READ_ONLY
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Mints a credential that can call this API; the private key is shown only once.

Acts onapiKey
Permission (capability)ORG_OWNER
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Revokes that credential's access to the Administration API.

Acts onapiKey
Permission (capability)ORG_OWNER
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply
No endpoints match those filters.
Webhooks

Webhook events.

The Atlas Administration API does not push events to a webhook of its own. Atlas alerts are delivered instead through configured integrations, like email, Slack, PagerDuty, or a generic webhook set on an alert configuration.

EventWhat it signalsTriggered by
No events match that search.
Rate limits & pagination

Rate limits, pagination & request size.

Atlas limits how fast an app can call the Administration API using a token-bucket model that sets a separate capacity and refill rate per endpoint set and scope, rather than one uniform per-minute ceiling.

Request rate

Atlas does not apply one uniform request limit across the Administration API. It uses a token-bucket model where each endpoint set has its own capacity (a burst of requests) and refill rate (how fast that burst is replenished), scoped to an organization, a project, a user, or an IP address. Cluster and database-user endpoints in a project allow a capacity of 10,000 with a refill of 5,000 per 60 seconds, while organization-scoped sets like the activity feed allow far less. Going over returns HTTP 429 with the error code RATE_LIMITED_TOKEN_BUCKET and, when present, RateLimit-Limit, RateLimit-Remaining, and Retry-After headers.

Pagination

List endpoints page with a page number (pageNum, starting at 1) and an items-per-page count (itemsPerPage). A response wraps the results in a results array alongside totalCount and a links section, and an envelope query parameter can include the HTTP status in the body. Headers are not guaranteed, so an integration handles their absence.

Request size

The items-per-page count (itemsPerPage) controls how many objects a single page returns. A Bearer access token from a service account is valid for one hour before it must be refreshed.

Errors

Status codes & error handling.

The status codes an agent should handle, and what to do about each.

StatusCodeMeaningWhat to do
400Validation error (e.g. ATLAS_INVALID_CIDR_BLOCK)The request was malformed or a value was invalid, for example a bad CIDR block on a network access entry or a missing required field. The body names a specific errorCode and detail.Read the errorCode and detail, fix the request, and resend. The request is not retryable as-is.
401UnauthorizedAuthentication failed. The Bearer token is missing or expired, or the Digest credentials are wrong.Refresh the service account token (it lasts one hour) or check the API key, then retry.
403ForbiddenThe credential authenticated but its organization or project role does not allow this operation, or its IP is not on the access list.Grant the service account or API key the needed role (for example GROUP_CLUSTER_MANAGER for cluster changes), or add the calling IP to the access list.
404Not foundThe requested resource does not exist or is not visible to this credential, for example a cluster name or project ID that is wrong.Verify the group ID and resource name, and confirm the credential has access to that project.
406Not AcceptableThe Accept header omitted the resource version or named a version that does not exist for that resource.Set the Accept header to a valid dated version, like application/vnd.atlas.2025-03-12+json.
409ConflictThe operation cannot run in the resource's current state, for example changing a cluster that is mid-deployment or creating something that already exists.Wait for the resource to reach a stable state, or reconcile the conflict, then retry.
429RATE_LIMITED_TOKEN_BUCKETThe token-bucket capacity for this endpoint set and scope was exhausted. The detail names the path, the wait time, the capacity, and the refill rate.Back off using the Retry-After header when present, then retry with exponential backoff.
500ATLAS_GENERAL_ERRORAn unexpected error on the Atlas side. It is rare.Retry with backoff, and contact MongoDB support if it persists.
Versioning & freshness

Version history.

Atlas versions the Administration API per resource by date. A request names the resource version it wants in the Accept header, and Atlas keeps an older version working for at least twelve months after it is deprecated.

Version history

What changed, and when

Latest version2025-03-12
2025-03-12Current version
Current stable resource version

The latest dated resource version of the Administration API, named in the Accept header as application/vnd.atlas.2025-03-12+json. Atlas versions each resource independently by date: breaking changes mint a new dated version, while non-breaking changes are folded into the current one.

What changed
  • Latest stable resource version across the Administration API.
  • Selected per request through the Accept header.
  • Non-breaking changes are added without minting a new version date.
2024-08-05Requires migration
2024 resource versions

Dated resource versions released through 2024 carried breaking changes for individual resources ahead of the 2025 cut. Each became the stable version for its resource until a newer date superseded it.

What changed
  • Per-resource breaking changes shipped as new dated versions.
  • Older versions enter a twelve-month deprecation window when superseded.
2023-11-15Requires migration
2023-11-15 resource version

A dated resource version in the first year of the reintroduced versioned API, carrying breaking changes for the resources it covered.

What changed
  • Per-resource breaking changes for the covered endpoints.
  • Supported through its deprecation window before removal.
2023-02-01Feature update
2023-02-01 resource version

Part of the first release of the reintroduced versioned Atlas Administration API, supported for an extended period after its later deprecation.

What changed
  • Early resource version of the versioned API.
  • Supported for two years after deprecation, longer than the standard window.
2023-01-01Feature update
First versioned resource release

The initial dated resource version of the reintroduced versioned Administration API, equivalent to the older unversioned v1.0 endpoints. Supported for an extended period after deprecation.

What changed
  • Baseline dated version mapping to the prior v1.0 behavior.
  • Marked deprecated with an extended two-year support window.

Pin a resource version in the Accept header and move up before a deprecated version is removed.

Atlas Administration API changelog ↗
Questions

MongoDB Atlas API, answered.

Should I use a service account or an API key?+
Service accounts are the recommended method. They use OAuth 2.0 client credentials, exchanging a client ID and secret for a short-lived Bearer token valid for one hour, at the token endpoint. Programmatic API keys are the legacy method and use HTTP Digest authentication with a public and private key. New integrations should prefer service accounts; both are assigned the same organization and project roles.
How do permissions work if there are no per-endpoint scopes?+
Atlas governs the Administration API by role, not by a list of scopes per endpoint. A service account or API key is assigned organization roles (like ORG_OWNER or ORG_READ_ONLY) and project roles (like GROUP_OWNER, GROUP_READ_ONLY, or GROUP_CLUSTER_MANAGER), and that role set determines which calls it can make. A call outside the granted roles returns a 403, so least privilege means assigning the narrowest role that still covers the work.
How does API versioning work?+
Each resource is versioned by a release date. A request names the version it wants in the Accept header, for example application/vnd.atlas.2025-03-12+json. Breaking changes appear as a new dated resource version, and the previous version keeps working for at least twelve months after it is deprecated, then is removed. Omitting the version or naming one that does not exist returns a 406 Not Acceptable.
Does the Administration API send webhooks?+
Not on its own. The Administration API is request and response only. Atlas does send alert notifications, but those are delivered through integrations configured on an alert, like email, Slack, PagerDuty, Datadog, or a generic webhook target, rather than from the Administration API itself.
What is a group, and why is it in every path?+
A group is the API name for a project. Atlas organizes work into organizations and projects, and most Administration API paths are scoped under a group ID (groups/{groupId}), because clusters, database users, network access, and backups all belong to a project. An organization holds the projects, billing, and programmatic API keys.
Does the Administration API touch the data inside my databases?+
No. The Administration API manages the Atlas deployment, like creating clusters, database users, network access, and backups. Reading and writing the documents inside a cluster is done with the MongoDB drivers or query API against the cluster's connection string, not through the Administration API.
Related

More data API guides for agents

What is Bollard AI?

Control what every AI agent can do in MongoDB Atlas.

Bollard AI sits between a team's AI agents and MongoDB Atlas. Grant each agent exactly the access it needs, read or write, area by area, and every call is checked and logged.

  • Set read, write, or full access per agent, never a shared Atlas key or service account.
  • Denied by default, so an agent reaches only what has been explicitly allowed.
  • Every call recorded in plain English: who, what, where, and the decision.
MongoDB Atlas
Infra Agent
View clusters ResourceOffReadFull use
Edit network access list ActionOffReadFull use
Database users ResourceOffReadFull use
Delete clusters ActionOffReadFull use
Per-agent access, set in Bollard AI, not in MongoDB Atlas