diff --git a/changelog/november2024/2024-11-05-transactional-email-changed-webhook-event-update-to-ema.mdx b/changelog/november2024/2024-11-05-transactional-email-changed-webhook-event-update-to-ema.mdx index 7395e363a4..a44a438757 100644 --- a/changelog/november2024/2024-11-05-transactional-email-changed-webhook-event-update-to-ema.mdx +++ b/changelog/november2024/2024-11-05-transactional-email-changed-webhook-event-update-to-ema.mdx @@ -9,5 +9,5 @@ category: managed-services product: transactional-email --- -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. +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. diff --git a/macros/tem/webhook-event-status.mdx b/macros/tem/webhook-event-status.mdx new file mode 100644 index 0000000000..91231ea185 --- /dev/null +++ b/macros/tem/webhook-event-status.mdx @@ -0,0 +1,16 @@ +--- +macro: webhook-event-status +--- + +The Webhook event status indicates the status of the webhook delivery. + +These are the different event statuses: + +- `unknown_status`: The status of the event is unknown by default. This status is used when the event status has not been specified. +- `sending`: The webhook event is being sent. This means that the notification is in transit to the configured URL. +- `sent`: The webhook event was successfully sent. This status indicates that the configured URL received the notification. +- `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. + + + Refer to the [Transactional Email API documentation](https://www.scaleway.com/en/developers/api/transactional-email/) for more information about event statuses. + diff --git a/macros/tem/webhook-event-types.mdx b/macros/tem/webhook-event-types.mdx new file mode 100644 index 0000000000..2cbe650122 --- /dev/null +++ b/macros/tem/webhook-event-types.mdx @@ -0,0 +1,21 @@ +--- +macro: webhook-event-types +--- + +The Webhook event type defines the type of event that triggered the webhook. + +These are the different event types: + +- `unknown_type`: The event type is unknown by default. This type is used when the event type has not been specified. +- `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. +- `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. +- `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. +- `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. +- `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. +- `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. +- `email_blocklisted` - An email was blocked by an active blocklist. +- `blocklist_created` - A blocklist is created for an email address. Any new emails sent by the address will be blocked. + + + Refer to the [Transactional Email API documentation](https://www.scaleway.com/en/developers/api/transactional-email/) for more information about event types. + \ No newline at end of file diff --git a/menu/navigation.json b/menu/navigation.json index 7d48e8856e..6b0905c5db 100644 --- a/menu/navigation.json +++ b/menu/navigation.json @@ -2942,10 +2942,6 @@ { "label": "Setting up and using TEM webhooks with Topics and Events", "slug": "use-webhooks-with-sns-topics" - }, - { - "label": "Understanding Webhook event payloads", - "slug": "webhook-events-payloads" } ], "label": "API/CLI", @@ -2976,6 +2972,10 @@ { "label": "Understanding managed dedicated IPs", "slug": "tem-dedicated-ip" + }, + { + "label": "Understanding webhook event payloads", + "slug": "webhook-events-payloads" } ], "label": "Additional Content", diff --git a/pages/transactional-email/concepts.mdx b/pages/transactional-email/concepts.mdx index 764581e28d..28471b5979 100644 --- a/pages/transactional-email/concepts.mdx +++ b/pages/transactional-email/concepts.mdx @@ -208,35 +208,8 @@ Two plans are available: ## Webhook Event Type -The Webhook event type defines the type of event that triggered the webhook. - -These are the different event types: - -- `unknown_type`: The event type is unknown by default. This type is used when the event type has not been specified. -- `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. -- `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. -- `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. -- `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. -- `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. -- `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. -- `email_blocklisted` - An email was blocked by an active blocklist. -- `blocklist_created` - A blocklist is created for an email address. Any new emails sent by the address will be blocked. - - - Refer to the [Transactional Email API documentation](https://www.scaleway.com/en/developers/api/transactional-email/) for more information about event types. - + ## Webhook Event Status -The Webhook event status indicates the status of the webhook delivery. - -These are the different event statuses: - -- `unknown_status`: The status of the event is unknown by default. This status is used when the event status has not been specified. -- `sending`: The webhook event is being sent. This means that the notification is in transit to the configured URL. -- `sent`: The webhook event was successfully sent. This status indicates that the notification was received by the configured URL. -- `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. - - - Refer to the [Transactional Email API documentation](https://www.scaleway.com/en/developers/api/transactional-email/) for more information about event statuses. - \ No newline at end of file + \ No newline at end of file diff --git a/pages/transactional-email/how-to/create-webhooks.mdx b/pages/transactional-email/how-to/create-webhooks.mdx index bfc5837823..443179c0a9 100644 --- a/pages/transactional-email/how-to/create-webhooks.mdx +++ b/pages/transactional-email/how-to/create-webhooks.mdx @@ -56,6 +56,10 @@ You can create only one webhook per domain. 6. Click **Create Webhook** to confirm. A list of your webhooks appears. + + Refer to the [Understanding webhook event payloads](/transactional-email/reference-content/webhook-events-payloads/) for more information on the content of webhook responses. + + ## How to edit a webhook Once you have created webhooks, you can edit their settings anytime. diff --git a/pages/transactional-email/api-cli/webhook-events-payloads.mdx b/pages/transactional-email/reference-content/webhook-events-payloads.mdx similarity index 95% rename from pages/transactional-email/api-cli/webhook-events-payloads.mdx rename to pages/transactional-email/reference-content/webhook-events-payloads.mdx index 4eb00c36e3..5e4ef192b8 100644 --- a/pages/transactional-email/api-cli/webhook-events-payloads.mdx +++ b/pages/transactional-email/reference-content/webhook-events-payloads.mdx @@ -21,7 +21,7 @@ Find below a detailed description of the fields in a [Webhook event](/transactio | Tag | Description | |---------|-------------------------------------| | `id` | Event identifier | -| `type` | Event type | +| `type` | Event type. Find a full list of event types in the [section below](#webhook-event-type). | | `organization_id` | Domain Organization | | `project_id` | Domain Project | | `domain_id` | Domain identifier | @@ -40,6 +40,14 @@ Find below a detailed description of the fields in a [Webhook event](/transactio | `email_response_message` | SMTP response message | +## Webhook event type + + + +## Webhook event status + + + ## Examples of payload by event type Webhooks may trigger different [types of events](/transactional-email/concepts/#webhook-event-type). These types have varying payload fields.