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
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"
}
}