# View user segment

You can return all users assigned to a specific user segment.

GET /segments/:id/users/

Attributes Type Required Description
id integer yes A unique identifier for the users' segment which is given by User.com automatically.

# Request

  • CURL
  • JavaScript
  • PHP
  • Python
curl -X GET -H
"Authorization: Token <your_64_char_api_key>"
"https://<your_app_subdomain>.user.com/api/public/segments/:id/users/"

# Response

{
  "count": 2,
  "next": null,
  "previous": null,
  "results": [
    {
      "first_seen": null,
      "city": null,
      "linkedin_url": null,
      "unsubscribed": true,
      "timezone": null,
      "browser": null,
      "score": 0,
      "name": "John Doe",
      "last_seen": null,
      "country": null,
      "google_url": null,
      "resolution": null,
      "tags": [],
      "id": 18260675,
      "updated_at": "2017-05-29T10:08:59.526309Z",
      "last_ip": null,
      "last_contacted": null,
      "region": null,
      "status": "visitor",
      "gravatar_url": null,
      "created_at": "2017-05-29T10:08:59.526286Z",
      "browser_language": null,
      "gender": "unknown",
      "email": "example@email.com",
      "twitter_url": null,
      "page_views": 0,
      "phone_number": null,
      "facebook_url": null,
      "chat_id": "Chat ID is deprecated and will be removed in future",
      "attributes": [
        {
          "id": 2092,
          "name_std": "an_attribute",
          "value": "Value for the attribute",
          "name": "An Attribute"
        }
      ],
      "notifications": true,
      "key": "rQ8mdQ8W6I5t",
      "lists": [],
      "os_type": null
    },
    {
      "first_seen": null,
      "city": null,
      "linkedin_url": null,
      "unsubscribed": false,
      "timezone": null,
      "browser": null,
      "score": 0,
      "name": "Jane Doe",
      "last_seen": null,
      "country": null,
      "google_url": null,
      "resolution": null,
      "tags": [],
      "id": 20901703,
      "updated_at": "2017-06-13T12:51:30.924647Z",
      "last_ip": null,
      "last_contacted": null,
      "region": null,
      "status": "visitor",
      "gravatar_url": null,
      "created_at": "2017-06-13T12:22:38.748373Z",
      "browser_language": null,
      "gender": "unknown",
      "email": "example@email.org",
      "twitter_url": null,
      "page_views": 0,
      "phone_number": null,
      "facebook_url": null,
      "chat_id": "Chat ID is deprecated and will be removed in future",
      "attributes": [],
      "notifications": true,
      "key": "xSoYQG00fg9z",
      "lists": [],
      "os_type": null
    }
  ]
}