Webhooks

Update a webhook

patch/webhooks/{id}

Request

  • Base URL: https://shipmail.to/api/v1
  • URL: https://shipmail.to/api/v1/webhooks/{id}
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://shipmail.to/api/auth/oauth2/authorize, token URL https://shipmail.to/api/auth/oauth2/token)

Headers

X-Shipmail-Organizationstring

OAuth access tokens only. The organization ID this request acts on. Required when the OAuth connection was approved for several organizations (400 validation_error without it); optional with one. An organization the connection was not approved for returns 403 authorization_error. Ignored for API keys, which belong to one organization.

Request body

urlstring uri

HTTPS endpoint URL.

eventsWebhookEventType[]

Event types to subscribe to.

descriptionstring nullable

Human-readable description, or null to clear.

activeboolean

Whether the webhook is active.

mailbox_idsstring[] nullable

Replace the mailbox filter. Omit to leave it unchanged; null or [] clears it.

domain_idsstring[] nullable

Replace the domain filter. Omit to leave it unchanged; null or [] clears it.

authorizationstring nullable

Authorization header value sent with every delivery. A string replaces the stored value, null removes it, and omitting the field leaves it unchanged. Printable ASCII only. Stored encrypted and never returned.

standard_webhooks_secretstring nullable

Standard Webhooks signing secret. A string replaces the stored secret, null stops the signatures, and omitting the field leaves it unchanged. Stored encrypted and never returned.

include_reply_textboolean

Add reply_text, the sender's new text without quoted history or signature, to message.received deliveries. Turning it on needs an API key that also grants messages:read. Otherwise the request fails with 403. The same check applies to a URL, event, mailbox or domain change on a webhook that includes it. false turns it off.

authenticated_senders_onlyboolean

Deliver message.received only when the sender is authenticated (sender_authenticated: true): the sender passed DMARC, or Shipmail's own record shows a Shipmail mailbox sent the message. Other events are unaffected. Use it for agents that act on mail and must not trust a forged From address. false delivers every message.received again.

allowed_sendersstring[] nullable

Replace the senders message.received is limited to: addresses (jane@customer.com) or exact domains (customer.com). Entries are trimmed, lowercased and deduplicated. null or [] delivers every sender again; omit to keep the list.

Response

Updated webhook.

object'webhook' required
idstring required
urlstring uri required
eventsWebhookEventType[] required
activeboolean required
descriptionstring nullable required
mailbox_idsstring[] nullable required

Mailboxes this webhook is limited to, or null. See Scoping in the webhooks guide.

domain_idsstring[] nullable required

Domains this webhook is limited to, or null. When both lists are null the webhook receives events for every mailbox.

has_authorizationboolean required

True when deliveries carry an Authorization header set through authorization. The value itself is never returned.

has_standard_webhooks_secretboolean required

True when deliveries carry Standard Webhooks signatures (webhook-id, webhook-timestamp, webhook-signature) from a secret set through standard_webhooks_secret. The secret itself is never returned.

include_reply_textboolean required

True when message.received deliveries carry reply_text.

authenticated_senders_onlyboolean required

True when message.received is delivered only for messages whose sender is authenticated (sender_authenticated: true): the sender passed DMARC, or Shipmail's own record shows a Shipmail mailbox sent the message.

allowed_sendersstring[] nullable required

Addresses and domains message.received is limited to, lowercased. Null when every sender is delivered.

created_atstring date-time required
updated_atstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.