Skip to main content

List opt-outs

GET 
/messaging_optouts

Retrieve a list of opt-out blocks.

Request

Query Parameters

    filter[messaging_profile_id] string

    The ID of the messaging profile to retrieve opt-outs for

    created_at[gte] date-time

    Filter opt-outs created after this date (ISO-8601 format)

    filter[from] string

    The sending address (+E.164 formatted phone number, alphanumeric sender ID, or short code) to retrieve opt-outs for

    created_at[lte] date-time

    Filter opt-outs created before this date (ISO-8601 format)

    redaction_enabled boolean

    If receiving address (+E.164 formatted phone number) should be redacted

    Example: +447766****
    page[number] integer

    Possible values: >= 1

    Default value: 1

    The page number to load

    page[size] integer

    Possible values: >= 1 and <= 250

    Default value: 20

    The size of the page

Responses

200: Successful response with opt-out list data

400: Bad request

401: Unauthorized

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