Limits in Zoho CRM GraphQL APIs
Like our REST APIs, our GraphQL API calls also consume credits based on the type and number of resources queried. Maximum allowed credits per call is 10 credits.
Complexity for each query is calculated based on the type and number of resources requested, and maximum allowed complexity is 1,000 per query.
Depth refers to the number of nesting layers of a field. Depth up to seven for metadata and three for records is allowed.
Handling Errors
Zoho CRM REST APIs return 200 status codes for every successful API call. Each API error has these sections:
- Status Code
- Error Code
- Message
Different sections of an error responseHere "resource_path_index": 0 in the response indicates which segment of the URL path contains the error, counting after the API version.
Common Errors
- 400 Bad Request:
- INVALID_MODULE
- Cause: Incorrect module name (e.g., "Lead" vs "Leads").
- Fix: Use exact API names from Setup > Developer Space > APIs.
- INVALID_DATA
- Cause: Malformed JSON/wrong data type.
- Fix: Validate field formats.
- DUPLICATE_DATA
- Cause: Unique field value exists elsewhere.
- Fix: Disable "Do not allow duplicates" or change value.
- MANDATORY_NOT_FOUND
- Cause: Missing required field (e.g., Last_Name in Contacts while trying to insert a new record in Contacts module).
- Fix: Include all mandatory fields in the request.
- 401 Unauthorized:
- AUTHENTICATION_FAILED
- Cause: Wrong domain URL .
- Fix: Use the correct domain-specific URL.
- INVALID_TOKEN:
- Cause: Expired OAuth token is used for making API call.
- Fix: Refresh access token using the refresh token.
- 403 Forbidden:
- NO_PERMISSION
- Cause: User lacks permission for the resource.
- Fix: Obtain necessary permission to access the resource.
- 404 Not Found:
- INVALID_URL_PATTERN
- Cause: URL syntax error.
- Fix: Verify endpoint structure in API docs.
- 429 Too Many Requests:
- TOO_MANY_REQUESTS
- Cause: Number of API requests for the 24 hour period is exceeded or the concurrency/sub-concurrency limit of the user for the app is exceeded.
- Fix: Make calls in accordance with the limits.
- 207 Multi-Status:
- In some cases when the API is partially successful, 207 status code is returned.
Tips
- Mandatory Fields: Provide all mandatory fields in the response body.
- OAuth Issues: Ensure correct scopes.
- Inspect Every Response Body: Parse responses even if the HTTP status code returned is 2XX.
- Validate Data Before Calling: Ensure your request matches the expected format. Clean data before submission to prevent 400-range errors (e.g., MANDATORY_NOT_FOUND, DUPLICATE_DATA).
- Token Issues: Respond to INVALID_TOKEN with a token refresh workflow.
Error Status Code in GraphQL APIs
Zoho CRM GraphQL APIs return errors in 200 and 400 status codes depending on error type. 200 HTTP status codes are returned in two cases.
(a) Issue in the input when validated against the schema .
(b) Runtime errors due to credits, depth, and so on.
We hope you found this post useful. We will be back next week to answer another query we received.
Let us know if you have any questions in the comments or drop us an email at
support@zohocrm.com.