Skip to content

Newsletter Subscription

This webhook sends an event with user data at the moment they accept being added to the institution’s newsletter.

ParameterTypeDescription
namestringName of the event: “Newsletter - Aceitar newsletter”
slugstringUnique identifier: newslatter.created
send_atstringDate and time of the event (format: “yyyy-MM-dd HH:mm:ss”)
acaostringAction associated with the event: accept_newslatter

ParameterTypeDescription
idnumberNumerical identifier of the user.
namestringName of the user.
emailstringEmail address of the user.
institutionarrayList of institutions the user belongs to.
institution[].idnumberInstitution identifier.
institution[].schoolsarraySchools associated with the institution.
institution[].schools[].idnumberSchool identifier.
institution[].schools[].role_idnumberUser role ID in the school.
institution[].schools[].created_atstringCreation date (format: “dd/MM/yyyy HH:mm:ss”).
institution[].schools[].updated_atstringLast update date (format: “dd/MM/yyyy HH:mm:ss”).
cpfstringUser’s CPF.
nicknamestring | nullUser’s nickname.

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.

{
"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
}
}
}

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.