Skip to content

Commit e570e77

Browse files
fix(tem): unify webhook xps (#5051)
1 parent 2ca2f02 commit e570e77

File tree

7 files changed

+57
-35
lines changed

7 files changed

+57
-35
lines changed

changelog/november2024/2024-11-05-transactional-email-changed-webhook-event-update-to-ema.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ category: managed-services
99
product: transactional-email
1010
---
1111

12-
The `email_error` field has been replaced by two new fields: `response_code` and `response_message`. This change allows for more precise error identification and improved tracking of response details. See the [documentation](/transactional-email/api-cli/webhook-events-payloads/) for full details.
12+
The `email_error` field has been replaced by two new fields: `response_code` and `response_message`. This change allows for more precise error identification and improved tracking of response details. See the [documentation](/transactional-email/reference-content/webhook-events-payloads) for full details.
1313

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
macro: webhook-event-status
3+
---
4+
5+
The Webhook event status indicates the status of the webhook delivery.
6+
7+
These are the different event statuses:
8+
9+
- `unknown_status`: The status of the event is unknown by default. This status is used when the event status has not been specified.
10+
- `sending`: The webhook event is being sent. This means that the notification is in transit to the configured URL.
11+
- `sent`: The webhook event was successfully sent. This status indicates that the configured URL received the notification.
12+
- `failed`: The webhook event could not be sent after multiple attempts. This status means there were repeated errors during the attempt to send the notification.
13+
14+
<Message type="note">
15+
Refer to the [Transactional Email API documentation](https://www.scaleway.com/en/developers/api/transactional-email/) for more information about event statuses.
16+
</Message>

macros/tem/webhook-event-types.mdx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
macro: webhook-event-types
3+
---
4+
5+
The Webhook event type defines the type of event that triggered the webhook.
6+
7+
These are the different event types:
8+
9+
- `unknown_type`: The event type is unknown by default. This type is used when the event type has not been specified.
10+
- `email_queued`: The email was received and is being prepared to be sent to the destination servers. This event indicates that the email-sending process has started.
11+
- `email_dropped`: The email was sent but was definitively rejected by the destination server, or hard-bounced. This can occur due to incorrect or non-existent email addresses.
12+
- `email_deferred`: The email was sent but was temporarily rejected by the destination server, or soft-bounced. In this case, the sending of the email will be automatically retried. This event type can occur when the destination server is temporarily unavailable.
13+
- `email_delivered`: The email was successfully sent and accepted by the destination server. This event confirms that the email has reached the recipient's inbox.
14+
- `email_spam`: The email was identified as spam by Scaleway or the destination server. This event indicates that the email was classified as spam, either by an automated filter or by the recipient.
15+
- `email_mailbox_not_found`: The email was definitively rejected with a "mailbox not found" error. This indicates that the recipient's email address does not exist or is no longer active.
16+
- `email_blocklisted` - An email was blocked by an active blocklist.
17+
- `blocklist_created` - A blocklist is created for an email address. Any new emails sent by the address will be blocked.
18+
19+
<Message type="note">
20+
Refer to the [Transactional Email API documentation](https://www.scaleway.com/en/developers/api/transactional-email/) for more information about event types.
21+
</Message>

menu/navigation.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2942,10 +2942,6 @@
29422942
{
29432943
"label": "Setting up and using TEM webhooks with Topics and Events",
29442944
"slug": "use-webhooks-with-sns-topics"
2945-
},
2946-
{
2947-
"label": "Understanding Webhook event payloads",
2948-
"slug": "webhook-events-payloads"
29492945
}
29502946
],
29512947
"label": "API/CLI",
@@ -2976,6 +2972,10 @@
29762972
{
29772973
"label": "Understanding managed dedicated IPs",
29782974
"slug": "tem-dedicated-ip"
2975+
},
2976+
{
2977+
"label": "Understanding webhook event payloads",
2978+
"slug": "webhook-events-payloads"
29792979
}
29802980
],
29812981
"label": "Additional Content",

pages/transactional-email/concepts.mdx

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -208,35 +208,8 @@ Two plans are available:
208208

209209
## Webhook Event Type
210210

211-
The Webhook event type defines the type of event that triggered the webhook.
212-
213-
These are the different event types:
214-
215-
- `unknown_type`: The event type is unknown by default. This type is used when the event type has not been specified.
216-
- `email_queued`: The email was received and is being prepared to be sent to the destination servers. This event indicates that the email sending process has started.
217-
- `email_dropped`: The email was sent but was definitively rejected by the destination server, or hard-bounced. This can occur due to incorrect or non-existent email addresses.
218-
- `email_deferred`: The email was sent but was temporarily rejected by the destination server, or soft-bounced. In this case, the sending of the email will be automatically retried. This event type can occur when the destination server is temporarily unavailable.
219-
- `email_delivered`: The email was successfully sent and accepted by the destination server. This event confirms that the email has reached the recipient's inbox.
220-
- `email_spam`: The email was identified as spam by Scaleway or the destination server. This event indicates that the email was classified as spam, either by an automated filter or by the recipient.
221-
- `email_mailbox_not_found`: The email was definitively rejected with a "mailbox not found" error. This indicates that the recipient's email address does not exist or is no longer active.
222-
- `email_blocklisted` - An email was blocked by an active blocklist.
223-
- `blocklist_created` - A blocklist is created for an email address. Any new emails sent by the address will be blocked.
224-
225-
<Message type="note">
226-
Refer to the [Transactional Email API documentation](https://www.scaleway.com/en/developers/api/transactional-email/) for more information about event types.
227-
</Message>
211+
<Macro id="webhook-event-types" />
228212

229213
## Webhook Event Status
230214

231-
The Webhook event status indicates the status of the webhook delivery.
232-
233-
These are the different event statuses:
234-
235-
- `unknown_status`: The status of the event is unknown by default. This status is used when the event status has not been specified.
236-
- `sending`: The webhook event is being sent. This means that the notification is in transit to the configured URL.
237-
- `sent`: The webhook event was successfully sent. This status indicates that the notification was received by the configured URL.
238-
- `failed`: The webhook event could not be sent after multiple attempts. This status means there were repeated errors during the attempt to send the notification.
239-
240-
<Message type="note">
241-
Refer to the [Transactional Email API documentation](https://www.scaleway.com/en/developers/api/transactional-email/) for more information about event statuses.
242-
</Message>
215+
<Macro id="webhook-event-status" />

pages/transactional-email/how-to/create-webhooks.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ You can create only one webhook per domain.
5656
</Message>
5757
6. Click **Create Webhook** to confirm. A list of your webhooks appears.
5858

59+
<Message type="note">
60+
Refer to the [Understanding webhook event payloads](/transactional-email/reference-content/webhook-events-payloads/) for more information on the content of webhook responses.
61+
</Message>
62+
5963
## How to edit a webhook
6064

6165
Once you have created webhooks, you can edit their settings anytime.

pages/transactional-email/api-cli/webhook-events-payloads.mdx renamed to pages/transactional-email/reference-content/webhook-events-payloads.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Find below a detailed description of the fields in a [Webhook event](/transactio
2121
| Tag | Description |
2222
|---------|-------------------------------------|
2323
| `id` | Event identifier |
24-
| `type` | Event type |
24+
| `type` | Event type. Find a full list of event types in the [section below](#webhook-event-type). |
2525
| `organization_id` | Domain Organization |
2626
| `project_id` | Domain Project |
2727
| `domain_id` | Domain identifier |
@@ -40,6 +40,14 @@ Find below a detailed description of the fields in a [Webhook event](/transactio
4040
| `email_response_message` | SMTP response message |
4141

4242

43+
## Webhook event type
44+
45+
<Macro id="webhook-event-types" />
46+
47+
## Webhook event status
48+
49+
<Macro id="webhook-event-status" />
50+
4351
## Examples of payload by event type
4452

4553
Webhooks may trigger different [types of events](/transactional-email/concepts/#webhook-event-type). These types have varying payload fields.

0 commit comments

Comments
 (0)