Errors and Validation
Public API v2 returns a consistent error envelope for requests under/api/v2.
Error fields
| Field | Meaning |
|---|---|
status_code | HTTP status code mirrored in the response body |
error_type | Broad category, such as validation_error, not_found, or forbidden |
code | Machine-readable error code |
message | Human-readable summary |
details | Optional structured data that varies by error code |
Common error types
| HTTP status | error_type | Common causes |
|---|---|---|
400 | validation_error | Unknown field, invalid filter, invalid value, unsupported sub-resource, invalid cursor, or out-of-range limit |
401 | unauthorized | Missing, invalid, or expired API key |
403 | forbidden | API key does not have the required permission |
404 | not_found | Record, record type, or relationship does not exist |
405 | method_not_allowed | The resource is read-only or the endpoint does not support that method |
409 | conflict | A match request found more than one possible record |
413 | payload_too_large | Request body exceeds the allowed size |
415 | unsupported_media_type | Request body is not JSON |
422 | unprocessable | Request is structurally valid but cannot be applied, such as a blocked stage transition |
429 | rate_limited | Too many requests |
500 | internal_error | Server-side failure |
Recovery guide
code | What to check before retrying |
|---|---|
unknown_field | Verify the field API name with GET /api/v2/_schema/{record_type}. |
field_not_creatable | Remove read-only, computed, or system-managed fields from create requests. |
field_not_updatable | Remove read-only, computed, or system-managed fields from patch requests. |
field_required_missing | Include required create fields. Opportunity create requests require display_name, stage, and account_id; contact create requests require stage. |
field_value_invalid | Check the field’s value type and write shape. |
invalid_filter_field | Confirm the field is filterable for this record type. |
invalid_filter_operator | Use an operator compatible with the field value type. |
invalid_filter_value | Coerce the filter value into the expected type before retrying. |
invalid_cursor | Restart pagination from the first page with the same filter and sort. |
target_record_not_found | Re-query or create the target record before writing a reference or relationship. |
ambiguous_match | Match by ID or choose a more specific unique field. |
unknown_relationship | Verify the relationship API name with schema introspection. |
stage_entrance_criteria_not_met | Fix the missing stage prerequisites before retrying. |
rate_limit_exceeded | Retry with backoff and reduce request concurrency. |
Validation examples
Unknown fields are rejected:Query limits
_query endpoints default to limit: 50. The accepted range is 1 through 500.
If a query response includes next_cursor, pass it back in the next request: