Phone Consents

Record call consent

Changed on

Records consent to call a number for a purpose (marketing or transactional). Required before an outbound call can be placed.

post/phone-consents

Request

  • Base URL
    https://api.crevio.co/v1
  • Auth
    API key in header Authorization

Headers

Idempotency-Key, string

Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.

Request body

PhoneConsentRequest required
e164, string required

The person's phone number. Without a country code it is read in your line's country; it is stored in E.164, e.g. +14155550123.

purpose, 'marketing' | 'transactional' required
consent_method, 'web_form' | 'checkout' | 'import' | 'verbal' | 'api' | 'other' required

Marketing consent must be web_form, checkout or api.

timezone, string nullable

IANA time zone of the person. Defaults to the number's local zone; required when it can't be told from the number.

contact, string nullable

Contact ID; an unknown one is a 404.

proof, object

Response

Consent recorded

PhoneConsent required
id, string required
object, string required
e164, string required
purpose, 'marketing' | 'transactional' required
consent_method, 'web_form' | 'checkout' | 'import' | 'verbal' | 'api' | 'other' required
timezone, string nullable required
consented_at, string date-time required
revoked_at, string date-time nullable required
created_at, string date-time required
updated_at, string date-time required
contact, string nullable required

Changes

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    4 more changes in this revision