request_invalid
HTTP 400Bad Request
The request was malformed, or well-formed but semantically invalid.
This code covers several statuses. 400 means the request could not be parsed — bad parameters, an unparseable body, or a structurally malformed filter tree. 422 means the request parsed but was rejected on its meaning: an unknown property, an unsupported operator, a filter nested too deeply. 405, 406 and 415 cover the wrong method, an unsupported Accept, and an unsupported body media type.
When more than one problem is found, the response carries an errors array listing each {field, detail, reason}.
Response shape
Section titled “Response shape”{ "type": "https://api-docs.ahoy.ai/rest/v1/errors/request_invalid", "title": "Bad Request", "status": 400, "detail": "Unknown property 'emial' on object type 'ahoy_contact'.", "code": "request_invalid", "request_id": "req_01J8Z2K9QW3X4Y5Z6A7B8C9D"}reason sub-codes
Section titled “reason sub-codes”A reason narrows request_invalid to a specific cause. New values are additive and never require a version bump, so treat an unrecognised reason as the bare request_invalid.
reason | Meaning |
|---|---|
unknown_property | A property named in the filter, sort, or properties selection does not exist on this object type. |
operator_not_supported | The filter operator is not valid for that property’s field type. |
invalid_filter | The filter value did not match the property’s field type — for example a bare number against a currency property. |
filter_too_deep | The filter tree nests deeper than 8 levels. |
too_many_filter_groups | The filter tree contains too many $and/$or groups. |
unsupported_aggregation | The requested aggregation is not available for that property’s field type. |
unsupported_sort | The property cannot be sorted on. |
malformed_id | The record id in the path is not a well-formed id. |
cursor_invalid | The pagination cursor was not recognised. Cursors are opaque — pass back exactly what pagination.next_cursor returned. |
schema_invalid | The request body failed validation against the object type’s schema. |
pipeline_rejected | The CRM write pipeline rejected the event. |
association_target_unknown | The association target is unknown, deleted, or not readable by this credential. |
invalid_matching_property | matching_property is missing, null, or not a readable property. |
empty_batch | The batch contained no items. |
batch_too_large | The batch exceeded the maximum number of items. |
How to resolve it
Section titled “How to resolve it”- Read the
fieldmember — it is an RFC 6901 JSON Pointer to the exact offending part of the request. - Check
GET /rest/v1/objects/{object_type}/for the properties this type actually has. - Check
GET /rest/v1/field_types/for which operators and aggregations each field type supports.