> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.divert.ly/api-reference/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.divert.ly/_mcp/server. # API Reference ## API Docs - [List domains](https://docs.divert.ly/api-reference/divertly-api/domains/list-domains.md): Divertly API > Domains - [Add a domain](https://docs.divert.ly/api-reference/divertly-api/domains/create-domain.md): Divertly API > Domains - [Fetch a domain](https://docs.divert.ly/api-reference/divertly-api/domains/get-domain.md): Divertly API > Domains - [Delete a domain](https://docs.divert.ly/api-reference/divertly-api/domains/delete-domain.md): Divertly API > Domains - [Enable or disable a domain](https://docs.divert.ly/api-reference/divertly-api/domains/toggle-domain.md): Divertly API > Domains - [Check domain verification](https://docs.divert.ly/api-reference/divertly-api/domains/verify-domain.md): Divertly API > Domains - [Fetch the DNS record to publish](https://docs.divert.ly/api-reference/divertly-api/domains/get-domain-verification-info.md): Divertly API > Domains - [Fetch a domain's risk verdict](https://docs.divert.ly/api-reference/divertly-api/risk/get-domain-risk.md): Divertly API > Risk - [Re-score a domain](https://docs.divert.ly/api-reference/divertly-api/risk/refresh-domain-risk.md): Divertly API > Risk - [Fetch a target's risk verdict](https://docs.divert.ly/api-reference/divertly-api/risk/get-target-risk.md): Divertly API > Risk - [Re-score a target](https://docs.divert.ly/api-reference/divertly-api/risk/refresh-target-risk.md): Divertly API > Risk - [List a domain's routes](https://docs.divert.ly/api-reference/divertly-api/routes/list-routes.md): Divertly API > Routes - [Create a route](https://docs.divert.ly/api-reference/divertly-api/routes/create-route.md): Divertly API > Routes - [Fetch a route](https://docs.divert.ly/api-reference/divertly-api/routes/get-route.md): Divertly API > Routes - [Update a route](https://docs.divert.ly/api-reference/divertly-api/routes/update-route.md): Divertly API > Routes - [Delete a route](https://docs.divert.ly/api-reference/divertly-api/routes/delete-route.md): Divertly API > Routes - [Fetch QR code metadata](https://docs.divert.ly/api-reference/divertly-api/qr-codes/get-route-qr.md): Divertly API > Qr Codes - [Generate a QR code](https://docs.divert.ly/api-reference/divertly-api/qr-codes/create-route-qr.md): Divertly API > Qr Codes - [Delete a QR code](https://docs.divert.ly/api-reference/divertly-api/qr-codes/delete-route-qr.md): Divertly API > Qr Codes - [Download the QR code image](https://docs.divert.ly/api-reference/divertly-api/qr-codes/get-route-qr-image.md): Divertly API > Qr Codes - [List a route's targets](https://docs.divert.ly/api-reference/divertly-api/targets/list-targets.md): Divertly API > Targets - [Add a target](https://docs.divert.ly/api-reference/divertly-api/targets/create-target.md): Divertly API > Targets - [Fetch a target](https://docs.divert.ly/api-reference/divertly-api/targets/get-target.md): Divertly API > Targets - [Update a target](https://docs.divert.ly/api-reference/divertly-api/targets/update-target.md): Divertly API > Targets - [Delete a target](https://docs.divert.ly/api-reference/divertly-api/targets/delete-target.md): Divertly API > Targets - [Fetch an organization](https://docs.divert.ly/api-reference/divertly-api/organizations/get-organization.md): Divertly API > Organizations - [List outbound email](https://docs.divert.ly/api-reference/divertly-api/organizations/list-emails.md): Divertly API > Organizations - [List plan entitlements](https://docs.divert.ly/api-reference/divertly-api/organizations/get-entitlements.md): Divertly API > Organizations - [List assignable roles](https://docs.divert.ly/api-reference/divertly-api/organizations/list-roles.md): Divertly API > Organizations - [List API keys](https://docs.divert.ly/api-reference/divertly-api/api-keys/list-api-keys.md): Divertly API > API Keys - [Create an API key](https://docs.divert.ly/api-reference/divertly-api/api-keys/create-api-key.md): Divertly API > API Keys - [Revoke an API key](https://docs.divert.ly/api-reference/divertly-api/api-keys/delete-api-key.md): Divertly API > API Keys - [List audit events for an organization](https://docs.divert.ly/api-reference/divertly-api/audit/list-organization-audit-events.md): Divertly API > Audit - [List audit events for one user](https://docs.divert.ly/api-reference/divertly-api/audit/list-user-audit-events.md): Divertly API > Audit - [List users](https://docs.divert.ly/api-reference/divertly-api/users/list-users.md): Divertly API > Users - [Invite a user](https://docs.divert.ly/api-reference/divertly-api/users/create-user.md): Divertly API > Users - [Fetch a user](https://docs.divert.ly/api-reference/divertly-api/users/get-user.md): Divertly API > Users - [Update a user](https://docs.divert.ly/api-reference/divertly-api/users/update-user.md): Divertly API > Users - [Delete a user](https://docs.divert.ly/api-reference/divertly-api/users/delete-user.md): Divertly API > Users - [Describe the calling principal](https://docs.divert.ly/api-reference/divertly-api/auth/get-current-principal.md): Divertly API > Auth ## OpenAPI Specification - [OpenAPI JSON](https://docs.divert.ly/openapi.json): raw OpenAPI 3.1 specification for this API, JSON format - [OpenAPI YAML](https://docs.divert.ly/openapi.yaml): raw OpenAPI 3.1 specification for this API, YAML format > **Note:** This page contains both a page directory (above) and the landing page content (below). The page directory is generated for agent use and does not appear on the landing page. > For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.divert.ly/api-reference/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.divert.ly/_mcp/server. # API reference > Overview of the Divertly REST API: base URL, authentication, response format, pagination, and links to every endpoint. The Divertly API lets you do everything the dashboard does from your own code: add domains, create routes, add targets, change weights, generate QR codes, and manage your organization. ## Basics | | | | -------------- | ------------------------------------------- | | Base URL | `https://api.divert.ly/v1` | | Authentication | `Authorization: Key ` | | Format | JSON requests and responses | Successful responses are wrapped in a `body` field. List endpoints that paginate also return a `meta` block, and accept `page` (1-based) and `size` (1–256, default 20). Errors return `{ "error": "", "meta": { "errorCode": "" } }`. ```bash curl https://api.divert.ly/v1/whoami \ -H "Authorization: Key $CREDENTIAL" ``` ## Where to go next * [Authentication](/docs/developers/authentication): create a key and sign requests. * [API Guide](/docs/developers/api-guide): envelope, pagination, and notes on specific endpoints. * [Manage Routes with the API](/docs/user-guides/manage-routes-with-the-api): a walkthrough of common tasks. * [Rate Limits & Errors](/docs/developers/rate-limits-errors): limits and the full error code list. ## Explore the endpoints The endpoints below are grouped by resource. Use the interactive explorer on any endpoint page to try a request with your own API key. > **Note** > > Official SDKs for Python, JavaScript, and Go are coming soon. Until then, the API is plain HTTP and works with any client. See [SDKs](/docs/developers/sdks).