Skip to content

Webhooks

6 calls. Every request needs the Authorization header: see the overview.

GET /web-hooks

Every registration (header values masked as "********").

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Response: WebHookRegistration[] (200)

curl -X GET "https://api.maitento.com/web-hooks" \
-H "Authorization: $MAITENTO_AUTH"
POST /web-hooks

Registers a URL for one entity type (one registration per URL and type).

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Request body: WebHookRegistrationCreateRequest

FieldTypeRequiredDescription
typeWebHookTypeyesWhat the web hook reports on.
urlstringyesThe URL to call.
secretstringyesA secret of your choosing that every call is signed with (X-MT-WebHook-Signature, an HMAC-SHA256 of X-MT-WebHook-Timestamp and the body), so your endpoint can check the call came from Maitento. It’s never sent itself. Write-only.
headersmap<string, string>yesExtra HTTP headers to send with every call ({} for none). Values are write-only.

Response: WebHookRegistration (200)

curl -X POST "https://api.maitento.com/web-hooks" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"type":"AppProcess","url":"...","secret":"...","headers":{}}'
DELETE /web-hooks/by-id/{id}

Deletes a registration.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Response: no body (200)

curl -X DELETE "https://api.maitento.com/web-hooks/by-id/<id>" \
-H "Authorization: $MAITENTO_AUTH"
GET /web-hooks/by-id/{id}

The registration with this id. Throws NotFoundError when there is none.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Response: WebHookRegistration (200)

curl -X GET "https://api.maitento.com/web-hooks/by-id/<id>" \
-H "Authorization: $MAITENTO_AUTH"
PUT /web-hooks/by-id/{id}

Changes the URL, secret or headers. headers is the full set: a missing name is removed, null or "********" keeps a stored value. Moving the URL to another origin needs the secret again. signedOnly: true stops a web hook registered before deliveries were signed from sending its secret in X-MT-WebHook-Secret: from then on its deliveries are only signed. It can’t be undone, so set it once your receiver checks X-MT-WebHook-Signature. false or leaving it out changes nothing.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Request body: WebHookRegistrationUpdateRequest

FieldTypeRequiredDescription
urlstringyesThe URL to call.
secretstring | nullA new secret to sign calls with (X-MT-WebHook-Signature). Null or omitted: the stored secret is kept.
headersmap<string, string | null> | nullThe complete set of headers the web hook has after the update: a name left out is removed, and {} clears them all. Values are write-only (responses show ********), so a value of null or ******** keeps the stored value for that name; any other string replaces it. Omitting headers (or sending null) leaves every header unchanged.
signedOnlyboolean | nullTrue stops a web hook registered before deliveries were signed from sending its secret in X-MT-WebHook-Secret: from then on its deliveries are only signed, like every web hook registered now. It can’t be undone, so false or omitted changes nothing.

Response: WebHookRegistration (200)

curl -X PUT "https://api.maitento.com/web-hooks/by-id/<id>" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"url":"..."}'
GET /web-hooks/by-id/{id}/deliveries

The registration’s delivery log (sent deliveries are kept a day, permanent failures a week).

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Query parameters

NameTypeRequiredDescription
limitinteger

Response: WebHookDelivery[] (200)

curl -X GET "https://api.maitento.com/web-hooks/by-id/<id>/deliveries" \
-H "Authorization: $MAITENTO_AUTH"