Error Codes

All HTTP errors the API can return

400

400 Bad Request

The request has validation errors or missing required fields.

Common causes:

  • β€’Missing 'template' parameter
  • β€’Empty required fields
  • β€’URL doesn't use HTTPS protocol
  • β€’Invalid email format
  • β€’Color not in hexadecimal format
  • β€’Text exceeds maximum allowed length

Example

Request:

{
  "template": "basic",
  "email": "invalid-email",
  "imageUrl": "http://example.com/image.jpg"
}

Response:

email: Invalid email address
404

404 Not Found

The requested template does not exist.

Common causes:

  • β€’Incorrect template name
  • β€’Valid templates: basic, promotional, event, certificate, summering

Example

Request:

{
  "template": "invalid-template"
}

Response:

Template "invalid-template" not found
500

500 Internal Server Error

Internal server error.

Common causes:

  • β€’Error loading Google fonts
  • β€’Error processing image
  • β€’Retry in a few seconds

Example

Response:

Error generating preview