Skip to main content

Error Response Format

When an API request fails, Creem returns a JSON error response:
The trace_id is included in every error response. Include it when contacting support for faster debugging.

HTTP Status Codes

Common Error Scenarios

Authentication Errors (403 Forbidden)

Returned when the API key is missing, invalid, or doesn’t have permission for the requested resource.
How to fix:
  • Verify your API key in the dashboard
  • Ensure the x-api-key header is included in your request
  • Check you’re using the correct key for the environment (test vs. production)

Validation Errors (400 Bad Request)

Returned when request parameters are missing or invalid.
How to fix:
  • Check the message array for specific validation errors
  • Verify all required fields are included
  • Ensure data types match the expected format

Resource Not Found (404)

Returned when the requested resource doesn’t exist.
How to fix:
  • Verify the resource ID is correct
  • Ensure you’re using the right environment (test vs. production resources are separate)
  • Check if the resource was deleted

Duplicate Resource (400 Bad Request)

Returned when trying to create a resource that already exists.
How to fix:
  • Use a unique identifier for idempotent requests
  • Check if the resource already exists before creating

Handling Errors in Code

TypeScript SDK

cURL

Environments

Make sure you’re using the correct base URL:
Test mode API keys only work with test-api.creem.io, and production keys only work with api.creem.io.

Need Help?

If you’re experiencing issues:
  1. Check the trace_id in your error response
  2. Join our Discord community for quick help
  3. Contact support with your trace ID for faster debugging