Newsletter Subscription
This webhook sends an event with user data at the moment they accept being added to the institution’s newsletter.
Event Details
Section titled “Event Details”| Parameter | Type | Description |
|---|---|---|
name | string | Name of the event: “Newsletter - Aceitar newsletter” |
slug | string | Unique identifier: newslatter.created |
send_at | string | Date and time of the event (format: “yyyy-MM-dd HH:mm:ss”) |
acao | string | Action associated with the event: accept_newslatter |
Payload Structure
Section titled “Payload Structure”User Object
Section titled “User Object”| Parameter | Type | Description |
|---|---|---|
id | number | Numerical identifier of the user. |
name | string | Name of the user. |
email | string | Email address of the user. |
institution | array | List of institutions the user belongs to. |
institution[].id | number | Institution identifier. |
institution[].schools | array | Schools associated with the institution. |
institution[].schools[].id | number | School identifier. |
institution[].schools[].role_id | number | User role ID in the school. |
institution[].schools[].created_at | string | Creation date (format: “dd/MM/yyyy HH:mm:ss”). |
institution[].schools[].updated_at | string | Last update date (format: “dd/MM/yyyy HH:mm:ss”). |
cpf | string | User’s CPF. |
nickname | string | null | User’s nickname. |
Trigger Action
Section titled “Trigger Action”The webhook will be triggered when a user opts to participate in the newsletter, sending relevant data so the institution can add the user to the subscriber list.
Payload Example
Section titled “Payload Example”{ "event": { "name": "Newsletter - Aceitar newsletter", "slug": "newslatter.created", "send_at": "2023-07-03 12:56:48", "acao": "accept_newslatter" }, "data": { "user": { "id": 123456, "name": "Student Name", "email": "student@toolzz.com", "institution": [ { "id": 12345, "schools": [ { "id": 123456789, "role_id": 4, "created_at": "03/07/2023 12:52:18", "updated_at": "03/07/2023 12:52:18" } ] } ], "cpf": "123.456.789-99", "nickname": null } }}Security
Section titled “Security”Ensure that the destination URL is correct before you start sending payloads. Verify that the parameters sent are correct and complete. Make sure that the webhook recipients are correct and valid. Log and monitor all webhook calls for auditing and troubleshooting purposes.