Skip to content

Errors

Only 202 confirms that MarsX has the event. It means the event is stored and queued. It does not mean the lead has changed yet. For the privacy list, 201 confirms that MarsX stored the file.

Status Meaning What you do
202 Stored and queued. The body says accepted, or duplicate when MarsX already had that webhook-id Done. Do not resend
201 A privacy list upload is stored. A repeat of the same file also gets 201 with result duplicate Done
400 Authenticated, but the body is unreadable (invalid JSON, a byte-order mark, empty, not an object) or a field is not valid Fix it and send again. Never drop a withdrawal or deletion
401 Signature or any webhook-* header missing or wrong, more than 4 signatures in webhook-signature, timestamp out of window, webhook-id outside its pattern, wrong connection reference in the URL, inactive connection or a signing secret of another connection or environment. All give the same answer, with the header WWW-Authenticate: Standard-Webhooks realm="marsx" Check the signing secret, the clock, the webhook-id, the connection reference and the environment. Then send again with a fresh webhook-timestamp and signature
403 A valid token without the scope the call needs. The status read needs events:read Ask for a client with the right scope
404 Any other wrong URL or method on the events endpoint: an extra slash, /event, no /v1, /v2, a GET on the events URL Fix the URL. Only a wrong connection reference gives 401. Some unmatched paths answer a 404 body that is not application/problem+json: decide on the status code
409 The webhook-id was already used for a different event. Nothing was stored Send the event with a new webhook-id
410 A cursor older than the replay window, on a feed you host See Changes and privacy events
413, 415 Body above 32,768 bytes (above 64 KiB, answered before authentication), or Content-Type is not application/json Fix it and send again
429, 5xx, timeout, dropped connection Too many requests, or a temporary fault. The event may already be stored Wait at least Retry-After, then retry

The status read is a different endpoint. It answers 404 to an authenticated caller when MarsX holds no such event: it was never stored, or it is over 90 days old. See Check an event’s status.

400, 401, 404, 409, 413 and 415 are not retried on the schedule. Fix the cause, then send the event again with a fresh webhook-timestamp and signature, and a corrected body if the body was the fault. The event stays owed meanwhile. Nothing was stored. After 400, 401, 404, 413 or 415 the webhook-id can be reused. After 409 use a new webhook-id, because the old one belongs to a different event. For a withdrawal or erasure, alert a person at once.

For 429, 5xx, timeouts and dropped connections, send the same webhook-id and the same body, envelope timestamp included, with a fresh webhook-timestamp and a fresh signature. MarsX binds each webhook-id to one event, its type and its data. The same event under a used webhook-id gets 202 with duplicate and is processed once, whatever its envelope timestamp, the order of its members, its white space or the offset it writes a time with. A different event under a used webhook-id gets 409 with the problem type urn:marsx:problem:webhook-id-reused, and nothing is stored. Every new event needs a new webhook-id. An event that MarsX stored before 11 October 2026 has no binding and keeps the earlier answer (202 with duplicate) until it is 90 days old.

429 carries Retry-After: 10. See Responses and retries for the schedule.

MarsX sends 202 only after the event is stored. If storing fails, MarsX answers 5xx.

{
"result": "accepted",
"webhook_id": "msg_test_0001",
"request_id": "req_example_0001"
}
result Meaning
accepted The event passed verification and is stored. It is queued for processing. It is not yet applied
duplicate MarsX already received this webhook-id. Nothing new was stored

request_id is the MarsX request reference for support. It is the same value that an error carries as instance.

Errors use problem details, a standard JSON error format (RFC 9457), with the media type application/problem+json. An error never contains personal data.

Member Meaning
type An identifier of the problem type. It is written like a URI, but it is a name and not a link. Do not fetch it. Match on it, or on the status code
title A short title
status The HTTP status
detail A sentence that says what to check
instance The MarsX request reference, req_ and 20 characters. It is the same value as request_id in a success body. It is a reference, not a link. Quote it when you contact MarsX
errors On 400, a list of pointer and message pairs. A REST error has no code: only MCP tool errors carry one, see AI agent (MCP)

A 400 for an authenticated sender:

{
"type": "urn:marsx:problem:invalid-event",
"title": "The event does not match the lead contract",
"status": 400,
"detail": "One or more fields are missing or not valid for this action.",
"instance": "req_example_0005",
"errors": [
{ "pointer": "/data/contact_consent", "message": "Required for lead.new and lead.update. The only accepted value is yes." }
]
}

A 400 lists each problem with a pointer but not the rule. The rules are in Lead fields and Allowed values. A value over its length limit, or one that holds a control character, is one of these problems: the pointer names the field (for example /data/customer_name) and the message is Not valid for this field. There is one entry for each such field, so you see all of them at once. The limits are in Text length and characters. MarsX never repeats the value. A pointer of /data means an unknown member inside data, which the answer does not name.

A 401:

{
"type": "urn:marsx:problem:unauthorized",
"title": "Authentication failed",
"status": 401,
"detail": "The request could not be authenticated. Check the key, the clock, the URL and the environment.",
"instance": "req_example_0006"
}

