API Overview
Everything you need to know before making your first API request.
Base URL
All API endpoints are prefixed with /v1/. Use the following base URL for all requests:
https://api.audiodelivery.net/v1/ Authentication
All API requests require authentication via a Bearer token in the Authorization header. If you're using ADN web components with a Client-Side API key, the components handle authentication automatically — this section applies to direct API requests.
Authorization: Bearer your_api_key_here API Key Types
| Key type | Use case | Security |
|---|---|---|
| API Access | Server-to-server requests — create sessions, manage tracks, configure variants | Keep secret. Never expose in client-side code. |
| Client-Side | Web components and mobile apps — play audio, upload files | Safe to include in front-end code. Scoped to playback and upload operations only. |
Creating API Keys
Request Format
All request and response bodies use JSON. Include the Authorization header on every request, and set Content-Type: application/json when sending a request body. Here's an example creating a play session across every platform:
Example Request
curl -X POST "https://api.audiodelivery.net/v1/play_session/collection" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"collection_id": "COLLECTION_ID", "variants": ["hq", "lq"]}' Responses
Successful responses include "ok": true along with the requested data. Errors return "ok": false with a message and a unique request ID for debugging:
Success
{
"ok": true,
...
} Error
{
"ok": false,
"message": "Description of what went wrong",
"api_request_id": "uuid"
} HTTP Status Codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad request — check the request body or parameters |
| 401 | Unauthorized — missing or invalid API key |
| 403 | Forbidden — the API key doesn't have permission for this operation |
| 404 | Not found — the resource doesn't exist or isn't accessible |
| 410 | Gone — the session has expired |
| 500 | Internal server error — retry or contact support |
Pagination
List endpoints return all matching records. For large collections, filter by collection_id or creator_id to scope results.
IDs & Formats
All resource IDs are UUIDs (e.g. 04ea3a34-a0f7-45e8-a711-9c7274490e2e). Timestamps are returned as ISO 8601 strings in UTC.