# Get API key **GET /users/auth/keys/{api_key_id}** Retrieves the metadata for an API key. ## Servers - https://api.elastic-cloud.com/api/v1: https://api.elastic-cloud.com/api/v1 () ## Parameters ### Path parameters - **api_key_id** (string) The API Key ID. ## Responses ### 200 The API key metadata is retrieved. #### Body: application/json (object) - **id** (string) The API key ID. - **user_id** (string) The user ID. - **organization_id** (string) The organization ID linked to the API key - **description** (string) The API key description. TIP: Useful when you have multiple API keys. - **key** (string) The API key. TIP: Since the API key is returned only once, save it in a safe place. - **creation_date** (string(date-time)) The date/time for when the API key is created. - **expiration_date** (string(date-time)) The date/time when the API key expires. - **role_assignments** (object) Roles assigned to users, API keys or organization invitations. Currently unavailable in self-hosted ECE. ### 404 The {api_key_id} can't be found. (code: `api_keys.key_not_found`) #### Headers - **x-cloud-error-codes** (string) The error codes associated with the response #### Body: application/json (object) - **errors** (array[object]) A list of errors that occurred in the failing request [Powered by Bump.sh](https://bump.sh)