Show

GET /:account/opt_outs/:phone_number

An OptOut is a phone number that has been flagged to prevent delivery of messages. This endpoint allows for the ability to search for an OptOut by phone number if there is one. The response of this endpoint is a representation of the first OptOut associated to the phone number provided.”

Examples

List the first OptOut on an Account

Request

GET /my_account/opt_outs/5558765559
Example
$ curl -i -H Accept:"application/vnd.textus+jsonld" \
    -H Authorization:"Bearer {token}" \
    -X GET /my_account/opt_outs/5558765559
    

Response

Status

200

Response Type

OptOut

Example Body

{
  "@type": "OptOut",
  "@context": "/contexts/OptOut.jsonld",
  "id": "/textus/opt_outs/+15553031234",
  "createdAt": "2020-07-30T15:18:52.133Z",
  "formattedPhoneNumber": "5553031234",
  "user": null,
  "createdVia": "User",
  "originatingAccount": {
    "@type": "Account",
    "@context": "/contexts/Account.jsonld",
    "id": "/accounts/my_account",
    "name": "My Account"
  }
}

© 2024 TextUs