API referenceProject API

Inbound Webhooks (Ingest)

The endpoint a project calls to send a signed payload to an inbound webhook, with every response it can return.

Open a draft

POST/api/inbound-webhooks/{id}/drafts

Starts a multi-step submission. Send each step with PATCH, then submit the draft. The draft expires after INBOUND_WEBHOOK_DRAFT_TTL_H hours (24 by default). Only for webhooks whose schema has steps. The request has no body, so the signature covers an empty string.

Authentication: Project API key (X-API-Key header)

Parameters

NameInTypeRequiredDescription
idpathstringyes
X-MCID-Signatureheaderstringnot=<unix seconds>,v1=<hex hmac-sha256 of "t.<raw body>">

Responses

StatusDescriptionBody
201The draft id and when it expires.
400The webhook has no steps (400), or the signature is bad (401).
403Origin not in the allowlist.
404No such webhook for this project.
409Signature replayed.
410Webhook is inactive.

Open in Swagger (opens in a new tab)

Submit a draft

POST/api/inbound-webhooks/{id}/drafts/{draftId}/submit

Checks everything saved so far as one payload, with conditions resolved across steps, and turns the draft into a submission. A step never sent fails its required fields. A draft can be submitted once. The request has no body, so the signature covers an empty string.

Authentication: Project API key (X-API-Key header)

Parameters

NameInTypeRequiredDescription
idpathstringyes
draftIdpathstringyes
X-MCID-Signatureheaderstringnot=<unix seconds>,v1=<hex hmac-sha256 of "t.<raw body>">

Responses

StatusDescriptionBody
201Accepted.
403Origin not in the allowlist.
404No such webhook or draft.
409The draft was already submitted, or the signature replayed.
410Webhook inactive, or the draft expired.
422The accumulated payload failed schema validation.

Open in Swagger (opens in a new tab)

Save one step of a draft

PATCH/api/inbound-webhooks/{id}/drafts/{draftId}/{stepKey}

Checks only this step, with its conditions read against the steps already saved, and stores it. Sending a step again replaces it. Every error in the step is returned at once.

Authentication: Project API key (X-API-Key header)

Parameters

NameInTypeRequiredDescription
idpathstringyes
draftIdpathstringyes
stepKeypathstringyes
X-MCID-Signatureheaderstringnot=<unix seconds>,v1=<hex hmac-sha256 of "t.<raw body>">

Responses

StatusDescriptionBody
200The steps saved so far.
403Origin not in the allowlist.
404No such webhook or draft.
409The draft was already submitted, or the signature replayed.
410Webhook inactive, or the draft expired.
422The step failed schema validation, or the step is unknown.

Open in Swagger (opens in a new tab)

Upload a file

POST/api/inbound-webhooks/{id}/files

Phase one of a file submission. Send one file as multipart/form-data; the response carries a fileId to reference from a file field in /submit or in a draft step. The type is read from the content, not from the Content-Type the sender gives, and must be accepted by one of the webhook's file fields. The upload expires after INBOUND_WEBHOOK_FILE_TTL_H hours (1 by default) unless a submission uses it. The multipart body is not signed, so the signature covers an empty string.

Authentication: Project API key (X-API-Key header)

Parameters

NameInTypeRequiredDescription
idpathstringyes
X-MCID-Signatureheaderstringnot=<unix seconds>,v1=<hex hmac-sha256 of "t.">

Responses

StatusDescriptionBody
201The fileId, sha256, size, detected mime and expiry.
400Not multipart, no file, several files, an empty file, or the webhook has no file fields (400); bad signature (401).
403Origin not in the allowlist.
404No such webhook for this project.
409Signature replayed.
410Webhook is inactive.
413Larger than the biggest maxSizeBytes of the webhook.
415The content is not a type the webhook accepts.

Open in Swagger (opens in a new tab)

Submit a payload

POST/api/inbound-webhooks/{id}/submit

Validated against the webhook schema. Every field error is returned at once.

Authentication: Project API key (X-API-Key header)

Parameters

NameInTypeRequiredDescription
idpathstringyes
X-MCID-Signatureheaderstringnot=<unix seconds>,v1=<hex hmac-sha256 of "t.<raw body>">

Responses

StatusDescriptionBody
201Accepted.
400Bad signature (401) or rate limited (429).
403Origin not in the allowlist.
404No such webhook for this project.
409Signature replayed.
410Webhook is inactive.
422Payload failed schema validation.

Open in Swagger (opens in a new tab)

Source: apps/api/openapi.json.

On this page