Contacts

Record contact consent

Records the contact's consent on one channel at one of its addresses and returns the contact. opted_out stops every send on that channel to that address until the contact opts back in; opted_in is what channels that require opt-in check for. source and capturedAt say where and when the contact decided; proof keeps your evidence. A decision captured before the recorded one is ignored. A change publishes contact.consent_changed.

put/v1/contacts/{id}/identities/{identityId}/consent/{channel}

Request

  • Base URL: https://api.samva.dev
  • URL: https://api.samva.dev/v1/contacts/{id}/identities/{identityId}/consent/{channel}
  • Auth: API key in header x-api-key

Path parameters

idstring required
identityIdstring required
channel'email' required

Request body

status'opted_in' | 'opted_out' required
sourcestring required

Where the consent was captured, such as a form URL or a checkout step.

capturedAtstring required
proofJsonObject

Response

Contact

idstring required
namespaceIdstring required
namestring required
displayNamestring nullable required
avatarstring nullable required
status'active' | 'paused' | 'blocked' | 'archived' required
statusReasonstring nullable required
externalIdstring nullable required
tagsstring[] required
metadataJsonObject required
createdAtstring required
updatedAtstring required

Changes

No recorded changes to this operation across all 1 revision of this API.