Overview
The CardClan Integration API uses standard HTTP status codes and provides detailed error messages to help you troubleshoot issues quickly. This guide covers common errors, their causes, and how to handle them effectively in your applications.HTTP Status Codes
The API uses standard HTTP status codes to indicate the success or failure of requests:2xx Success Codes
2xx Success Codes
200 OK- Request successful, data returned -201 Created- Resource created successfully (e.g., card sent, configuration created)
4xx Client Error Codes
4xx Client Error Codes
400 Bad Request- Invalid request parameters or missing required fields -401 Unauthorized- Invalid or missing authentication credentials -404 Not Found- Requested resource doesn’t exist or user doesn’t have access -409 Conflict- Resource conflict (e.g., integration configuration already exists)
5xx Server Error Codes
5xx Server Error Codes
500 Internal Server Error- Unexpected server error -502 Bad Gateway- Temporary server issue -503 Service Unavailable- Service temporarily unavailable
Error Response Format
All error responses follow a consistent structure:Human-readable error type corresponding to the HTTP status
Detailed error message explaining what went wrong
HTTP status code for the error
ISO 8601 timestamp when the error occurred
Common Errors and Solutions
Authentication Errors
401 - Authorization header with Bearer token required
401 - Authorization header with Bearer token required
401 - Bearer token is empty
401 - Bearer token is empty
Cause: Authorization header present but token value is emptySolution: Ensure your integration key is properly set
404 - Invalid bearer token - user not found
404 - Invalid bearer token - user not found
Cause: Integration key is invalid or has been regeneratedSolution: Generate a new integration key from CardClan dashboard
Validation Errors
400 - Card ID is required
400 - Card ID is required
Cause: Missing
card parameter in request payloadSolution: Include the card ID in your request400 - Integration ID is required
400 - Integration ID is required
Cause: Missing
integrationId parameterSolution: Create integration configuration first, then use the returned ID400 - mergeTags is required and must be a non-empty array
400 - mergeTags is required and must be a non-empty array
400 - Workspace parameter is required
400 - Workspace parameter is required
Cause: Missing workspace query parameter when fetching cardsSolution: Include workspace ID in the query string
Resource Errors
404 - Card not found or you do not have access to this card
404 - Card not found or you do not have access to this card
Cause: Card ID doesn’t exist or user doesn’t have permission to access itSolution: Verify the card exists and belongs to your workspace
409 - Integration configuration already exists
409 - Integration configuration already exists
Cause: Trying to create an integration configuration for a card that already has oneSolution: Get the existing configuration instead
409 - Integration configuration doesn't exist
409 - Integration configuration doesn't exist
Cause: Trying to use an integration ID that doesn’t existSolution: Create the integration configuration first
Next Steps
Now that you have covered the error handling:- Explore examples
- Explore the API reference for detailed endpoint documentation