MarsX authenticates first on the events endpoint. A request that fails authentication gets 401 before any content type, size or field check. So 400, 413 (above 32,768 bytes) and 415 are seen only by an authenticated sender.

A body above the transport cap of its route gets 413 before authentication, whatever the signature or the connection reference. The transport cap is 64 KiB (65,536 bytes) on the events path, the token path and every other path under /v1 and /oauth, 10 MiB on the privacy list upload path, and 1 MiB on /mcp. An event is still at most 32,768 bytes, and a larger authenticated event gets 413 too. For a given route, that 413 is the same for a known and for an unknown path.

A webhook-signature header with more than 4 signatures gets the 401 below, whatever the signatures are, and MarsX checks none of them. Send two during a change of signing secret, and never more than four.

On /mcp, a body that is a JSON-RPC batch (a JSON array), or whose objects and arrays are nested more than 16 levels deep, gets 400 with the JSON-RPC error -32600 before authentication. It is a JSON-RPC error and not problem details. Send one request for each call. See AI agent (MCP).

Before it checks a signature, MarsX also spends a budget for the caller’s address. A caller that has used it gets 429 with Retry-After: 10, whatever it signed. See Limits.

A missing or wrong signature, a missing or malformed webhook-* header, a timestamp outside the window, a webhook-id outside its pattern, an unknown connection reference, an inactive connection and a signing secret of another connection or environment all get exactly the same response: the same status, headers, problem type, title, detail and body shape. Only the Date header and the instance differ.

The 401 carries the same challenge for every cause, WWW-Authenticate: Standard-Webhooks realm="marsx", so the header tells a caller nothing either. This stops a caller who is not authenticated from learning which connections MarsX has. The instance value lets MarsX find the exact cause in its own logs. When you contact support about a 401, quote it.

The OAuth token calls follow RFC 6749 section 5.2. The answer is JSON with an error member, not problem details. This applies to the token URL you host for MarsX and to the MarsX token URL for the status read.

Status error Cause
401 invalid_client Unknown client or wrong secret
429 (problem details) Too many token requests from one address. Retry-After: 10. MarsX checks this before it reads the client credentials
400 invalid_target The MarsX token URL only: a resource value that is not the API address or the API address followed by /mcp. See Check an event’s status
400 unsupported_grant_type grant_type is missing or is not client_credentials. The MarsX token URL answers a missing grant_type this way, not with invalid_request
400 invalid_scope The scope is not one the client holds. The MarsX token URL knows two scopes, events:read and events:write. With no scope, the token gets every scope the client holds
400 invalid_request On a token URL you host: a wrong content type or a missing parameter. The MarsX token URL does not use it

On a read call, a wrong or expired token gets 401, and the caller asks for a new token once. A valid token without the scope gets 403. See Token URL, and Scopes for what each scope allows.

A refused event (400, 413 or 415 to an authenticated sender) stores no lead data. MarsX keeps a restricted rejection record: the reason, the instance reference, the connection, the event type, and the lead ID if it could be read. The record holds no customer data. A refused lead.withdraw or lead.delete also alerts the MarsX privacy operator. You still have to fix the event and send it again.

type Status Used for
urn:marsx:problem:unauthorized 401 Every failed authentication on the events endpoint
urn:marsx:problem:invalid-event 400 An event that does not match the contract
urn:marsx:problem:webhook-id-reused 409 A webhook-id that was already used for a different event. Nothing was stored. The answer has a fixed detail and no errors
urn:marsx:problem:invalid-file 400 A privacy list file that MarsX refused as a whole. Nothing from it was applied. The reason is in errors
urn:marsx:problem:payload-too-large 413 A body above the transport cap of its route, or above a content limit after authentication
urn:marsx:problem:unsupported-media-type 415 A content type that is not application/json
urn:marsx:problem:rate-limited 429 A request above a budget: the sending budget, the budget checked before authentication, or the token endpoint budget
urn:marsx:problem:server-error 5xx A temporary MarsX fault
urn:marsx:problem:invalid-token 401 A missing, expired or invalid OAuth token
urn:marsx:problem:origin-not-allowed 403 /mcp only: the request carries an Origin header that MarsX does not allow. See AI agent (MCP)
urn:marsx:problem:forbidden 403 A valid token without the events:read scope, on the status read
urn:marsx:problem:not-found 404 An unknown event or lead for an authenticated caller, or a wrong path or method on the events endpoint
urn:marsx:problem:invalid-query 400 On an endpoint you host: a bad query on a read call, for example limit out of range
urn:marsx:problem:cursor-expired 410 On an endpoint you host: a cursor older than the replay window

MarsX itself sends the first twelve types. The last two are for the endpoints you host. MarsX reads cursor-expired there, and acts on the status code.

A type is an identifier, not a link. The urn:marsx:problem: prefix names the problem type and does not point to a page, so there is nothing to open. The meaning of each type is in this table. You may use your own type values on the endpoints you host. MarsX acts on the status code (for example 410), not on the type. Treat an unknown type as information only.