---
title: "Create API key"
method: POST
path: "/v1/api_key"
tags: ["API Keys"]
---

# Create API key

`POST /v1/api_key`

## Request

- Base URL: `https://api.audiodelivery.net`
- URL: `https://api.audiodelivery.net/v1/api_key`
- Auth: HTTP bearer

Generate a new player, uploader, or share API key. Requires an API Access ('api') key; API Access keys themselves must be created in the dashboard.

## Request body

- object
  - `title` string, required: Name of the API key
  - `api_key_type_id` 'player' | 'uploader' | 'share', required: Type of key to create
  - `collection_id` string, uuid: Limit the key to a specific collection
  - `track_id` string, uuid: Limit the key to a specific track (requires collection_id)
  - `creator_id` string, uuid: Limit the key to a specific creator
  - `variants` string[]: Allowed variants. Required (exactly one) for share keys; optional for player keys
  - `expires_at` string, date-time: Optional expiration for all types; ignored for share keys

## Response `200`

API key created. The full key is returned once and never stored in plaintext.

- object
  - `ok` true, required
  - `api_request_id` string, uuid, required
  - `api_key` string: The full API key including org prefix (returned once)

## Other responses

- `400`: Invalid parameters.
- `401`: Missing or invalid API key.
- `403`: Forbidden — API Access keys must be created in the dashboard, or the caller key is not an API Access key

---

[API](https://skmtc.dev/audiodeliverynetwork/apis/audiodn-api.md) · [All operations](https://skmtc.dev/audiodeliverynetwork/apis/audiodn-api/llms.txt) · [OpenAPI document](https://skmtc.dev/audiodeliverynetwork/apis/audiodn-api/revisions/57d355fc6a44?raw)
