Errors and request limits
Successful requests use the endpoint-specific status code. Errors return JSON with an error code, readable message, and request ID:
{
"error": {
"code": "invalid_request",
"message": "Provide an http or https destination URL.",
"request_id": "req_example"
}
}The same request ID is sent in the X-Request-ID response header. Include it when asking support to investigate a failed request. Error messages can change; use the HTTP status and error.code for program logic.
| Status | Meaning | Typical action |
|---|---|---|
400 | Invalid JSON, field, date, or limit | Correct the request before retrying. |
401 | Missing, invalid, or revoked credentials | Check the server-side key and workspace. |
403 | The key lacks the required scope | Create a key with the needed permission. |
404 | Link is missing or outside the key’s workspace | Check the code and workspace key. |
409 | A custom short code is already in use | Choose a different code. |
500 | The service could not complete the request | Retry carefully; avoid assuming a create request failed before checking for the resulting link. |
GET /v1/links accepts limit from 1 to 100 and currently returns has_more: false; cursor pagination is not implemented. Single-link requests are limited to 1 MiB and bulk requests to 2 MiB. Single and bulk creation accept idempotency keys. Published rate-limit headers are not currently available.