Error Handling

Learn how to handle errors from the Shortify API.

Error Response Format

Error responses always include success: false. Depending on endpoint, the message may be returned in msg or error.

400
Example Error Response (msg)
{
  "success": false,
  "msg": "ShortLink is Required"
}
400
Example Error Response (error)
{
  "success": false,
  "error": "Header Key is Required"
}

HTTP Status Codes

The Shortify API uses standard HTTP status codes to indicate success/failure. Some validation cases currently return success: false with HTTP 200 (for example, slug conflicts).

Status CodeDescription
200OK - Request successful, or endpoint-specific validation failure
400Bad Request - Missing required fields
401Unauthorized - API key missing/blocked by gateway
404Not Found - Workspace/app/link not found
500Internal Server Error - Unhandled parsing/validation errors