Link Search Menu Expand Document

Updated Thu Sep 23rd 2021, 14:49 UTC

Block Contacts

PUT /campaigns/:campaign/campaign_recipients/:recipient_filter/block{?select_all}

Multiple contacts in a given recipients filter can be blocked by a user.

Examples

Batch block with IDs

Request

PUT /campaigns/joOQd57/campaign_recipients/total/block

Body

{
  "recipients": <%= @campaign.recipients.map { |recipient| recipient_path(recipient) } %>
}
Example
$ curl -i -H Accept:"application/vnd.textus+jsonld" \
    -H Authorization:"Bearer {token}" \
    -X PUT /campaigns/joOQd57/campaign_recipients/total/block
     -d '{json: "body"}' 

Response

Status

202

Response Type

No body

Batch block by select_all

Request

PUT /campaigns/joOQd57/campaign_recipients/total/block?select_all=true
Example
$ curl -i -H Accept:"application/vnd.textus+jsonld" \
    -H Authorization:"Bearer {token}" \
    -X PUT /campaigns/joOQd57/campaign_recipients/total/block?select_all=true
    

Response

Status

202

Response Type

No body


© 2021 TextUs