Skip to content

Get a webhook

GET
/webhooks/{id}
curl --request GET \
--url https://api.sendtruss.com/v1/webhooks/example \
--header 'Authorization: Bearer <token>'

With the body as we would send it now.

id
required
string

WebhookResource

Media typeapplication/json
object
data
required
WebhookResource
object
id
required
string
type
required
string
source
required

Where the change came from: recipient when the person did it, such as leaving marketing or marking an email as spam; sendtruss when our sending or our own rules recorded it.

string
endpoint_id
required
string
workspace
required
object
id
required
string | null
reference
required
string | null
state
required

pending until your endpoint answers 2xx (delivered) or we give up (failed).

string
attempts
required
integer
last_attempt_at
required
string | null
last_status
required

The HTTP status your endpoint last answered with, or null when it gave none.

integer | null
last_error
required

What went wrong on the last attempt, or null.

string | null
delivered_at
required
string | null
created_at
required
string
body
string
Examplegenerated
{
"data": {
"id": "example",
"type": "example",
"source": "example",
"endpoint_id": "example",
"workspace": {
"id": "example",
"reference": "example"
},
"state": "example",
"attempts": 1,
"last_attempt_at": "example",
"last_status": 1,
"last_error": "example",
"delivered_at": "example",
"created_at": "example",
"body": "example"
}
}
Request-Id
required
string format: uuid

This request’s id. Quote it when you ask us about the request.

The API key is missing, malformed, revoked or expired.

Media typeapplication/json
object
message
required

What went wrong, for a person to read. It may change, so branch on code.

string
code
required

What went wrong, for your code to branch on. A new code is not a breaking change.

string
Allowed values: unauthenticated
doc_url
required

The entry on our errors page that explains this code.

string format: uri
request_id
required

This request’s id, the same as its Request-Id header. Quote it when you ask us about the request.

string format: uuid
Example
{
"code": "unauthenticated"
}
Request-Id
required
string format: uuid

This request’s id. Quote it when you ask us about the request.

Nothing is at this path for your key. Another platform’s or another workspace’s resource answers the same as one that doesn’t exist.

Media typeapplication/json
object
message
required

What went wrong, for a person to read. It may change, so branch on code.

string
code
required

What went wrong, for your code to branch on. A new code is not a breaking change.

string
Allowed values: not_found
doc_url
required

The entry on our errors page that explains this code.

string format: uri
request_id
required

This request’s id, the same as its Request-Id header. Quote it when you ask us about the request.

string format: uuid
Example
{
"code": "not_found"
}
Request-Id
required
string format: uuid

This request’s id. Quote it when you ask us about the request.

Too many requests. Wait for the seconds in Retry-After.

Media typeapplication/json
object
message
required

What went wrong, for a person to read. It may change, so branch on code.

string
code
required

What went wrong, for your code to branch on. A new code is not a breaking change.

string
Allowed values: rate_limited
doc_url
required

The entry on our errors page that explains this code.

string format: uri
request_id
required

This request’s id, the same as its Request-Id header. Quote it when you ask us about the request.

string format: uuid
Example
{
"code": "rate_limited"
}
Request-Id
required
string format: uuid

This request’s id. Quote it when you ask us about the request.

Retry-After
integer

Seconds to wait before trying again.