# 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.

## More from Drop to CDN

- [Home](https://droptocdn.com/)
- [Pricing](https://droptocdn.com/pricing)
- [API Docs](https://droptocdn.com/docs)
- [Image to CDN](https://droptocdn.com/image-to-cdn)
- [Video to CDN](https://droptocdn.com/video-to-cdn)
- [PDF to CDN](https://droptocdn.com/pdf-to-cdn)
- [n8n Integration](https://droptocdn.com/integrations/n8n)
- [Zapier Integration](https://droptocdn.com/integrations/zapier)
- [Make Integration](https://droptocdn.com/integrations/make)
- [Activepieces Integration](https://droptocdn.com/integrations/activepieces)
- [MCP (Cursor, Claude)](https://droptocdn.com/integrations/mcp)
- [CLI (agents & terminal)](https://droptocdn.com/integrations/cli)
- [Buffer Integration](https://droptocdn.com/integrations/buffer)
- [Loom to CDN](https://droptocdn.com/loom-to-cdn)
- [Privacy Policy](https://droptocdn.com/privacy)
- [Terms of Service](https://droptocdn.com/terms)

- [Site index for agents (llms.txt)](https://droptocdn.com/llms.txt)
- [XML sitemap](https://droptocdn.com/sitemap.xml)
- [OpenAPI specification](https://api.droptocdn.com/v1/openapi.json)

---

Canonical HTML page: https://droptocdn.com/docs
