Skip to main content
POST
/
v1
/
webhooks
Create webhook
curl --request POST \
  --url https://api.emailr.dev/v1/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Email Events Webhook",
  "url": "https://api.example.com/webhooks",
  "events": [
    "email.sent",
    "email.delivered",
    "email.bounced"
  ]
}
'
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "url": "<string>",
  "events": [
    "<string>"
  ],
  "secret": "<string>",
  "active": true,
  "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key authentication. Use your API key as the bearer token.

Body

application/json
name
string
required
Minimum string length: 1
Example:

"Email Events Webhook"

url
string<uri>
required
Example:

"https://api.example.com/webhooks"

events
string[]
required
Example:
[
"email.sent",
"email.delivered",
"email.bounced"
]

Response

Webhook created

id
string<uuid>
required
Example:

"123e4567-e89b-12d3-a456-426614174000"

organization_id
string<uuid>
required
name
string
required
url
string<uri>
required
events
string[]
required
secret
string
required
active
boolean
required
created_by
string<uuid> | null
required
created_at
string<date-time>
required