---
title: "Create admin API key"
method: POST
path: "/organization/admin_api_keys"
---

# Create admin API key

`POST /organization/admin_api_keys`

Create an organization admin API key

## Request body

- object
  - `name` string, required
  - `expires_in_seconds` integer — The number of seconds until the API key expires. Omit this field for a key that does not expire.

## Response `200`

The newly created admin API key.

- AdminApiKeyCreateResponse — The newly created admin API key. The `value` field is only returned once, when the key is created.
  - `object` 'organization.admin_api_key', required — The object type, which is always `organization.admin_api_key`
  - `id` string, required — The identifier, which can be referenced in API endpoints
  - `name` string, nullable — The name of the API key
  - `redacted_value` string, required — The redacted value of the API key
  - `created_at` integer, required — The Unix timestamp (in seconds) of when the API key was created
  - `expires_at` integer, nullable, required — The Unix timestamp (in seconds) of when the API key expires
  - `last_used_at` integer, nullable — The Unix timestamp (in seconds) of when the API key was last used
  - `owner` object, required
    - `type` string — Always `user`
    - `object` string — The object type, which is always organization.user
    - `id` string — The identifier, which can be referenced in API endpoints
    - `name` string — The name of the user
    - `created_at` integer — The Unix timestamp (in seconds) of when the user was created
    - `role` string — Always `owner`
  - `value` string, required — The value of the API key. Only shown on create.

---

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