Skip to navigation

Rate Limits & Errors

How often you can call the API, and what a failed call looks like.
View as Markdown

Rate limits

Rate limits apply to every authenticated request, counted against a calls-per-minute (CPM) allowance over a rolling 60-second window:

CredentialPlanLimit
API keyFree90 CPM
API keyPaid180 CPM
Session token (the dashboard)—60 CPM

These limits may change without notice, to keep the platform available for everyone. Treat the numbers above as current guidance, not a guarantee — call the entitlements endpoint below for the authoritative, live value.

To see your organization’s current allowance, call:

curl https://api.divert.ly/v1/organizations/{org_id}/entitlements \
-H "Authorization: Key $CREDENTIAL"

The response includes rateLimitCpm — the number of calls your organization may currently make per minute.

If you go over the allowance, the request is refused with 429 Too Many Requests, and the key is placed into a 60-second cooldown. During the cooldown, every request from that key is refused immediately, without waiting to see whether it would have fit inside the allowance.

Dashboard session tokens are limited to 60 calls per minute. If you’re building an integration, use an API key.

If you’re building an integration that calls the API on a schedule, back off for at least 60 seconds after a 429 before retrying, and check rateLimitCpm if you’re not sure how much headroom you have.

The error envelope

Every failed request returns the same shape:

{
"error": "invalid or missing authentication",
"meta": {
"errorCode": "E1740"
}
}

error is a short, human-readable message. Its wording can change between releases, so don’t match against it in code. errorCode is stable and machine-readable — use it to detect specific failure conditions.

HTTP status codes

StatusMeaning
400 Bad RequestThe request body or parameters failed validation.
401 UnauthorizedThe credential is missing, malformed, or invalid.
403 ForbiddenThe credential is valid, but its role doesn’t permit this action.
404 Not FoundNo resource matches the given ID, or the path doesn’t exist.
409 ConflictA resource with that identifier already exists.
429 Too Many RequestsThe rate limit described above was exceeded.
500 Internal Server ErrorAn unexpected error occurred. The error is logged; retrying later is safe.
501 Not ImplementedThe endpoint exists but isn’t implemented yet.

Error code reference

The tables below list the errorCode values you can expect to see from the documented endpoints, grouped by the part of the API that produced them.

Authentication and authorization

CodeMeaning
E1690The Authorization header is missing.
E1700The Authorization header isn’t in the expected format.
E1710The credential wasn’t sent with a recognized scheme.
E1740The credential is invalid or has expired.
E3300No authenticated credential was found on the request.
E3310The credential’s role doesn’t permit this action.
E3400The rate limit was exceeded.

Organizations and users

CodeMeaning
E1035The authenticated user no longer exists.
E1036The authenticated user’s organization no longer exists.
E1330No organization was found with that ID.
E1335The organization ID in the request doesn’t match the authenticated organization.
E1340The organization’s data couldn’t be retrieved.
E1230The new user request failed validation.
E1231The new user’s email address was rejected.
E1240The new user couldn’t be created.
E1250The user was created, but the welcome email couldn’t be sent.
E1260The list of users couldn’t be retrieved.
E1270The user couldn’t be deleted.
E1280No user was found with that ID.
E1290The user update request failed validation.
E1300The user couldn’t be updated.
E1310The user’s audit events couldn’t be retrieved.
E1320The organization’s audit events couldn’t be retrieved.
E1325The organization’s emails couldn’t be retrieved.
E1820The organization’s entitlements couldn’t be retrieved.

API keys

CodeMeaning
E3200The new API key request failed validation.
E3210The new API key couldn’t be issued.
E3220The list of API keys couldn’t be retrieved.
E3230The API key deletion request failed validation.
E3240The API key couldn’t be deleted.
E3250The requested role exceeds what you’re allowed to grant.

Domains

CodeMeaning
E1350The list of domains couldn’t be retrieved.
E1360The new domain request failed validation.
E1365The domain couldn’t be checked against the blocklist.
E1636The domain matched a blocklist entry and can’t be added.
E1370The domain couldn’t be created.
E1380No domain was found with that ID.
E1390The domain deletion request failed validation.
E1395The domain couldn’t be deleted.
E1400 / E1410The domain to verify couldn’t be found.
E1420Domain verification failed — the required DNS record wasn’t found.
E1430The TXT verification record didn’t match the expected value.
E1440The domain’s verified status couldn’t be saved.
E1450The domain’s enabled state couldn’t be changed.

Routes

CodeMeaning
E1460The list of routes couldn’t be retrieved.
E1470The new route request failed validation.
E1480The route couldn’t be created.
E1490The route update request failed validation.
E1500The route couldn’t be updated.
E1510No route was found with that ID.
E1520The route couldn’t be deleted.
E3410No route matched the request path.

Targets

CodeMeaning
E1530The list of targets couldn’t be retrieved.
E1540The new target request failed validation.
E1571The target URL’s scheme must be http or https.
E1550The target couldn’t be created.
E1560No target was found with that ID.
E1570The target update request failed validation.
E1580The target couldn’t be updated.
E1590The target couldn’t be deleted.

Risk

CodeMeaning
E3450The risk service couldn’t be reached. Try again shortly.
E3460The domain was refused because the risk service flagged it.
E3480The stored risk verdict couldn’t be retrieved.
E3490The subject couldn’t be re-scored on demand.

QR codes

CodeMeaning
E2100The route for this QR code couldn’t be found.
E2110The domain for this QR code couldn’t be found.
E2120The QR code couldn’t be generated.
E2130 / E2140The QR code couldn’t be written.
E2150No QR code was found.
E2160 / E3190The QR code couldn’t be deleted.
E2170The QR code couldn’t be saved.
E2180The QR code couldn’t be retrieved.

General

CodeMeaning
E3430The request was malformed.
E3440An unexpected error occurred.