Consent state and append-only history for one number

GET/v1/consent/{phone}

Path Parameters

  • phonestringrequired

    Example: +14155550132.

Responses

  • 200ConsentDetail

    Consent record

  • 401Error

    Missing, malformed, or revoked API key

  • 402Error

    Billable live calls only: the prepaid credit balance cannot cover the call (insufficient_credits); nothing was done or charged

  • 429Error

    Rate limit or quota exceeded

Response Fields

  • objectconsent
  • phonestring

    Example: +14155550132.

  • statusopted_out, opted_in, no_record
  • updated_atstring (date-time)
  • viastring

    Example: sms_phrase.

  • methodkeyword, phrase, ai, api, import, hosted_page
  • detectedstring

    The keyword or phrase that triggered detection

  • confidencenumber

    Intent-tier detections only, 0 to 1

  • campaign_idstring

    On the response to an opt-in recorded for one registration

  • proofOptInProof

    Opt-in evidence (Messaging Policy 1.4). Accepted only with status opted_in.

  • campaignsarray of object

    The registrations this number has an opt-in on file for (empty while opted out: STOP clears every scope)

  • campaigns[].campaign_idstring

    Example: reg_a1B2c3D4e5F6.

  • campaigns[].opted_in_atstring (date-time)
  • campaigns[].viastring

    Example: api_set.

  • campaigns[].proof_sourceweb_form, keyword, paper, checkout, verbal
  • historyarray of object

    Append-only consent history, newest first

  • history[].atstring (date-time)
  • history[].typeopt_out, opt_in, exempt_send, import, api_set, topic_unsubscribe, topic_subscribe, blocked_send, help, opt_in_request

    import is opt-in evidence from a contact import; topic_* are per-topic preferences; opt_in_request is a sign-up on your hosted opt-in page from a number that had opted out (kept as evidence; they stay opted out until they text START); blocked_send and help record a refused send and a HELP request. None of these changes the opt-out status.

  • history[].viastring
  • history[].methodstring
  • history[].detectedstring
  • history[].confidencenumber
  • history[].notestring
  • history[].proofOptInProof

    Opt-in evidence (Messaging Policy 1.4). Accepted only with status opted_in.

  • history[].campaign_idstring

    The registration an opt-in was given for; absent on account-level opt-ins and on every opt-out

Errors

Every error has the same JSON shape, and request_id matches the X-Request-Id response header. Errors lists every code and what to do about it.

  • 401

    Missing, malformed, or revoked API key

  • 402

    Billable live calls only: the prepaid credit balance cannot cover the call (insufficient_credits); nothing was done or charged

  • 429

    Rate limit or quota exceeded