HTTP POST
request to this endpoint whenever an event you are interested in occurs.
Once your endpoint is ready, you may create a webhook target in Plain. A webhook target tells Plain what events you
are interested in and where to send those events.
You can create it by going to Settings → Webhooks, then clicking on ’+ Add webhook target’
Then, you need to choose a name (e.g. ‘Customer notifications’), the URL of your webhook endpoint, the events you want
to receive and whether you want to enable it straight away.
You can create up to 25 webhook targets per workspace.
https://username:password@example.com
) which will then be sent along the webhook request in an Authorization
header:
id
field in the webhook request body can be used as an idempotency key.
Retry # | Delay | Approximate time since first attempt |
---|---|---|
1 | 10s | 10s |
2 | 30s | 40s |
3 | 5m | 6m |
4 | 30m | 36m |
5 | 1h | 1.5h |
6 | 3h | 4.5h |
7 | 6h | 10.5h |
8 | 12h | 22.5h |
9 | 1d | 2d |
10 | 1d | 3d |
11 | 1d | 4d |
12 | 1d | 5d |
HTTP POST
request to the webhook target URL.
Accept
: application/json
Content-Type
: application/json
User-Agent
: Plain-Webhooks/1.0 (plain.com; help@plain.com)`Plain-Workspace-Id
: The ID of the workspace where the Plain event originatedPlain-Webhook-Target-Id
: The ID of the webhook target this webhook request is being sent toPlain-Webhook-Delivery-Attempt-Id
: The ID of the delivery attempt. It will be different on every delivery attemptPlain-Webhook-Delivery-Attempt-Number
: The current delivery attempt number (starts at 1)Plain-Webhook-Delivery-Attempt-Timestamp
: The time at which the delivery attempt was made. In UTC and formatted as
ISO8601. E.g. 1989-10-28T17:30:00.000Z
Plain-Event-Type
: The Plain event’s typePlain-Event-Id
: The ID of the Plain event. It remains the same across all of the delivery attemptsAuthorization
header is sent if the webhook target URL contains authentication credentials.
JSON
object with the fields below.
The JSON schema for Plain the webhook request body can be found here.
Field | Type | Description |
---|---|---|
id | string | The ID of the Plain event. It remains the same across all of the delivery attempts |
type | string | The Plain event’s type |
webhookMetadata | object | Metadata associated with the webhook request. See Webhook Metadata for more details |
timestamp | string | The Plain event’s timestamp. In UTC and formatted as ISO8601. E.g. 1989-10-28T17:30:00.000Z |
workspaceId | string | The ID of the workspace where the Plain event originated |
payload | object | The Plain event’s payload (Example); |
Field | Type | Description |
---|---|---|
webhookTargetId | string | The ID of the webhook target this webhook request is being sent to. This is the ID that you will find under Settings -> Webhooks in the Support App |
webhookDeliveryAttemptId | string | The ID of the delivery attempt. It will be different on every delivery attempt |
webhookDeliveryAttemptNumber | string | The current delivery attempt number (starts at 1) |
webhookDeliveryAttemptTimestamp | string | The time at which the delivery attempt was made. In UTC and formatted as ISO8601. E.g. 1989-10-28T17:30:00.000Z |