Error Response Format
HTTP Status Codes
The API uses standard HTTP status codes to indicate the success or failure of requests.| Status Code | Meaning |
|---|---|
200 | Success - Request completed successfully |
400 | Bad Request - Invalid request parameters or body |
401 | Unauthorized - Missing or invalid authentication |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource not found |
405 | Method Not Allowed - HTTP method not allowed |
409 | Conflict - Resource conflict (e.g., duplicate) |
415 | Unsupported Media Type - Invalid content type |
422 | Unprocessable Entity - Request valid but cannot be processed |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error - Server error |
503 | Service Unavailable - Service temporarily unavailable |
504 | Gateway Timeout - Gateway timeout |
Error Codes
Authentication Errors
Missing or invalid API key, or incorrect authentication method for the endpoint.
Valid authentication but insufficient permissions to access the resource.
Validation Errors
Request has invalid parameters, missing required fields, or malformed JSON.
Request is well-formed but cannot be processed due to business logic constraints.
Resource Errors
The requested resource does not exist.
Resource already exists or conflicts with another resource.
Rate Limiting
Too many requests sent in a given time period. Slow down and retry after the specified time.
Server Errors
An unexpected error occurred on the server.
Service is temporarily unavailable, usually due to maintenance.
Error Handling Best Practices
Always check HTTP status codes
Always check HTTP status codes
Before parsing the response body, check the HTTP status code to determine if the request was successful.
Implement retry logic for transient errors
Implement retry logic for transient errors
For 5xx errors and rate limiting (429), implement exponential backoff retry logic.
Log errors for debugging
Log errors for debugging
Log error codes and messages to help with troubleshooting.
Provide user-friendly error messages
Provide user-friendly error messages
Don’t expose raw error messages to end users. Translate technical errors into user-friendly messages.
Common Error Scenarios
Holder Not Found
This error occurs when trying to access a holder that doesn’t exist:POST /v0/end-users.
Invalid API Key
This error occurs when the API key is missing, malformed, or invalid:- Verify your API key is correctly set in the
Authorizationheader - Ensure the key starts with
karma_ - Regenerate your API key if it may have been compromised
KYC Not Approved
This error occurs when trying to create resources for a user whose KYC is not yet approved:GET /v0/end-users/:externalUserId/kyc-links.
Need Help?
If you encounter persistent errors or need assistance:- Email: [email protected]
- Telegram: t.me/karmawallet
- Check the API Reference for endpoint-specific documentation
- Review the Quickstart Guide for integration examples
