Skip to main content

Errors

The Tess AI API uses conventional HTTP response codes to indicate the success or failure of an API request. In general:

  • Codes in the 2xx range indicate success
  • Codes in the 4xx range indicate an error that failed given the information provided
  • Codes in the 5xx range indicate an error with our servers (these are rare)

HTTP Status Codes

Status CodeDescriptionCommon Causes
200Success - The request was successfulRequest completed as expected
201Created - The resource was successfully createdNew webhook created successfully
400Bad Request - The request was invalidMissing required fields, invalid parameter values
403Forbidden - Authentication failedInvalid API key, expired token, insufficient permissions
429Rate Limited - Too many requestsExceeded API rate limits
500Internal Server Error - Server issueUnexpected server error (please contact support)

Error Types and Examples

Authentication Errors (403)

These errors occur when there's a problem with your API key:

{
"error": "Invalid authentication"
}

Common causes:

  • Invalid API key
  • Expired API key
  • Missing Authorization header
  • Insufficient permissions

Validation Errors (400)

Occur when the request data doesn't meet the requirements:

{
"error": "Validation failed",
"messages": {
"url": ["The url field must be a valid HTTPS URL"],
"method": ["The method must be one of: POST, GET"]
}
}

Common validation rules:

  • Webhooks
    • URL must be a valid HTTPS URL
    • Method must be either POST or GET
    • Status must be either "active" or "inactive"
  • Files
    • File must be provided for upload
    • Process flag is optional (default: false)
  • Workspace
    • x-workspace-id header must be a valid integer when provided

Rate Limit Errors (429)

Occur when you've exceeded the API rate limits:

{
"error": "Rate limit exceeded",
"retry_after": 60
}

Server Errors (500)

Indicate an issue on our end:

{
"error": "Internal server error"
}