v1.0.0
OpenAPI 3.1.0

Lookup a customer's opt-outs

US region

Client Libraries

Lookup a customer's opt-outs

Return a list of the senders and channels that a person has opted out of, across all channels.

An entry's presence in the optouts array means the person is opted out of that sender/channel. Use the PUT /v1/customers/{customer_id}/optouts endpoint to opt a person out of, or back in to, specific senders.

Path Parameters
  • customer_id
    Type: string
    required

    The ID of the customer you want to perform an operation against.

Query Parameters
  • id_type
    Type: stringenum

    The type of customer_id you want to use to reference a person. If you don't provide this parameter, we assume that the customer_id in your request is a person's id. You can use email and phone only if they're enabled as identifiers in your workspace settings; otherwise the request returns 400. Reference phone values in E.164 format, like +14155552671, and URL-encode the leading + as %2B.

    values
    • id
    • email
    • phone
    • cio_id
Responses
  • application/json
  • 404

    The customer_id does not exist.

  • 429

    Your request is over the 10-per-second limit.

Request Example for get/v1/customers/{customer_id}/optouts
curl 'https://api.customer.io/v1/customers/12345/optouts?id_type=id' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "optouts": [
    {
      "channel": "sms",
      "from": "+15551234567"
    },
    {
      "channel": "whatsapp",
      "from": "+15559876543"
    }
  ]
}