Overview
When your custom integrations hit rate limits or token issues, you’ll see 429 or 401 errors. This article shows you how to diagnose and resolve them.
Procedure
Check your integration logs for HTTP status codes:
429 Too Many Requests → you’re hitting the rate limit.
401 Unauthorized → your API token is invalid or expired.
For 429 errors:
Implement exponential backoff (retry after Retry-After header seconds).
Distribute calls more evenly (e.g. batch small exports rather than one large).
For 401 errors:
Verify your API token under Profile → API Keys.
If expired, generate a new token and update your integration.
Test with a simple GET /api/v1/lead-contacts call in Postman or curl to isolate the issue.
Tips
Cache frequent GET requests locally to reduce API load.
Rotate API tokens quarterly and store them in a secure vault (not code).
Monitor your usage dashboard (if available) to forecast when you’ll hit limits.
Troubleshooting / FAQs
429 errors despite spacing calls: You may have concurrent scripts; check all clients using the same token.
401 errors after token update: Ensure you restarted your integration service with the new token.
Unknown error codes: Refer to Laywork API docs or enable verbose logging for full HTTP responses.