List all policies

Returns a paginated list of policies for the organization. Policies can be paginated in one of two ways. Page-based pagination uses page and page_size and returns the total number of matching policies in the X-Total-Count header. Cursor-based pagination uses limit and cursor and returns the cursor for the next page in the X-Next-Cursor header. Cursor-based pagination stays fast however deep you page, so use it to walk through a large number of policies.

To paginate by cursor, send limit on the first request. If more policies remain, the response includes an X-Next-Cursor header. Send its value as cursor, with limit and the same filters and sort, to fetch the next page. The last page has no X-Next-Cursor header. Cursor-based pagination does not return a total; use HEAD /policies with the same filters to get one in X-Total-Count.

To filter by when policies were created or last updated, send created_at_from and created_at_to, or updated_at_from and updated_at_to, as ISO 8601 date-time strings in UTC. Both bounds are inclusive and either can be sent alone. These filters only work with cursor-based pagination, so limit is required. A request can filter on only one of created_at and updated_at, and sort, if sent, must be that same field. When sort is omitted, policies are sorted by that field. HEAD /policies accepts the same filters without limit.

Query Params
integer
1 to 100
Defaults to 30

The maximum number of items that will be contained in a single page, between 1 and 100 (inclusive).

integer
≥ 1
Defaults to 1

The page number of the entities to fetch. Must be a minimum of 1.

integer
1 to 100

The maximum number of policies in a single page when paginating by cursor, between 1 and 100 (inclusive). Required when cursor is sent. Cannot be combined with page or page_size.

string
length ≤ 1024

The value of the X-Next-Cursor header from the previous page. Send it with limit and the same filters and sort as the request that returned it.

string
enum

The field to sort policies by. Policies with the same value are ordered by policy_id. Policies without a start_date come first when sorting by start_date in descending order, and last in ascending order. When omitted, policies are sorted by created_at, newest first, except with search, where the order is not guaranteed, and with a date-range filter, where policies are sorted by the filtered field. With a date-range filter, sort must be the filtered field. With page-based pagination and no sort, policies created at the same time have no fixed order, so they can repeat or be skipped across pages.

Allowed:
string
enum
Defaults to desc

The sort direction. Only applies when sort is sent or a date-range filter is used.

Allowed:
string

Only return policies created at or after this time. Must be an ISO 8601 date-time string, in UTC. Requires limit. Cannot be combined with updated_at_from or updated_at_to.

string

Only return policies created at or before this time. Must be an ISO 8601 date-time string, in UTC. Requires limit. Cannot be combined with updated_at_from or updated_at_to. Must not be before created_at_from. A date without a time is the start of that day, so send 2025-01-31T23:59:59.999Z to include all of 31 January.

string

Only return policies last updated at or after this time. Must be an ISO 8601 date-time string, in UTC. Requires limit. Cannot be combined with created_at_from or created_at_to.

string

Only return policies last updated at or before this time. Must be an ISO 8601 date-time string, in UTC. Requires limit. Cannot be combined with created_at_from or created_at_to. Must not be before updated_at_from. A date without a time is the start of that day, so send 2025-01-31T23:59:59.999Z to include all of 31 January.

A general-purpose parameter used to search for policies across policy.policy_number, policy.package_name, policyholder.first_name, policyholder.last_name, policyholder.company_name, policyholder.identification_number, policyholder.registration_number, policyholder.cellphone, policyholder.phone_other, and policyholder.email. A cursor is only valid with the same search term it was issued for.

string

A comma separated list of policy statuses to filter by.

string

Must be a UUID. Filter for policies linked to this policyholder.

string

Must be a UUID. The unique identifier of the agent that created the policy.

string

Must be a UUID. Filter for policies assigned to this user group. When the request is authenticated with a user-group-segmented API key, results are always restricted to that key's own group and this parameter is ignored.

include
array of strings, unique

Whether to include the full policyholder object linked to the policy in the response.

string

Must be a UUID. Filter for policies issued under this product module.

policy_number
array of strings, unique

List of case sensitive policy numbers to filter by.

policy_number
Responses

400

The query is invalid. With cursor-based pagination this includes sending page or page_size with limit or cursor, sending cursor without limit, a malformed cursor, and a cursor reused with a different sort or different filters. With a date-range filter it includes sending it without limit, combining created_at_* with updated_at_*, a sort other than the filtered field, and a *_from after its *_to.

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json