Skip to main content Link Search Menu Expand Document (external link)

Updated Mon Nov 28th 2022, 17:50 UTC

Create

PUT /:account/opt_outs/:phone_number

An OptOut can be created from the phone number provided

Examples

Create an OptOut

Request

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

Response

Status

201

Response Type

OptOut

Example Body

{
  "@type": "OptOut",
  "@context": "/contexts/OptOut.jsonld",
  "id": "/textus/opt_outs/735",
  "createdAt": "2022-09-01T16:47:10.028439Z",
  "formattedPhoneNumber": "5558765559",
  "createdVia": "User",
  "originatingAccount": {
    "@type": "Account",
    "@context": "/contexts/Account.jsonld",
    "id": "/accounts/my_account",
    "name": "Example Account"
  },
  "user": {
    "@type": "User",
    "@context": "/contexts/User.jsonld",
    "id": "/users/wqyODPA",
    "name": "Chuck Norris",
    "firstName": "Chuck",
    "lastName": "Norris",
    "email": "chuck@textus.example",
    "avatar": null,
    "automatedActor": false,
    "hasPassword": false,
    "discarded": false,
    "settings": {
      "customSettings": {}
    },
    "memberships": "/users/wqyODPA/memberships"
  }
}

© 2022 TextUs