Skip to navigation

Update Polling Webhook

Pause or resume a polling webhook created through this inbox route.

CLI:

agentmail inboxes webhooks polling update --inbox-id <inbox_id> --webhook-id <webhook_id> --enabled=false

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

inbox_idstringRequired
The ID of the inbox.
webhook_idstringRequired
ID of webhook.

Request

This endpoint expects an object.
enabledbooleanOptional

Set to false to pause the subscription: its token stops working at once, and the events that arrive while it is disabled are kept. While it is disabled, a create with its client_id returns 409. Set to true to resume it, then create again with the same client_id to get a new token, which reads the kept events from where your consumer left off. Re-enabling requires the read permission for every restricted event type the subscription receives: label_spam_read, label_blocked_read, or label_unauthenticated_read for the received variants, message_read for message.security.*, and calendar_event_read for calendar.event.*.

Response

This endpoint returns an object.
webhook_idstring
ID of webhook.
client_idstring

Required. Idempotency key of the subscription: creating again with the same client_id through the same route returns the existing subscription with a fresh token instead of a second subscription, so a restarted agent resumes where it left off. Also accepted in place of webhook_id on get, update and delete.

event_typeslist of enums
Event types for which to send events.
enabledboolean

Whether the subscription hands out events. A disabled one keeps the events that arrive and has no working token until it is enabled again; see Update Polling Webhook.

updated_atdatetime
Time at which the subscription was last updated.
created_atdatetime
Time at which the subscription was created.
pod_idslist of stringsOptional
Pods for which to send events.
inbox_idslist of stringsOptional
Inboxes for which to send events.
pod_idstringOptional

ID of the pod the subscription belongs to: the pod it was created in, or the pod of the inbox it belongs to. Absent for an organization subscription. This is not the list of pods it receives events for; see pod_ids.

inbox_idstringOptional

ID of the inbox the subscription belongs to, if it was created for an inbox. This is not the list of inboxes it receives events for; see inbox_ids.

Errors

400
Validation Error
404
Not Found Error