Subscriptions

Replace an event subscription

Update an existing subscription. Both event and target_url are required, and target_url is validated before the subscription is saved. Only admin users may update a global subscription.

The subscription is replaced, not patched. An omitted global makes it a personal subscription of the caller, so an admin must send global: true to keep a global subscription global. An omitted host is derived from target_url, an omitted payload or notification_email is cleared, and the subscription is set back to active.

put/v1/subscriptions/{id}

Request

  • Base URL: https://api.getaccept.com
  • URL: https://api.getaccept.com/v1/subscriptions/{id}
  • Auth: HTTP bearer

Path parameters

idstring required

Id of the event subscription.

Request body

event'document.approved' | 'document.viewed' | 'document.hardbounced' | 'document.commented' | 'document.opened' | 'document.created' | 'document.partially_signed' | 'document.forwarded' | 'document.sent' | 'document.rejected' | 'document.downloaded' | 'document.printed' | 'comment.created' | 'document.expired' | 'document.signed' | 'document.reviewed' | 'document.recalled' | 'comment.reply_created' | 'comment.resolved' | 'document.lost' | 'document.page_tracked' | 'document.partially_rejected' required

Event a webhook subscription can listen to.

target_urlstring required

URL to post the event to.

globalboolean

Whether the subscription catches the events of every user in the entity. Also accepts 1 and the strings "1", "true", "on" and "yes" (any case) as true; any other value is false.

hoststring nullable

Label for filtering subscriptions with the host query parameter. Defaults to the domain of target_url, for example example.com. Events are always posted to target_url.

payloadstring nullable

Extra data to post with every event.

notification_emailstring nullable

Email address to alert when the delivery fails instead of the sender.

Response

The request succeeded.

idstring required

Id of the subscription.

subscription_idstring required

Id of the subscription, repeated for the legacy clients.

statusnumber required

Whether the subscription is active: 1 when active and -1 once it has been disabled.

event'document.approved' | 'document.viewed' | 'document.hardbounced' | 'document.commented' | 'document.opened' | 'document.created' | 'document.partially_signed' | 'document.forwarded' | 'document.sent' | 'document.rejected' | 'document.downloaded' | 'document.printed' | 'comment.created' | 'document.expired' | 'document.signed' | 'document.reviewed' | 'document.recalled' | 'comment.reply_created' | 'comment.resolved' | 'document.lost' | 'document.page_tracked' | 'document.partially_rejected' required

Event a webhook subscription can listen to.

hoststring nullable required

Label for filtering subscriptions with the host query parameter, derived from the domain of target_url when it was not given. Events are always posted to target_url.

target_urlstring required

URL the event is posted to.

payloadstring nullable required

Extra data posted with every event, empty when none was given.

globalboolean required

Whether the subscription catches the events of every user in the entity.

notification_emailstring nullable required

Email address alerted when the delivery fails, empty when the sender is alerted instead.

created_atstring required

When the subscription was created, as yyyy-MM-dd HH:mm:ss without a time zone offset.

Changes

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