Skip to content

List webhook events

GET
/organizations/{organizationId}/webhooks/events
curl --request GET \
--url 'https://api.sendwing.app/api/organizations/example/webhooks/events?limit=50&type=contact.created' \
--header 'x-api-key: <x-api-key>'

The events of the last 30 days, newest first, as they were delivered: to catch up after your endpoint was down, or to load recent examples. Sendwing records an event only while an enabled endpoint in the workspace listens for its type.

organizationId
required
string

The workspace, like org_…. An OAuth access token works in the one the member picked when connecting, which GET /me returns.

limit
integer
default: 50 >= 1 <= 100

How many items a page holds

cursor
string

The nextCursor of the previous page

type
string
Allowed values: contact.created contact.updated contact.deleted contact.subscribed contact.unsubscribed contact.tag_added contact.tag_removed email.sent email.delivered email.opened email.clicked email.bounced email.complained email.failed campaign.sent campaign.canceled domain.verified contact_import.completed contact_import.failed webhook.test

Only events of this type

A page of events

Media typeapplication/json
object
data
required
Array
One of:

A test event, sent only when you ask for one, to that endpoint

object
id
required

Like evt_…. The same on every delivery attempt: use it to skip duplicates

string
type
required
string
Allowed value: webhook.test
createdAt
required

When it happened

string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
data
required
object
endpoint
required
object
id
required
string
message
required
string
nextCursor
required

Pass as cursor to get the next page; null on the last page

string | null
retentionDays
required

How many days events are kept

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"data": [
{
"type": "webhook.test"
}
]
}

The request isn’t valid; issues lists each problem

Media typeapplication/json
object
error
required

What went wrong, in words you can show people

string
issues

For a 400: each invalid field, by its path in the request, like events.0.name

Array<object>
object
path
required
string
message
required
string
requestId

For a 5xx: quote it when contacting support

string

Example generated

{
"error": "example",
"issues": [
{
"path": "example",
"message": "example"
}
],
"requestId": "example"
}

The API key or access token is missing, invalid or expired

Media typeapplication/json
object
error
required

What went wrong, in words you can show people

string
issues

For a 400: each invalid field, by its path in the request, like events.0.name

Array<object>
object
path
required
string
message
required
string
requestId

For a 5xx: quote it when contacting support

string

Example generated

{
"error": "example",
"issues": [
{
"path": "example",
"message": "example"
}
],
"requestId": "example"
}

The API key’s permissions, or the app’s scopes and the member’s role, don’t allow this

Media typeapplication/json
object
error
required

What went wrong, in words you can show people

string
issues

For a 400: each invalid field, by its path in the request, like events.0.name

Array<object>
object
path
required
string
message
required
string
requestId

For a 5xx: quote it when contacting support

string

Example generated

{
"error": "example",
"issues": [
{
"path": "example",
"message": "example"
}
],
"requestId": "example"
}

Too many requests; wait for the seconds in Retry-After

Media typeapplication/json
object
error
required

What went wrong, in words you can show people

string
issues

For a 400: each invalid field, by its path in the request, like events.0.name

Array<object>
object
path
required
string
message
required
string
requestId

For a 5xx: quote it when contacting support

string

Example generated

{
"error": "example",
"issues": [
{
"path": "example",
"message": "example"
}
],
"requestId": "example"
}