Compliance & Consent
Record a consent event
Records that a person granted or withdrew consent, with the evidence you hold (the wording shown, the page URL, the IP, a reference). recorded_at may be backdated for an imported consent; it cannot be in the future. A marketing withdrawal is also placed on the opt-out list immediately.
source is limited to api, form, import and dashboard: the keyword and inbound sources are the platform's own observations and are reserved.
post/consents
Request
- Base URL: https://api.envoisms.ma/v1
- URL: https://api.envoisms.ma/v1/consents
- Auth: HTTP bearer
Request body
Example request
{
"phone": "+212612345678",
"evidence": {
"text": "J'accepte de recevoir les offres par WhatsApp",
"url": "https://example.ma/inscription",
"ip": "41.140.0.1"
}
}Response
Event recorded
Example response
{
"id": "cns_9f2a...",
"phone": "+212612345678"
}Changes
No recorded changes to this operation across all 1 revision of this API.