Skip to the page

Update webhook

Changes the address, the events or whether an endpoint is switched on.

opensend.webhooks.update(id, input?)
Needs the scopewebhooks:writeFrom a terminalopensend webhooks update

Input

id goes first, on its own, and the rest in one object. One object that holds id works too.

  • idstringRequired

    The id of the item. Up to 64 characters.

  • urlstring

    A new address. Up to 500 characters.

  • eventsstring[]

    The events to be told about from now on.

    One ofemail.sentemail.deliveredemail.delayedemail.bouncedemail.openedemail.clickedemail.complainedemail.failedemail.receivedemail.scheduledemail.canceledautomation.enteredautomation.finishedautomation.step

  • statusstring

    enabled to post events, disabled to stop.

    One ofenableddisabled

  • formatstring

    native or resend: how events are written and signed from now on.

    One ofnativeresend

Returns

The call resolves to the answer, already parsed. A call the API refuses throws OpenSendError with the code and the message of the answer. SDK lists the errors of the client itself.

  • object"webhook"

    Always webhook.

  • idstring

    The id of the webhook.

  • urlstring

    The address events are posted to.

  • eventsstring[]

    The events it is told about.

    One ofemail.sentemail.deliveredemail.delayedemail.bouncedemail.openedemail.clickedemail.complainedemail.failedemail.receivedemail.scheduledemail.canceledautomation.enteredautomation.finishedautomation.step

  • statusstring

    enabled while events are posted to it, disabled when it is switched off.

    One ofenableddisabled

  • formatstring

    How an event is written and signed: native is this API, resend is the headers, signature and body an endpoint built for Resend expects.

    One ofnativeresend

  • lastDeliveryAtstring | null

    When an event was last posted to it, or null.

  • lastStatusinteger | null

    The HTTP status your address answered with last time, or null.

  • createdAtstring

    When the webhook was added.