POST
/
webhooks
Create a webhook subscription
curl --request POST \
  --url https://api.reply.io/v3/webhooks \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "targetUrl": "<string>",
  "eventTypes": [
    "<string>"
  ],
  "secret": "<string>",
  "subscriptionLevel": "sequence",
  "sequenceIds": [
    123
  ],
  "teamIds": [
    123
  ],
  "accountId": 123,
  "organizationId": 123
}'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "targetUrl": "https://api.example.com/webhook/reply",
  "eventTypes": [
    "email_replied",
    "email_sent"
  ],
  "isActive": true,
  "secret": "hmac-secret-key",
  "attempt": 0,
  "createdAt": "2024-03-08T12:00:00Z",
  "updatedAt": "2024-03-08T12:00:00Z",
  "subscriptionLevel": "account",
  "accountId": 12345
}

Authorizations

X-API-Key
string
header
required

API key passed in the X-API-Key header

Body

application/json
targetUrl
string<uri>
required

HTTPS endpoint to receive POSTs

eventTypes
string[]
required

List of subscribed event types

secret
string

Optional HMAC key used to sign webhook requests

subscriptionLevel
enum<string>

Scope of webhook subscription. Defaults to 'account' if not specified

Available options:
sequence,
account,
team,
organization
sequenceIds
integer[]

Array of sequence IDs (when subscriptionLevel = 'sequence')

teamIds
integer[]

Array of team IDs (when subscriptionLevel = 'team')

accountId
integer

Specific account ID (when subscriptionLevel = 'account')

organizationId
integer

Specific organization ID (when subscriptionLevel = 'organization')

Response

201 - application/json

Webhook subscription created successfully

id
string<uuid>
required

Unique webhook subscription ID

targetUrl
string<uri>
required

HTTPS endpoint to receive POSTs

eventTypes
string[]
required

List of subscribed event types

isActive
boolean
required

Whether the subscription is currently active

createdAt
string<date-time>
required

ISO 8601 timestamp when created

updatedAt
string<date-time>
required

ISO 8601 timestamp when last updated

secret
string | null

Optional HMAC key used to sign webhook requests

attempt
integer

Count of delivery attempts for this subscription

subscriptionLevel
enum<string>

Scope of webhook subscription. Defaults to 'account' if not specified

Available options:
sequence,
account,
team,
organization
sequenceIds
integer[]

Array of sequence IDs. If empty or null, applies to all sequences (when subscriptionLevel = 'sequence')

teamIds
integer[]

Array of team IDs. If empty or null, applies to all teams (when subscriptionLevel = 'team')

accountId
integer

Specific account ID. If null, applies to current user's account (when subscriptionLevel = 'account')

organizationId
integer

Specific organization ID. If null, applies to current organization (when subscriptionLevel = 'organization')