API Documentation
Drop to CDN REST API reference. Upload files, get CDN URLs, manage retention — authenticate with Bearer API keys.
The Drop to CDN REST API lives at https://api.droptocdn.com/v1. Authenticate with a Bearer API key, POST a file as multipart/form-data, and get back a public CDN URL. The machine-readable OpenAPI spec is at https://api.droptocdn.com/v1/openapi.json.
API quick start
Authenticate with a Bearer API key and upload your first file.
- Create an API key in Dashboard → Settings — keys start with dtc_.
- Send Authorization: Bearer dtc_YOUR_API_KEY on every request.
- POST a file as multipart/form-data to https://api.droptocdn.com/v1/files.
- The response returns id, url, expires_at, size, mime_type, and original_name.
REST API reference
Interactive OpenAPI documentation for all endpoints.
- POST /v1/files — upload a file, optionally with retention_days or never_expire.
- GET /v1/files — list your files with limit and cursor pagination.
- GET /v1/files/{id} — fetch metadata for one file.
- DELETE /v1/files/{id} — delete a file and its CDN URL.
- GET /v1/profile — return the authenticated account, used by integrations to test credentials.
- GET /v1/openapi.json — the machine-readable OpenAPI 3.1 specification.
Error responses
Every API error is JSON, never an HTML page.
- Errors return an object with error, code, message, status, hint, and docs fields.
- code is a stable machine-readable string such as not_found, unauthorized, or quota_exceeded.
- hint explains how to resolve the error; docs links back to this page.