Changes and privacy events
You host two feeds. GET /v1/changes lists lead revisions that changed. GET /v1/privacy-events lists every withdrawal, erasure and restriction. MarsX reads both every 15 minutes, once your endpoints are live, and compares them with what it holds.
Both feeds are read-only and use the access token from your token URL. Both list oldest first and page with an opaque cursor.
Changes
Section titled “Changes”GET /v1/changes?cursor=&limit= lists one item for each changed lead revision. Items carry identity and revision only. MarsX then reads the full state of any lead it lacks, or holds at an older revision, with Lead lookup.
GET /v1/changes?cursor=opaque-cursor-example-0001&limit=500Authorization: Bearer <access_token>Accept: application/json{ "items": [ { "partner_lead_id": "SRC-TEST-0001", "source_revision": 2, "updated_at": "2026-10-04T10:20:00+07:00" }, { "partner_lead_id": "SRC-TEST-0002", "source_revision": 1, "updated_at": "2026-10-04T10:20:00+07:00" } ], "next_cursor": "opaque-cursor-example-0002", "has_more": true}| Field | Meaning |
|---|---|
items[].partner_lead_id |
Your ID for the lead |
items[].source_revision |
The revision of that change |
items[].updated_at |
The time of that change, with an offset such as +07:00 |
next_cursor |
Opaque. Where MarsX continues. Return it on every page |
has_more |
true when another page can be read now with next_cursor |
Withdrawals and erasures are not required in this list. privacy-events is their source of truth.
When nothing has changed, answer with an empty page and keep the cursor:
{ "items": [], "next_cursor": "opaque-cursor-example-0002", "has_more": false}Privacy events
Section titled “Privacy events”GET /v1/privacy-events?cursor=&limit= lists every withdrawal, erasure and restriction. Include lead IDs you no longer hold. Items carry no contact, interest or profile data.
GET /v1/privacy-events?limit=500Authorization: Bearer <access_token>Accept: application/json{ "items": [ { "partner_lead_id": "SRC-TEST-0001", "request_type": "withdraw_consent", "request_time": "2026-10-04T14:59:30+07:00", "request_reference": "PRIV-TEST-0001" }, { "partner_lead_id": "SRC-TEST-0007", "request_type": "erasure", "request_time": "2026-10-04T15:30:00+07:00", "request_reference": "PRIV-TEST-0002" } ], "next_cursor": "opaque-cursor-example-0102", "has_more": false}| Field | Meaning |
|---|---|
items[].partner_lead_id |
Your ID for the lead. It may be a lead you no longer hold |
items[].request_type |
withdraw_consent, restriction or erasure |
items[].request_time |
When the customer made the request, with an offset |
items[].request_reference |
Your reference for the request. The same value you sent in the push event |
next_cursor, has_more |
As for changes |
The types match your push events: erasure is sent as lead.delete, and withdraw_consent and restriction are sent as lead.withdraw.
Page size and retention
Section titled “Page size and retention”| Rule | Detail |
|---|---|
| Order | Oldest first |
| Page size | You set it. Default at least 100, maximum at least 500. MarsX requests 500 |
limit above your maximum |
400 |
Keep changes |
At least 90 days |
Replay privacy-events |
At least 90 days |
A bad query answers 400 with problem type urn:marsx:problem:invalid-query:
{ "type": "urn:marsx:problem:invalid-query", "title": "The query is not valid", "status": 400, "detail": "The limit is above the maximum.", "instance": "req_example_0008"}Cursor rules
Section titled “Cursor rules”A cursor is a marker that tells an API where the last page stopped.
next_cursoris opaque. MarsX sends it back unchanged.- Return
next_cursoron every page, including an empty one. - Omit
cursorto start at the oldest item you hold. - Keep the order stable when several changes share one
updated_at. One way is to order byupdated_at, then by a unique, increasing sequence number that your database assigns when the change is committed. - A change must never appear behind a cursor you have already handed out.
- A cursor that points at the oldest item you still hold is valid. One older than that gets
410.
An expired cursor fails closed
Section titled “An expired cursor fails closed”A cursor older than your replay window gets 410 with problem type urn:marsx:problem:cursor-expired:
{ "type": "urn:marsx:problem:cursor-expired", "title": "The cursor is outside the replay window", "status": 410}What MarsX does next depends on the feed.
| Feed | What MarsX does |
|---|---|
privacy-events |
MarsX can no longer prove that it has seen every withdrawal and erasure. It keeps the connection’s leads restricted until recovery is proven. Starting again from the oldest item you hold does not prove completeness, because an older erasure would be missed |
changes |
MarsX restarts from the oldest item you hold, and re-reads the leads it holds. It shows the connection as not verified for completeness until you have resent any lead that fell in the gap. A resend is a normal push |
Only when MarsX asks, you send the full privacy list as a signed file. MarsX sends the file layout with the request. The file holds only withdraw and delete rows. Name it <CODE>_<YYYY-MM-DD>_privacy-list.xlsx, where <CODE> is the partner code MarsX gave you. Send it with PUT /v1/sources/{connection}/files/{file_name}. Sign the file bytes with the same three webhook-* headers, and use the file name without .xlsx as the webhook-id. MarsX answers 201 with stored or duplicate. MarsX sends the file layout when it schedules test R5, and with any real request. This is not a route for leads. Never send the list by email or WhatsApp.
MarsX compares the list with its own privacy markers, applies any that are missing, and lifts the connection restriction only when recovery is proven. An erasure older than your replay window is still honoured.
For test R4, you give MarsX one cursor value for each feed that always returns 410. See Test your endpoints.
What MarsX expects
Section titled “What MarsX expects”This table covers the edge cases for both feeds and for Lead lookup.
| Case | What MarsX expects |
|---|---|
| Empty feed, first call | 200, items [], has_more false and a non-empty next_cursor that resumes from the end |
Malformed cursor, or limit above your maximum |
400 (invalid-query) |
| Restricted or erased lead you still hold | 200 with the withdrawal form (record_action withdraw, or delete for an erasure). 404 only when you hold nothing |
429, 5xx, timeout |
Temporary. MarsX keeps its cursor, waits at least Retry-After and continues at its next run |
Other 4xx, a redirect, an invalid body |
A contract failure. MarsX does not retry by itself |

