List opt-outs
GET/messaging_optouts
Retrieve a list of opt-out blocks.
Request
Query Parameters
redaction_enabled boolean
If receiving address (+E.164 formatted phone number) should be redacted
Example: +447766****
filter object
Consolidated filter parameter (deepObject style). Originally: filter[messaging_profile_id], filter[from]
page object
Consolidated page parameter (deepObject style). Originally: page[number], page[size]
created_at object
Consolidated created_at parameter (deepObject style). Originally: created_at[gte], created_at[lte]
Responses
200: Successful response with opt-out list data
- application/json
400: Bad request
- application/json
401: Unauthorized
- application/json
Request samples
curl -L 'https://api.telnyx.com/v2/messaging_optouts' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
Response samples
{
"data": [
{
"from": "string",
"to": "+E.164",
"messaging_profile_id": "string",
"keyword": "STOP",
"created_at": "2025-04-28 12:00:38.631252"
}
],
"meta": {
"total_pages": 3,
"total_results": 55,
"page_number": 2,
"page_size": 25
}
}
{
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
{
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}