MaillyDocs

Update a webhook endpoint

Update a webhook endpoint with the Mailly email API for AI agents: PATCH /inbox/webhook/endpoints/{endpointId}. Parameters, request body, responses and code samples.

PATCH
/inbox/webhook/endpoints/{endpointId}

Omitted fields keep their current values; null resets a delivery option to its default. Use either signingSecret or rotateSecret; a generated secret is returned only once.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Mailly API key(Authorization: Bearer )

Path Parameters

endpointId*string

Webhook endpoint ID

Request Body

application/json
  1. body
url?string
active?boolean
bodyFormat?string

text / html / markdown

stripQuotes?boolean
signingSecret?string
headers?array<>

Custom request headers, at most 10. The list replaces all headers; values are stored encrypted and only returned masked.

payloadMode?string

raw sends the full email.received payload; template sends the rendered template

Value in"raw""template"
template?string

JSON template with {{variable}} placeholders: from, from_name, to, tag, subject, snippet, body_markdown, body_text, thread_id, message_id, internet_message_id, address_id, received_at, truncated, attachments_count, count, emails. Values are JSON-escaped, so put text variables inside quotes.

bodyMaxChars?integer

Truncate the body to this many characters (100-20000, default 20000)

Range-9007199254740991 <= value <= 9007199254740991
filters?

Which mail to send; omitted lists keep their values, null clears all filters

maxPerMinute?integer

At most this many requests per minute (1-600); extra mail waits, it is not dropped

Range-9007199254740991 <= value <= 9007199254740991
batchWindowSeconds?integer

Wait this many seconds (10-3600) and merge mail that arrives meanwhile into one request; 0 sends each email on its own

Range-9007199254740991 <= value <= 9007199254740991
maxAttempts?integer

Attempts before a delivery is marked failed (1-8, default 8)

Range-9007199254740991 <= value <= 9007199254740991
rotateSecret?boolean
[key: string]?unknown

Response Body

Updated

application/json
  1. response
success*boolean
endpoint*
signingSecret?string
[key: string]?unknown
curl -X PATCH 'https://api.mailly.site/inbox/webhook/endpoints/string' \  -H 'Content-Type: application/json' \  -d '{  "property1": null,  "property2": null}'
{  "success": true,  "endpoint": {    "property1": null,    "property2": null  },  "signingSecret": "string",  "property1": null,  "property2": null}