Skip to content

Commit 9fcc345

Browse files
docs(tem): webhook events payload (scaleway#3734)
1 parent 3060080 commit 9fcc345

File tree

2 files changed

+186
-1
lines changed

2 files changed

+186
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
---
2+
meta:
3+
title: Understanding Webhook event payloads
4+
description: This page details the fields of the webhook event payloads for Scaleway Transactional Email
5+
content:
6+
h1: Understanding Webhook event payloads
7+
paragraph: This page details the fields of the webhook event payloads for Scaleway Transactional Email
8+
tags: spf dkim dmarc transactional
9+
dates:
10+
validation: 2024-09-20
11+
posted: 2024-09-20
12+
categories:
13+
- managed-services
14+
---
15+
16+
Events triggered by webhooks contain payloads that describe and detail the events.
17+
18+
Find below a detailed description of the fields in a [Webhoook event](/managed-services/transactional-email/how-to/create-webhooks/) payload.
19+
20+
21+
| Tag | Description |
22+
|---------|-------------------------------------|
23+
| `id` | Event identifier |
24+
| `type` | Event type |
25+
| `organization_id` | Domain Organization |
26+
| `project_id` | Domain Project |
27+
| `domain_id` | Domain identifier |
28+
| `domain_name` | Domain name |
29+
| `created_at` | Event creation date. Dates should be included in RFC-3339 format. |
30+
| `email_sent_at` | Email reception date by the recipient server. Dates should be included in RFC-3339 format. |
31+
| `email_queued_at` | Email reception date by TEM proxy or API. Dates should be included in RFC-3339 format. |
32+
| `email_id` | Email identifier (used for GetEmail endpoint) |
33+
| `email_from` | Email FROM address |
34+
| `email_to` | Email recipient address |
35+
| `email_headers` | SMTP headers |
36+
| `email_error` | SMTP message explaining the drop |
37+
| `email_next_try` | Next time the email will be sent to the recipient server |
38+
| `email_try_count` | Total number of tries attempted for this email |
39+
40+
41+
## Examples of payload by event type
42+
43+
Webhooks may trigger different [types of events](/managed-services/transactional-email/concepts/#webhook-event-type). These types have varying payload fields.
44+
45+
## email_queued
46+
```json
47+
{
48+
"id": string,
49+
"type": "email_queued",
50+
"organization_id": string,
51+
"project_id": string,
52+
"domain_id": string,
53+
"domain_name": string,
54+
"created_at": date,
55+
"email_queued_at": date,
56+
"email_id": string,
57+
"email_from": string,
58+
"email_to": string,
59+
"email_headers": [
60+
{
61+
"name": string,
62+
"value": string
63+
}
64+
]
65+
}
66+
```
67+
## email_dropped
68+
```json
69+
{
70+
"id": string,
71+
"type": "email_dropped",
72+
"organization_id": string,
73+
"project_id": string,
74+
"domain_id": string,
75+
"domain_name": string,
76+
"created_at": date,
77+
"email_sent_at": date,
78+
"email_id": string,
79+
"email_from": string,
80+
"email_to": string,
81+
"email_headers": [
82+
{
83+
"name": string,
84+
"value": string
85+
}
86+
],
87+
"email_error": string,
88+
}
89+
```
90+
## email_delivered
91+
```json
92+
{
93+
"id": string,
94+
"type": "email_delivered",
95+
"organization_id": string,
96+
"project_id": string,
97+
"domain_id": string,
98+
"domain_name": string,
99+
"created_at": date,
100+
"email_sent_at": date,
101+
"email_id": string,
102+
"email_from": string,
103+
"email_to": string,
104+
"email_headers": [
105+
{
106+
"name": string,
107+
"value": string
108+
}
109+
]
110+
}
111+
```
112+
## email_mailbox_not_found
113+
```json
114+
{
115+
"id": string,
116+
"type": "email_mailbox_not_found",
117+
"organization_id": string,
118+
"project_id": string,
119+
"domain_id": string,
120+
"domain_name": string,
121+
"created_at": date,
122+
"email_sent_at": date,
123+
"email_id": string,
124+
"email_from": string,
125+
"email_to": string,
126+
"email_headers": [
127+
{
128+
"name": string,
129+
"value": string
130+
}
131+
]
132+
}
133+
```
134+
## email_spam
135+
```json
136+
{
137+
"id": string,
138+
"type": "email_spam",
139+
"organization_id": string,
140+
"project_id": string,
141+
"domain_id": string,
142+
"domain_name": string,
143+
"created_at": date,
144+
"email_sent_at": date,
145+
"email_id": string,
146+
"email_from": string,
147+
"email_to": string,
148+
"email_headers": [
149+
{
150+
"name": string,
151+
"value": string
152+
}
153+
]
154+
}
155+
```
156+
## email_deferred
157+
```json
158+
{
159+
"id": string,
160+
"type": "email_deferred",
161+
"organization_id": string,
162+
"project_id": string,
163+
"domain_id": string,
164+
"domain_name": string,
165+
"created_at": date,
166+
"email_sent_at": date,
167+
"email_id": string,
168+
"email_from": string,
169+
"email_to": string,
170+
"email_headers": [
171+
{
172+
"name": string,
173+
"value": string
174+
}
175+
],
176+
"email_error": string,
177+
"email_next_try": date,
178+
"email_try_count": integer
179+
}
180+
```
181+

menu/navigation.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -2401,6 +2401,10 @@
24012401
{
24022402
"label": "Setting up and using TEM webhooks with SNS topics",
24032403
"slug": "use-webhooks-with-sns-topics"
2404+
},
2405+
{
2406+
"label": "Understanding Webhook event payloads",
2407+
"slug": "webhook-events-payloads"
24042408
}
24052409
],
24062410
"label": "API/CLI",
@@ -5329,4 +5333,4 @@
53295333
],
53305334
"label": "Additional Services"
53315335
}
5332-
]
5336+
]

0 commit comments

Comments
 (0)