Error Codes
All errors return JSON. Format depends on the error type.
HTTP status codes
| Code | Name | When |
|---|---|---|
400 | Bad Request | Tariff limit reached |
401 | Unauthorized | Missing or invalid token |
404 | Not Found | Resource does not exist |
422 | Unprocessable Content | Validation error or plan restriction |
400 — Bad Request
Returned when a tariff/plan limit is exceeded.
{
"message": "Reached the limit"
}To view your plan limits, visit linx.ly/pricing (opens in a new tab).
401 — Unauthorized
Returned when the Bearer token is missing or invalid.
{
"message": "Unauthenticated."
}⚠️
Include a valid Authorization: Bearer <token> header on every request.
404 — Not Found
Returned when the requested resource does not exist or does not belong to the authenticated user.
{
"message": "Not found."
}422 — Unprocessable Content
Returned for validation errors or plan restrictions. Always includes an errors object.
{
"message": "The short code has already been taken.",
"errors": {
"short_code": [
"The short code has already been taken."
]
}
}Common 422 cases:
| Field | Message |
|---|---|
short_code | The short code has already been taken. |
destination_url | You cannot edit destination url under your current plan. |