SMS

Record SMS consent

Record an SMS opt-in or opt-out that a recipient gave you — typically a checkbox on your own signup form. This is the supported way to bring consent you already hold into Unitpost so marketing SMS is accepted for that contact.

source is required: consent without recorded provenance is not consent, and the source is what makes the audit trail defensible. occurred_at may be backdated to when the recipient actually agreed (do not pretend historical consent happened just now); a future timestamp is rejected. Every call appends an immutable event, so the history is never overwritten.

Recording an opt-out suppresses SMS for this contact only — it does not touch their email subscription. Requires the contacts:write capability.

post/contacts/{id}/sms-consent

Request

  • Base URL: https://www.unitpost.com/api/v1
  • URL: https://www.unitpost.com/api/v1/contacts/{id}/sms-consent
  • Auth: HTTP bearer

Request body

action'opt_in' | 'opt_out' required
source'web_form' | 'hosted_form' | 'keyword' | 'qr' | 'verbal' | 'paper' | 'api_import' | 'api' required
purpose'marketing' | 'transactional'
phonestring
occurred_atstring date-time
evidence_urlstring uri
disclosure_versionstring

Response

The recorded consent event.

object'sms_consent' required
phonestring required

Changes

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