Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

Segment Resource (Deprecated)


(error)

Danger

Twilio deprecated Notify in October 2022 and no longer supports it. Learn more about transitioning off Notify(link takes you to an external page).

If you're starting a new project, use Programmable Messaging for SMS notifications. For push notifications, integrate directly with platform-specific services such as APNs for iOS or FCM for Android. If you've already built on Notify, visit the transition guide(link takes you to an external page) to learn about your options.

(error)

Danger

The Segment resource is deprecated and has been replaced by the tags property of the Binding resource.

A Segment is a group of Users.

Because the Segment resource is deprecated, use the tags property of the Binding resource to identify groups of users that you would like to notify with a single request.


Segment properties

segment-properties page anchor

The Segment resource is deprecated.


Read multiple Segment resources

read-multiple-segment-resources page anchor
Read multiple Segment resourcesLink to code sample: Read multiple Segment resources
1
curl -X GET "https://notify.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Segments?PageSize=20" \
2
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN

Output

1
{
2
"segments": [
3
{
4
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
5
"date_created": "2017-02-14T14:36:41Z",
6
"date_updated": "2017-02-14T14:36:41Z",
7
"service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
8
"sid": "GSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
9
"unique_name": "segment"
10
}
11
],
12
"meta": {
13
"first_page_url": "https://notify.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Segments?PageSize=50&Page=0",
14
"key": "segments",
15
"next_page_url": "https://notify.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Segments?PageSize=50&Page=1",
16
"page": 0,
17
"page_size": 50,
18
"previous_page_url": "https://notify.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Segments?PageSize=50&Page=0",
19
"url": "https://notify.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Segments?PageSize=50&Page=0"
20
}
21
}