Skip to main content
POST
/
webhooks
curl --request POST \
  --url https://api.jetemail.com/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "My Webhook",
  "url": "https://example.com/webhook",
  "events": [
    "outbound.delivered",
    "outbound.bounced"
  ]
}
'
{
  "success": true,
  "message": "Webhook created successfully",
  "webhook": {
    "uuid": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
    "name": "Production Webhook",
    "url": "https://example.com/webhook",
    "secret": "whsec_abc123def456...",
    "events": [
      "outbound.delivered",
      "outbound.bounced"
    ],
    "status": "enabled",
    "filter_users": null,
    "filter_domains": null,
    "created_at": 1736524800,
    "last_modified": 1736524800
  }
}

Authorizations

Authorization
string
header
required

API key for account management endpoints. Use your api_ prefixed token.

Body

application/json
name
string
required

Human-readable webhook name. Only letters, numbers, hyphens, underscores, and spaces allowed.

Maximum string length: 64
Example:

"Production Webhook"

url
string<uri>
required

Webhook endpoint URL (must be http or https)

Example:

"https://example.com/webhook"

events
enum<string>[]
required

List of event types to subscribe to. Must only include allowed event types.

Minimum array length: 1
Available options:
outbound.delivered,
outbound.bounced,
outbound.rejected,
outbound.deferred,
outbound.spam,
outbound.dropped,
outbound.virus,
outbound.opened,
outbound.clicked,
outbound.complaint,
inbound.received,
inbound.delivered,
inbound.spam,
inbound.blocked
Example:
[
"outbound.delivered",
"outbound.bounced",
"inbound.received"
]
status
enum<integer>
default:1

Webhook status: 0 = disabled, 1 = enabled

Available options:
0,
1
Example:

1

filter_users
string[] | null

Filter outbound events by username. Must be transactional keys or smarthosts you own. (null = all)

Example:

null

filter_domains
string[] | null

Filter inbound events by domain. Must be inbound domains you own. (null = all)

Example:
["example.com"]

Response

Webhook created successfully

success
boolean
Example:

true

message
string
Example:

"Webhook created successfully"

webhook
object