openapi: 3.2.0 info: description: The MongoDB Atlas Administration API allows developers to manage all components in MongoDB Atlas. license: name: CC BY-NC-SA 3.0 US url: https://creativecommons.org/licenses/by-nc-sa/3.0/us/ termsOfService: https://www.mongodb.com/mongodb-management-service-terms-and-conditions title: MongoDB Atlas Administration AI Model API Keys API version: '2.0' x-xgen-sha: 8f9485d239f53f5b963c55e11f5f05a34bec9586 servers: - url: https://cloud.mongodb.com security: - ServiceAccounts: [] - DigestAuth: [] tags: - description: Returns, adds, edits, and removes API Keys for your AI Models. name: AI Model API Keys paths: /api/atlas/v2/groups/{groupId}/aiModelApiKeys: get: description: Retrieve AI model API keys for the given group. operationId: listGroupAiModelApiKeys parameters: - $ref: '#/components/parameters/groupId' - $ref: '#/components/parameters/itemsPerPage' - $ref: '#/components/parameters/pageNum' - $ref: '#/components/parameters/envelope' - $ref: '#/components/parameters/pretty' responses: '200': content: application/vnd.atlas.2025-03-12+json: schema: $ref: '#/components/schemas/PaginatedAtlasAiModelApiKeysResponse' x-xgen-version: '2025-03-12' description: OK headers: RateLimit-Limit: $ref: '#/components/headers/HeaderRateLimitLimit' RateLimit-Remaining: $ref: '#/components/headers/HeaderRateLimitRemaining' '401': $ref: '#/components/responses/unauthorized' '403': $ref: '#/components/responses/forbidden' '404': $ref: '#/components/responses/notFound' '429': $ref: '#/components/responses/tooManyRequests' '500': $ref: '#/components/responses/internalServerError' summary: Return AI Model API Keys for One Group tags: - AI Model API Keys x-codeSamples: - label: Atlas CLI lang: cURL source: atlas api aiModelApiKeys listGroupModelKeys --help - label: Go lang: go source: "import (\n\t\"os\"\n\t\"context\"\n\t\"log\"\n\tsdk \"go.mongodb.org/atlas-sdk/v20250312001/admin\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tclientID := os.Getenv(\"MONGODB_ATLAS_CLIENT_ID\")\n\tclientSecret := os.Getenv(\"MONGODB_ATLAS_CLIENT_SECRET\")\n\n\t// See https://dochub.mongodb.org/core/atlas-go-sdk-oauth\n\tclient, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret))\n\n\tif err != nil {\n\t\tlog.Fatalf(\"Error: %v\", err)\n\t}\n\n\tparams = &sdk.ListGroupAiModelApiKeysApiParams{}\n\tsdkResp, httpResp, err := client.AIModelAPIKeysApi.\n\t\tListGroupAiModelApiKeysWithParams(ctx, params).\n\t\tExecute()\n}\n" - label: curl (Service Accounts) lang: cURL source: "curl --include --header \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n -X GET \"https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/aiModelApiKeys?pretty=true\"" - label: curl (Digest) lang: cURL source: "curl --user \"${PUBLIC_KEY}:${PRIVATE_KEY}\" \\\n --digest --include \\\n --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n -X GET \"https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/aiModelApiKeys?pretty=true\"" x-rolesRequirements: - Project Read Only x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/AI-Model-API-Keys/operation/listGroupAiModelApiKeys x-xgen-operation-id-override: listGroupModelKeys post: description: Create a new AI model API key for the given group. operationId: createGroupAiModelApiKey parameters: - $ref: '#/components/parameters/groupId' - $ref: '#/components/parameters/envelope' - $ref: '#/components/parameters/pretty' requestBody: content: application/vnd.atlas.2025-03-12+json: schema: $ref: '#/components/schemas/AiModelApiKeyCreateRequest' x-xgen-version: '2025-03-12' description: A request containing the name, cloud, and geography of the new API key. required: true responses: '201': content: application/vnd.atlas.2025-03-12+json: schema: $ref: '#/components/schemas/AiModelApiKeyResponse' x-xgen-version: '2025-03-12' description: Created headers: RateLimit-Limit: $ref: '#/components/headers/HeaderRateLimitLimit' RateLimit-Remaining: $ref: '#/components/headers/HeaderRateLimitRemaining' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/unauthorized' '403': $ref: '#/components/responses/forbidden' '404': $ref: '#/components/responses/notFound' '429': $ref: '#/components/responses/tooManyRequests' '500': $ref: '#/components/responses/internalServerError' summary: Create New AI Model API Key tags: - AI Model API Keys x-codeSamples: - label: Atlas CLI lang: cURL source: atlas api aiModelApiKeys createGroupModelKey --help - label: Go lang: go source: "import (\n\t\"os\"\n\t\"context\"\n\t\"log\"\n\tsdk \"go.mongodb.org/atlas-sdk/v20250312001/admin\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tclientID := os.Getenv(\"MONGODB_ATLAS_CLIENT_ID\")\n\tclientSecret := os.Getenv(\"MONGODB_ATLAS_CLIENT_SECRET\")\n\n\t// See https://dochub.mongodb.org/core/atlas-go-sdk-oauth\n\tclient, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret))\n\n\tif err != nil {\n\t\tlog.Fatalf(\"Error: %v\", err)\n\t}\n\n\tparams = &sdk.CreateGroupAiModelApiKeyApiParams{}\n\tsdkResp, httpResp, err := client.AIModelAPIKeysApi.\n\t\tCreateGroupAiModelApiKeyWithParams(ctx, params).\n\t\tExecute()\n}\n" - label: curl (Service Accounts) lang: cURL source: "curl --include --header \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n --header \"Content-Type: application/json\" \\\n -X POST \"https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/aiModelApiKeys\" \\\n -d '{ }'" - label: curl (Digest) lang: cURL source: "curl --user \"${PUBLIC_KEY}:${PRIVATE_KEY}\" \\\n --digest --include \\\n --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n --header \"Content-Type: application/json\" \\\n -X POST \"https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/aiModelApiKeys\" \\\n -d '{ }'" x-rolesRequirements: - Project Model Owner x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/AI-Model-API-Keys/operation/createGroupAiModelApiKey x-xgen-operation-id-override: createGroupModelKey /api/atlas/v2/groups/{groupId}/aiModelApiKeys/{apiKeyId}: delete: description: Delete an existing AI model API key in the given group. operationId: deleteGroupAiModelApiKey parameters: - $ref: '#/components/parameters/groupId' - $ref: '#/components/parameters/envelope' - $ref: '#/components/parameters/pretty' - description: The id of the API key to be deleted. in: path name: apiKeyId required: true schema: type: string responses: '204': content: application/vnd.atlas.2025-03-12+json: x-xgen-version: '2025-03-12' description: No Content headers: RateLimit-Limit: $ref: '#/components/headers/HeaderRateLimitLimit' RateLimit-Remaining: $ref: '#/components/headers/HeaderRateLimitRemaining' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/unauthorized' '403': $ref: '#/components/responses/forbidden' '404': $ref: '#/components/responses/notFound' '429': $ref: '#/components/responses/tooManyRequests' '500': $ref: '#/components/responses/internalServerError' summary: Delete Existing AI Model API Key tags: - AI Model API Keys x-codeSamples: - label: Atlas CLI lang: cURL source: atlas api aiModelApiKeys deleteGroupModelKey --help - label: Go lang: go source: "import (\n\t\"os\"\n\t\"context\"\n\t\"log\"\n\tsdk \"go.mongodb.org/atlas-sdk/v20250312001/admin\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tclientID := os.Getenv(\"MONGODB_ATLAS_CLIENT_ID\")\n\tclientSecret := os.Getenv(\"MONGODB_ATLAS_CLIENT_SECRET\")\n\n\t// See https://dochub.mongodb.org/core/atlas-go-sdk-oauth\n\tclient, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret))\n\n\tif err != nil {\n\t\tlog.Fatalf(\"Error: %v\", err)\n\t}\n\n\tparams = &sdk.DeleteGroupAiModelApiKeyApiParams{}\n\thttpResp, err := client.AIModelAPIKeysApi.\n\t\tDeleteGroupAiModelApiKeyWithParams(ctx, params).\n\t\tExecute()\n}\n" - label: curl (Service Accounts) lang: cURL source: "curl --include --header \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n -X DELETE \"https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/aiModelApiKeys/{apiKeyId}\"" - label: curl (Digest) lang: cURL source: "curl --user \"${PUBLIC_KEY}:${PRIVATE_KEY}\" \\\n --digest --include \\\n --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n -X DELETE \"https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/aiModelApiKeys/{apiKeyId}\"" x-rolesRequirements: - Project Model Owner x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/AI-Model-API-Keys/operation/deleteGroupAiModelApiKey x-xgen-operation-id-override: deleteGroupModelKey get: description: Retrieve a single AI model API key for the given group. operationId: getGroupAiModelApiKey parameters: - $ref: '#/components/parameters/groupId' - $ref: '#/components/parameters/envelope' - $ref: '#/components/parameters/pretty' - description: The id of the API key to be retrieved. in: path name: apiKeyId required: true schema: type: string responses: '200': content: application/vnd.atlas.2025-03-12+json: schema: $ref: '#/components/schemas/AiModelApiKeyResponse' x-xgen-version: '2025-03-12' description: OK headers: RateLimit-Limit: $ref: '#/components/headers/HeaderRateLimitLimit' RateLimit-Remaining: $ref: '#/components/headers/HeaderRateLimitRemaining' '401': $ref: '#/components/responses/unauthorized' '403': $ref: '#/components/responses/forbidden' '404': $ref: '#/components/responses/notFound' '429': $ref: '#/components/responses/tooManyRequests' '500': $ref: '#/components/responses/internalServerError' summary: Return Single AI Model API Key for One Group tags: - AI Model API Keys x-codeSamples: - label: Atlas CLI lang: cURL source: atlas api aiModelApiKeys getGroupModelKey --help - label: Go lang: go source: "import (\n\t\"os\"\n\t\"context\"\n\t\"log\"\n\tsdk \"go.mongodb.org/atlas-sdk/v20250312001/admin\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tclientID := os.Getenv(\"MONGODB_ATLAS_CLIENT_ID\")\n\tclientSecret := os.Getenv(\"MONGODB_ATLAS_CLIENT_SECRET\")\n\n\t// See https://dochub.mongodb.org/core/atlas-go-sdk-oauth\n\tclient, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret))\n\n\tif err != nil {\n\t\tlog.Fatalf(\"Error: %v\", err)\n\t}\n\n\tparams = &sdk.GetGroupAiModelApiKeyApiParams{}\n\tsdkResp, httpResp, err := client.AIModelAPIKeysApi.\n\t\tGetGroupAiModelApiKeyWithParams(ctx, params).\n\t\tExecute()\n}\n" - label: curl (Service Accounts) lang: cURL source: "curl --include --header \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n -X GET \"https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/aiModelApiKeys/{apiKeyId}?pretty=true\"" - label: curl (Digest) lang: cURL source: "curl --user \"${PUBLIC_KEY}:${PRIVATE_KEY}\" \\\n --digest --include \\\n --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n -X GET \"https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/aiModelApiKeys/{apiKeyId}?pretty=true\"" x-rolesRequirements: - Project Read Only x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/AI-Model-API-Keys/operation/getGroupAiModelApiKey x-xgen-operation-id-override: getGroupModelKey patch: description: Update an existing AI model API key in the given group. Only the name can be updated; scope is immutable after creation. operationId: updateGroupAiModelApiKey parameters: - $ref: '#/components/parameters/groupId' - $ref: '#/components/parameters/envelope' - $ref: '#/components/parameters/pretty' - description: The id of the API key to be updated. in: path name: apiKeyId required: true schema: type: string requestBody: content: application/vnd.atlas.2025-03-12+json: schema: $ref: '#/components/schemas/AiModelApiKeyUpdateRequest' x-xgen-version: '2025-03-12' description: A request containing the new name for the API key. required: true responses: '200': content: application/vnd.atlas.2025-03-12+json: schema: $ref: '#/components/schemas/AiModelApiKeyResponse' x-xgen-version: '2025-03-12' description: OK headers: RateLimit-Limit: $ref: '#/components/headers/HeaderRateLimitLimit' RateLimit-Remaining: $ref: '#/components/headers/HeaderRateLimitRemaining' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/unauthorized' '403': $ref: '#/components/responses/forbidden' '404': $ref: '#/components/responses/notFound' '429': $ref: '#/components/responses/tooManyRequests' '500': $ref: '#/components/responses/internalServerError' summary: Update Existing AI Model API Key tags: - AI Model API Keys x-codeSamples: - label: Atlas CLI lang: cURL source: atlas api aiModelApiKeys updateGroupModelKey --help - label: Go lang: go source: "import (\n\t\"os\"\n\t\"context\"\n\t\"log\"\n\tsdk \"go.mongodb.org/atlas-sdk/v20250312001/admin\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tclientID := os.Getenv(\"MONGODB_ATLAS_CLIENT_ID\")\n\tclientSecret := os.Getenv(\"MONGODB_ATLAS_CLIENT_SECRET\")\n\n\t// See https://dochub.mongodb.org/core/atlas-go-sdk-oauth\n\tclient, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret))\n\n\tif err != nil {\n\t\tlog.Fatalf(\"Error: %v\", err)\n\t}\n\n\tparams = &sdk.UpdateGroupAiModelApiKeyApiParams{}\n\tsdkResp, httpResp, err := client.AIModelAPIKeysApi.\n\t\tUpdateGroupAiModelApiKeyWithParams(ctx, params).\n\t\tExecute()\n}\n" - label: curl (Service Accounts) lang: cURL source: "curl --include --header \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n --header \"Content-Type: application/json\" \\\n -X PATCH \"https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/aiModelApiKeys/{apiKeyId}\" \\\n -d '{ }'" - label: curl (Digest) lang: cURL source: "curl --user \"${PUBLIC_KEY}:${PRIVATE_KEY}\" \\\n --digest --include \\\n --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n --header \"Content-Type: application/json\" \\\n -X PATCH \"https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/aiModelApiKeys/{apiKeyId}\" \\\n -d '{ }'" x-rolesRequirements: - Project Model Owner x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/AI-Model-API-Keys/operation/updateGroupAiModelApiKey x-xgen-operation-id-override: updateGroupModelKey /api/atlas/v2/orgs/{orgId}/aiModelApiKeys: get: description: Retrieve AI model API keys for the given organization. operationId: listOrgAiModelApiKeys parameters: - $ref: '#/components/parameters/orgId' - $ref: '#/components/parameters/itemsPerPage' - $ref: '#/components/parameters/pageNum' - $ref: '#/components/parameters/envelope' - $ref: '#/components/parameters/pretty' responses: '200': content: application/vnd.atlas.2025-03-12+json: schema: $ref: '#/components/schemas/PaginatedAtlasAiModelApiKeysResponse' x-xgen-version: '2025-03-12' description: OK headers: RateLimit-Limit: $ref: '#/components/headers/HeaderRateLimitLimit' RateLimit-Remaining: $ref: '#/components/headers/HeaderRateLimitRemaining' '401': $ref: '#/components/responses/unauthorized' '403': $ref: '#/components/responses/forbidden' '404': $ref: '#/components/responses/notFound' '429': $ref: '#/components/responses/tooManyRequests' '500': $ref: '#/components/responses/internalServerError' summary: Return AI Model API Keys for One Organization tags: - AI Model API Keys x-codeSamples: - label: Atlas CLI lang: cURL source: atlas api aiModelApiKeys listOrgModelKeys --help - label: Go lang: go source: "import (\n\t\"os\"\n\t\"context\"\n\t\"log\"\n\tsdk \"go.mongodb.org/atlas-sdk/v20250312001/admin\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tclientID := os.Getenv(\"MONGODB_ATLAS_CLIENT_ID\")\n\tclientSecret := os.Getenv(\"MONGODB_ATLAS_CLIENT_SECRET\")\n\n\t// See https://dochub.mongodb.org/core/atlas-go-sdk-oauth\n\tclient, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret))\n\n\tif err != nil {\n\t\tlog.Fatalf(\"Error: %v\", err)\n\t}\n\n\tparams = &sdk.ListOrgAiModelApiKeysApiParams{}\n\tsdkResp, httpResp, err := client.AIModelAPIKeysApi.\n\t\tListOrgAiModelApiKeysWithParams(ctx, params).\n\t\tExecute()\n}\n" - label: curl (Service Accounts) lang: cURL source: "curl --include --header \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n -X GET \"https://cloud.mongodb.com/api/atlas/v2/orgs/{orgId}/aiModelApiKeys?pretty=true\"" - label: curl (Digest) lang: cURL source: "curl --user \"${PUBLIC_KEY}:${PRIVATE_KEY}\" \\\n --digest --include \\\n --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n -X GET \"https://cloud.mongodb.com/api/atlas/v2/orgs/{orgId}/aiModelApiKeys?pretty=true\"" x-rolesRequirements: - Organization Read Only x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/AI-Model-API-Keys/operation/listOrgAiModelApiKeys x-xgen-operation-id-override: listOrgModelKeys /api/atlas/v2/orgs/{orgId}/aiModelApiKeys/{apiKeyId}: get: description: Retrieve a single AI model API key for the given organization. operationId: getOrgAiModelApiKey parameters: - $ref: '#/components/parameters/orgId' - $ref: '#/components/parameters/envelope' - $ref: '#/components/parameters/pretty' - description: The id of the API key to be retrieved. in: path name: apiKeyId required: true schema: type: string responses: '200': content: application/vnd.atlas.2025-03-12+json: schema: $ref: '#/components/schemas/AiModelApiKeyResponse' x-xgen-version: '2025-03-12' description: OK headers: RateLimit-Limit: $ref: '#/components/headers/HeaderRateLimitLimit' RateLimit-Remaining: $ref: '#/components/headers/HeaderRateLimitRemaining' '401': $ref: '#/components/responses/unauthorized' '403': $ref: '#/components/responses/forbidden' '404': $ref: '#/components/responses/notFound' '429': $ref: '#/components/responses/tooManyRequests' '500': $ref: '#/components/responses/internalServerError' summary: Return Single AI Model API Key for One Organization tags: - AI Model API Keys x-codeSamples: - label: Atlas CLI lang: cURL source: atlas api aiModelApiKeys getOrgModelKey --help - label: Go lang: go source: "import (\n\t\"os\"\n\t\"context\"\n\t\"log\"\n\tsdk \"go.mongodb.org/atlas-sdk/v20250312001/admin\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tclientID := os.Getenv(\"MONGODB_ATLAS_CLIENT_ID\")\n\tclientSecret := os.Getenv(\"MONGODB_ATLAS_CLIENT_SECRET\")\n\n\t// See https://dochub.mongodb.org/core/atlas-go-sdk-oauth\n\tclient, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret))\n\n\tif err != nil {\n\t\tlog.Fatalf(\"Error: %v\", err)\n\t}\n\n\tparams = &sdk.GetOrgAiModelApiKeyApiParams{}\n\tsdkResp, httpResp, err := client.AIModelAPIKeysApi.\n\t\tGetOrgAiModelApiKeyWithParams(ctx, params).\n\t\tExecute()\n}\n" - label: curl (Service Accounts) lang: cURL source: "curl --include --header \"Authorization: Bearer ${ACCESS_TOKEN}\" \\\n --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n -X GET \"https://cloud.mongodb.com/api/atlas/v2/orgs/{orgId}/aiModelApiKeys/{apiKeyId}?pretty=true\"" - label: curl (Digest) lang: cURL source: "curl --user \"${PUBLIC_KEY}:${PRIVATE_KEY}\" \\\n --digest --include \\\n --header \"Accept: application/vnd.atlas.2025-03-12+json\" \\\n -X GET \"https://cloud.mongodb.com/api/atlas/v2/orgs/{orgId}/aiModelApiKeys/{apiKeyId}?pretty=true\"" x-rolesRequirements: - Organization Read Only x-xgen-docs-url: https://mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/AI-Model-API-Keys/operation/getOrgAiModelApiKey x-xgen-operation-id-override: getOrgModelKey components: parameters: envelope: description: Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body. in: query name: envelope schema: default: false type: boolean itemsPerPage: description: Number of items that the response returns per page. in: query name: itemsPerPage schema: default: 100 maximum: 500 minimum: 1 type: integer pretty: description: Flag that indicates whether the response body should be in the prettyprint format. in: query name: pretty schema: default: false externalDocs: description: Prettyprint url: https://en.wikipedia.org/wiki/Prettyprint type: boolean pageNum: description: Number of the page that displays the current set of the total objects that the response returns. in: query name: pageNum schema: default: 1 minimum: 1 type: integer orgId: description: Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the [`/orgs`](#tag/Organizations/operation/listOrganizations) endpoint to retrieve all organizations to which the authenticated user has access. in: path name: orgId required: true schema: example: 4888442a3354817a7320eb61 pattern: ^([a-f0-9]{24})$ type: string groupId: description: 'Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access. **NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.' in: path name: groupId required: true schema: example: 32b6e34b3d91647abb20e7b8 pattern: ^([a-f0-9]{24})$ type: string schemas: FieldViolation: properties: description: description: A description of why the request element is bad. type: string field: description: A path that leads to a field in the request body. type: string required: - description - field type: object Link: properties: href: description: Uniform Resource Locator (URL) that points another API resource to which this response has some relationship. This URL often begins with `https://cloud.mongodb.com/api/atlas`. example: https://cloud.mongodb.com/api/atlas type: string rel: description: Uniform Resource Locator (URL) that defines the semantic relationship between this resource and another API resource. This URL often begins with `https://cloud.mongodb.com/api/atlas`. example: self type: string type: object PaginatedAtlasAiModelApiKeysResponse: description: List response for AI Model API keys at the organization and project level. properties: links: description: List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. RFC 5988 outlines these relationships. externalDocs: description: Web Linking Specification (RFC 5988) url: https://datatracker.ietf.org/doc/html/rfc5988 items: $ref: '#/components/schemas/Link' readOnly: true type: array results: description: List of returned documents that MongoDB Cloud provides when completing this request. items: $ref: '#/components/schemas/AiModelApiKeyResponse' readOnly: true type: array totalCount: description: Total number of documents available. When `includeCount` is set to `false`, MongoDB Cloud may omit this value or return it when the count is available without additional calculation. The total number is an estimate and may not be exact. format: int32 minimum: 0 readOnly: true type: integer required: - results type: object AiModelApiKeyUpdateRequest: properties: name: description: A new name for the API key. maxLength: 250 minLength: 1 type: string required: - name type: object AiModelApiKeyCreateRequest: properties: cloud: description: Cloud provider scope for this API key. Use "ANY" for a cloud-agnostic scope. Additional cloud values will be supported in future API versions. enum: - ANY type: string writeOnly: true geography: description: Geography scope for this API key. Use "ANY" for a geography-agnostic scope. Additional geography values will be supported in future API versions. enum: - ANY type: string writeOnly: true name: description: A name for the new API key that will be created. maxLength: 250 minLength: 1 type: string required: - cloud - geography - name type: object ApiError: properties: badRequestDetail: $ref: '#/components/schemas/BadRequestDetail' detail: description: Describes the specific conditions or reasons that cause each type of error. type: - string - 'null' error: description: HTTP status code returned with this error. externalDocs: url: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status format: int32 readOnly: true type: integer errorCode: description: Application error code returned with this error. readOnly: true type: string parameters: description: Parameters used to give more information about the error. items: type: object readOnly: true type: array reason: description: Application error message returned with this error. readOnly: true type: - string - 'null' required: - error - errorCode type: object AiModelApiKeyResponse: properties: apiKeyId: description: Identifier used to reference this API key in admin API calls. example: a86r5kwrfsk5r5ku5tgvhmpj readOnly: true type: string cloud: description: Cloud provider scope for this API key. Use "ANY" for cloud-agnostic scope. example: ANY readOnly: true type: string createdAt: description: UTC date when the API key was created. This parameter is formatted as an ISO 8601 timestamp. example: '2026-01-15T16:47:49.855000+00:00' readOnly: true type: string createdBy: description: Name of the user that created this API key. If no user name is available, the user ID is returned. example: John Doe readOnly: true type: string endpoint: description: Server-computed endpoint hostname derived from `cloud` and `geography`. This field is read-only and must not be supplied in request bodies. example: ai.mongodb.com readOnly: true type: string geography: description: Geography scope for this API key. Use "ANY" for geography-agnostic scope. example: ANY readOnly: true type: string groupId: description: ID of the Atlas group this API key belongs to. example: 69681d39c9e8cfd375386316 readOnly: true type: string lastUsedAt: description: UTC date when the API key was last used. This parameter is formatted as an ISO 8601 timestamp. example: '2026-01-15T16:47:49.855000+00:00' readOnly: true type: - string - 'null' maskedSecret: description: A partially obfuscated version of the API key secret returned when the API key was created. example: al-****odu2 readOnly: true type: string name: description: Arbitrary string identifier assigned to this API key for convenient identification. example: Production key maxLength: 250 minLength: 1 type: string secret: description: 'The full API key secret used for interacting with the embedding / reranking service. Note: this will only be fully populated in the response to a create API key request. Responses to get, list, and update requests will not include the secret.' example: al-jZsluhPMzPM9CFXepRWwMwvpZDDra6tZMgoAZKdodu2 format: password readOnly: true type: - string - 'null' status: description: A string describing the current status of the API key. example: ACTIVE readOnly: true type: string type: object BadRequestDetail: description: Bad request detail. properties: fields: description: Describes all violations in a client request. items: $ref: '#/components/schemas/FieldViolation' type: array readOnly: true type: object headers: HeaderRateLimitRemaining: description: The number of requests remaining in the current rate limit window before the limit is reached. schema: type: integer HeaderRateLimitLimit: description: The maximum number of requests that a user can make within a specific time window. schema: type: integer HeaderRetryAfter: description: The minimum time you should wait, in seconds, before retrying the API request. This header might be returned for 429 or 503 error responses. schema: type: integer responses: unauthorized: content: application/json: example: detail: (This is just an example, the exception may not be related to this endpoint) error: 401 errorCode: NOT_ORG_GROUP_CREATOR reason: Unauthorized schema: $ref: '#/components/schemas/ApiError' description: Unauthorized. forbidden: content: application/json: example: detail: (This is just an example, the exception may not be related to this endpoint) error: 403 errorCode: CANNOT_CHANGE_GROUP_NAME reason: Forbidden schema: $ref: '#/components/schemas/ApiError' description: Forbidden. notFound: content: application/json: example: detail: (This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS error: 404 errorCode: RESOURCE_NOT_FOUND reason: Not Found schema: $ref: '#/components/schemas/ApiError' description: Not Found. tooManyRequests: content: application/json: example: detail: (This is just an example, the exception may not be related to this endpoint) error: 429 errorCode: RATE_LIMITED reason: Too Many Requests schema: $ref: '#/components/schemas/ApiError' description: Too Many Requests. headers: RateLimit-Limit: $ref: '#/components/headers/HeaderRateLimitLimit' RateLimit-Remaining: $ref: '#/components/headers/HeaderRateLimitRemaining' Retry-After: $ref: '#/components/headers/HeaderRetryAfter' internalServerError: content: application/json: example: detail: (This is just an example, the exception may not be related to this endpoint) error: 500 errorCode: UNEXPECTED_ERROR reason: Internal Server Error schema: $ref: '#/components/schemas/ApiError' description: Internal Server Error. badRequest: content: application/json: example: detail: (This is just an example, the exception may not be related to this endpoint) No provider AWS exists. error: 400 errorCode: VALIDATION_ERROR reason: Bad Request schema: $ref: '#/components/schemas/ApiError' description: Bad Request. securitySchemes: DigestAuth: scheme: digest type: http ServiceAccounts: description: Learn more about [Service Accounts](https://www.mongodb.com/docs/atlas/api/service-accounts-overview). flows: clientCredentials: scopes: {} tokenUrl: https://cloud.mongodb.com/api/oauth/token type: oauth2 x-externalLinks: - label: Back to Atlas Docs url: https://www.mongodb.com/docs/atlas/ - label: API Changelog url: https://www.mongodb.com/docs/atlas/reference/api-resources-spec/changelog/ x-topics: - content: The MongoDB Atlas Administration API is rate limited. To learn more about rate limiting, see the [Atlas Documentation on Rate Limiting](http://dochub.mongodb.org/core/atlas-api-rate-limit) title: Rate Limiting