> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer-test.atomicwork.com/llms.txt.
> For full documentation content, see https://developer-test.atomicwork.com/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer-test.atomicwork.com/_mcp/server.

# Get paginated users list in a segment

GET https://{tenant}.atomicwork.com/api/v1/users/{segment_id}/list

Reference: https://developer-test.atomicwork.com/atomicwork-public-api/users/getapi-v-1-users-segment-id-list

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /api/v1/users/{segment_id}/list:
    get:
      operationId: getapi-v-1-users-segment-id-list
      summary: Get paginated users list in a segment
      tags:
        - subpackage_users
      parameters:
        - name: segment_id
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int64
        - name: search_key
          in: query
          description: ''
          required: false
          schema:
            type: string
        - name: page
          in: query
          description: ''
          required: true
          schema:
            type: integer
            default: 1
        - name: per_page
          in: query
          description: ''
          required: false
          schema:
            type: integer
            default: 25
        - name: sort_order
          in: query
          description: ''
          required: false
          schema:
            $ref: '#/components/schemas/ApiV1UsersSegmentIdListGetParametersSortOrder'
        - name: is_deleted
          in: query
          description: ''
          required: false
          schema:
            type: boolean
            default: false
        - name: role
          in: query
          description: ''
          required: false
          schema:
            type: string
        - name: type
          in: query
          description: Automation entity type (see allowed values in the enum schema).
          required: false
          schema:
            $ref: '#/components/schemas/ApiV1UsersSegmentIdListGetParametersType'
        - name: X-Api-Key
          in: header
          required: true
          schema:
            type: string
        - name: X-Workspace-Id
          in: header
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Users_getapi_v1_users__segment_id__list_Response_200
servers:
  - url: https://{tenant}.atomicwork.com
components:
  schemas:
    ApiV1UsersSegmentIdListGetParametersSortOrder:
      type: string
      enum:
        - CREATED_AT_DESC
        - CREATED_AT_ASC
        - UPDATED_AT_DESC
        - UPDATED_AT_ASC
        - NAME_EMAIL_ASC
        - NAME_EMAIL_DESC
      title: ApiV1UsersSegmentIdListGetParametersSortOrder
    ApiV1UsersSegmentIdListGetParametersType:
      type: string
      enum:
        - EMPLOYEE
        - EXTERNAL
        - AI_EMPLOYEE
      title: ApiV1UsersSegmentIdListGetParametersType
    Users_getapi_v1_users__segment_id__list_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: Users_getapi_v1_users__segment_id__list_Response_200
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

```

## SDK Code Examples

```python
import requests

url = "https://{tenant}.atomicwork.com/api/v1/users/1/list"

querystring = {"page":"1","sort_order":"CREATED_AT_DESC","type":"EMPLOYEE","search_key":"john.doe","per_page":"25","is_deleted":"false","role":"support_agent"}

payload = {}
headers = {
    "X-Workspace-Id": "987654321",
    "X-Api-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://{tenant}.atomicwork.com/api/v1/users/1/list?page=1&sort_order=CREATED_AT_DESC&type=EMPLOYEE&search_key=john.doe&per_page=25&is_deleted=false&role=support_agent';
const options = {
  method: 'GET',
  headers: {
    'X-Workspace-Id': '987654321',
    'X-Api-Key': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://{tenant}.atomicwork.com/api/v1/users/1/list?page=1&sort_order=CREATED_AT_DESC&type=EMPLOYEE&search_key=john.doe&per_page=25&is_deleted=false&role=support_agent"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("X-Workspace-Id", "987654321")
	req.Header.Add("X-Api-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://{tenant}.atomicwork.com/api/v1/users/1/list?page=1&sort_order=CREATED_AT_DESC&type=EMPLOYEE&search_key=john.doe&per_page=25&is_deleted=false&role=support_agent")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-Workspace-Id"] = '987654321'
request["X-Api-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://{tenant}.atomicwork.com/api/v1/users/1/list?page=1&sort_order=CREATED_AT_DESC&type=EMPLOYEE&search_key=john.doe&per_page=25&is_deleted=false&role=support_agent")
  .header("X-Workspace-Id", "987654321")
  .header("X-Api-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://{tenant}.atomicwork.com/api/v1/users/1/list?page=1&sort_order=CREATED_AT_DESC&type=EMPLOYEE&search_key=john.doe&per_page=25&is_deleted=false&role=support_agent', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-Api-Key' => '<apiKey>',
    'X-Workspace-Id' => '987654321',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://{tenant}.atomicwork.com/api/v1/users/1/list?page=1&sort_order=CREATED_AT_DESC&type=EMPLOYEE&search_key=john.doe&per_page=25&is_deleted=false&role=support_agent");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Workspace-Id", "987654321");
request.AddHeader("X-Api-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Workspace-Id": "987654321",
  "X-Api-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://{tenant}.atomicwork.com/api/v1/users/1/list?page=1&sort_order=CREATED_AT_DESC&type=EMPLOYEE&search_key=john.doe&per_page=25&is_deleted=false&role=support_agent")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```