Skip to content

Check an event's status

The answer to a POST shows intake only. To see what the worker decided, make one read-only call. It is optional. Leads flow without it.

The status read uses OAuth 2.0 client credentials, issued by MarsX. The sandbox console (for a test key) and Concour (for a live key) give your developer a status client ID and secret, one for each connection and environment. They appear once, as Status client ID and Status secret, in the dialog that shows the signing secret of a new test key or a collected live key. The API keys page lists the Status clients afterwards: the client ID is not secret, and the secret is not shown again. Ask for the scope events:read.

Token request
POST https://api-sandbox.marsx.media/oauth/token
Content-Type: application/x-www-form-urlencoded
Authorization: Basic <base64(client_id:client_secret)>
grant_type=client_credentials&scope=events:read

The request may also carry resource (RFC 8707). It must be the API address, https://api-sandbox.marsx.media here, or the API address followed by /mcp. Any other value gets 400 invalid_target and no token. MarsX limits token requests for each caller address before it reads the client credentials: too many get 429 with Retry-After: 10. The request body is at most 64 KiB.

A wrong secret gets 401 invalid_client. A scope that the client does not hold gets 400 invalid_scope. Send the access token as Authorization: Bearer <access_token>.

There are two scopes. A token request asks for scopes in scope, separated by spaces, and can ask only for scopes the client holds.

Scope On the REST API On the MCP endpoint
events:read Allows the status read, GET /v1/sources/{connection}/events/{webhook_id} Allows tools/list (read tools only), get_lead_status and find_dealer. No write tool
events:write Allows nothing. The status read answers 403 to a token that has only this scope Allows all six tools: the four write tools and the two read tools
  • Without scope in the request, the token gets every scope the client holds. Send scope to ask for less.
  • A missing grant_type, or any value other than client_credentials, gets 400 unsupported_grant_type. On the MarsX token URL, a missing grant_type is not answered invalid_request.
  • Sending events to POST /v1/sources/{connection}/events takes no token. Those requests are signed, as in Sign requests.

An access token is issued for the API address that issued it, https://api-sandbox.marsx.media or https://api.marsx.media, whichever host you asked. The status read and /mcp refuse a token on any other host with 401. A sandbox token does not work on production, and a production token does not work on the sandbox. Ask each host for its own token. A token that you already held before 11 October 2026 is not bound, and works until it expires, at most one hour.

Request
GET /v1/sources/conn_exampleexample22/events/msg_test_0001
Host: api-sandbox.marsx.media
Authorization: Bearer <access_token>
Response, 200
{
"webhook_id": "msg_test_0001",
"type": "lead.withdraw",
"partner_lead_id": "SRC-TEST-0001",
"source_revision": 3,
"processing_state": "applied",
"received_at": "2026-10-04T15:00:01+07:00",
"processed_at": "2026-10-04T15:00:03+07:00"
}
  • processed_at is null while the event is queued.
  • reason appears only when the event is quarantined.
  • warnings appears only for an ignored dealer code.
  • 404 means MarsX has no such event for your connection, or the event is over 90 days old.
  • A 401 carries WWW-Authenticate: Bearer realm="marsx" when the request had no Authorization: Bearer credential, and WWW-Authenticate: Bearer realm="marsx", error="invalid_token" when the token is invalid, expired or for another host. Ask for a new token once, from the host you read from.
  • A 403 (a valid token without events:read) carries WWW-Authenticate: Bearer realm="marsx", error="insufficient_scope", scope="events:read".
  • Keep reads to 60 per 60 seconds for each connection. Read when you need to. Do not poll every event in a tight loop.

Concour’s Request log words the same outcomes as Accepted, Duplicate, Set aside and Refused. See Your requests in Concour.

processing_state, reason Meaning What you do
queued Stored, not applied yet Read again shortly
queued, clearing_awaiting_confirmation A privacy request that MarsX is holding. Your connection sent many privacy requests in a short time. The lead is restricted now, and its data is cleared only after a MarsX privacy operator confirms Nothing. Do not send it again. Read again later: after the confirmation it stays queued, with no reason, until MarsX has cleared the lead, and then it is applied
queued, clearing_held_for_investigation As above, and MarsX is checking the requests before it clears anything. The lead stays restricted Nothing. Do not send it again. MarsX may contact you about the requests
applied Done Nothing
ignored_stale_revision Lower than the revision MarsX holds Nothing, or resend as a higher revision if it was a change
ignored_duplicate_content The same content is already applied Nothing
quarantined, revision_conflict Same revision, other content Send a higher revision
quarantined, privacy_marker_set A withdraw or delete for the lead is stored, even if this event was stored first Nothing. Do not resend
quarantined, privacy_request_conflict Same request_reference, other type or time Resend the original values, or use a new reference

A lead.new or lead.update still queued when a withdraw is stored ends quarantined with privacy_marker_set. That is intended. That lead may never show applied.

A reason comes with queued only for the two values above, which appear only on a privacy request. A queued event with no reason is waiting for the worker. See Many requests at once.

When MarsX applied the event but could not use something in it, the response has a warnings array. The lead was accepted. Each item has a code and a reason:

"warnings": [{ "code": "dealer_code_ignored", "reason": "unknown" }]

dealer_code_ignored means MarsX ignored preferred_dealer_code and routed the lead as if no code had been sent. The reason is unknown (the code is not on the dealer list) or not_active (the outlet takes no car sales lead). Nothing needs resending. Treat an unknown code or reason as informational. Codes are case-sensitive. See Allowed values.