The search query object,
q, allows you to filter the results of certain
GET endpoints based on specific parameters. For example, you can use the
q query object to filter for contacts that have been updated in Front after a certain date, or to return a list of conversations that have an unassigned status. Using this query object allows you to return just the results you're looking for.
The query object is passed as a query string parameter with the value
q, the name of the parameter you are filtering for included in brackets, and the value of the parameter you are filtering for included after an equals sign. The query parameters available to filter on vary depending on the endpoint, but you can refer to the API reference documentation for the endpoint-specific parameters.
You can include multiple query objects within the same request.
You can include multiple values for the same parameter.
The following code block shows a request to the List events endpoint that includes query object filters to identify conversations that have been archived within a certain time period.
- The query object is used to filter for events that occur between Saturday Apr 09 2022 and Sunday Apr 10 2022 using the
[after]parameters with a Unix timestamp.
- The query object is used to limit the results to conversation archive events using the
[types]parameter with an
- The names and values of these parameters are obtained from the List events API reference documentation. Refer to the Core API Reference documentation to obtain the query object parameters for other endpoints because these vary endpoint to endpoint.
Make sure to format the brackets properly
Note that you should format the brackets properly depending on how you are making the request. For example, when using cURL, you escape the brackets (e.g.
While it doesn't make sense to include multiple
[after] parameters, you can include multiple
[types] parameters to filter on more than one event type. For example:
The following endpoints support the
q search query object. This list is meant as a quick jumping-off point for commonly filtered endpoints, but is not meant to be comprehensive. Refer to the Core API Reference documentation to learn if the query object is supported for a particular API endpoint.
- List tagged conversations
- List conversations
- List inbox conversations
- List link conversations
- List assigned conversations
Updated 4 months ago