pods > webhooks > polling

Create Polling Webhook

Changed on

Create a polling webhook scoped to this pod and return the token that reads it.

CLI:

agentmail pods webhooks polling create --pod-id <pod_id> --client-id my-agent --event-types message.received
post/v0/pods/{pod_id}/webhooks/polling

Request

  • Base URL
    https://api.agentmail.to
  • URL
    https://api.agentmail.to/v0/pods/{pod_id}/webhooks/polling
  • Auth
    HTTP bearer

Path parameters

pod_idstring required

ID of pod.

Request body

client_idstring required

Client ID of webhook.

event_typesEventsEventType[] required

Event types for which to send events.

inbox_idsstring[]

Inboxes for which to send events.

Response

Response with status 200

webhook_idstring required

ID of webhook.

client_idstring required

Client ID of webhook.

event_typesEventsEventType[] required

Event types for which to send events.

pod_idsstring[]

Pods for which to send events.

inbox_idsstring[]

Inboxes for which to send events.

pod_idstring

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_idstring

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.

updated_atstring date-time required

Time at which the subscription was last updated.

created_atstring date-time required

Time at which the subscription was created.

tokenstring required

Credential for reading this subscription's events. Hand it to the Svix AutoConfig consumer (AutoConfigConsumer in the svix package for TypeScript and Python): receive returns the events queued since your last commit, commit marks them as processed. Returned by create only and never readable afterward. Create again with the same client_id to get a new token; the previous one stops working immediately.

Changes