Using the Parameter

Add updated_within_days as a query parameter to your request:

GET /v1/contacts?updated_within_days=7

This only returns contacts whose data has been modified in the last 7 days. The window is sliding from the moment of the request, so 1 equals the last 24 hours.

Valid values are integers from 1 through 365. If you omit the parameter, the endpoint works exactly as before and returns all contacts.

You can find the full parameter description in the OpenAPI specification via GET /v1/openapi.json.

Reliability of `updated_at`

Starting with this release, the updated_at timestamp on a contact is only updated when something in the contact data actually changes. Previously, this field was also updated during the nightly import run, even if nothing had changed.

Please note: the timestamp is not yet fully reliable in all situations. Unsubscribes and changes to list membership are currently not reflected in updated_at. Contacts that have only been unsubscribed or added to a list may therefore fall outside your results when filtering by updated_within_days.

Frequently asked questions

Values like 0 or more than 365 fall outside the valid range. Refer to the OpenAPI spec (GET /v1/openapi.json) for the exact error response the API returns in that case.

If a contact has only been unsubscribed and has not otherwise been modified, updated_at is not yet updated to reflect that. That contact will not appear in the results of updated_within_days, even if a relevant change has occurred. The same applies to changes in list membership.

The parameter is documented in the OpenAPI specification of Xendy. You can access it via GET /v1/openapi.json.

Joeri Ras

Written by

Joeri Ras

Founder & co-owner @ Xendy

Prefer to talk directly?

Related articles