---
title: "Get API keys for the organization"
method: GET
path: "/v1/{organization}/organization/api_key/"
tags: ["Organization"]
---

# Get API keys for the organization

`GET /v1/{organization}/organization/api_key/`

Get all API keys for the organization.

#### Permissions
This endpoint is impacted by the following permissions:
* Only API keys that the authenticated user has the `Organization:GetAPIKey` permission for are returned.

## Path parameters

- `organization` string, required

## Headers

- `x-mongo-cluster-name` string, nullable — The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
- `Sec-WebSocket-Protocol` string[]

## Response `200`

Succeeded.

- SrcAppEndpointsOrganizationGetApiKeysResponse
  - `api_keys` APIKeyInstance[], required — The list of API keys for the organization.
    - `_id` string, required
    - `name` string, nullable, required — The name of the API key.
    - `org_id` string, required — The ID of the organization.
    - `created_at` string, date-time, required — The UTC time at which this key was created.
    - `updated_at` string, date-time, required — The UTC time at which this key was last updated.
    - `key_id` string, required — The ID of the API key. Instead of the key's Mongo ID, this UUID is used as the identifier for the key for backwards compatibility reasons.
    - `expires_at` string, date-time, required — The UTC time at which this key will expire.
    - `creator` AmigoLibMongoCollectionsApiKeyAPIKeyUserInfo, required
      - `user_id` string, required — The user ID of the creator of this key.
      - `org_id` string, required — The organization ID of the creator of this key.
    - `role_id` string, required — The role ID of the creator of this key.

## Other responses

- `401` — Invalid authorization credentials.
- `403` — Missing required permissions.
- `404` — The organization does not exist.
- `422` — Invalid request path parameter failed validation.
- `429` — The user has exceeded the rate limit of 10 requests per minute for this endpoint.
- `503` — The service is going through temporary maintenance.

---

[API](https://skmtc.net/amigo/apis/amigo-api.md) · [All operations](https://skmtc.net/amigo/apis/amigo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/amigo/amigo-api/revisions/f0f28319e448/schema)
