Skip to main content

Method

PATCH /v1/people/:id/consent

Path Parameters

id
string
required
The person ID.

Headers

Authorization
string
required
Bearer token (requires customers:write).
Content-Type
string
required
application/json

Body Parameters

channel
string
required
The consent channel: email or sms.
granted
boolean
required
Whether consent is granted (true) or revoked (false).

Request Example

curl -X PATCH "https://api.voyantcloud.com/v1/people/people_01HZYPM2QF2R8X9SZQ0J9SYBCN/consent" \
  -H "Authorization: Bearer $VOYANT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "channel": "email",
    "granted": true
  }'

Response Example

{
  "channel": "email",
  "granted": true,
  "updated_at": "2025-01-15T10:30:00.000Z"
}
Marketing consent is a legal requirement in many jurisdictions (GDPR, CAN-SPAM, etc.). Only send marketing communications to people who have granted consent. Always record the source of consent for compliance purposes.
When integrating with external forms or signup flows, use this endpoint to record consent captured from those sources. The source field will be set to api for all updates made through this endpoint.