> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Reo.dev: Reo List Segments

> List the segments in your Reo.dev workspace with their IDs and type (ACCOUNT, DEVELOPER or BUYER). Use first to find a segment_id.

List the segments in your Reo.dev workspace with their IDs and type (ACCOUNT, DEVELOPER or BUYER).

> [!NOTE]
>
> Tool ID: `reo_list_segments`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'reo_list_segments',
  {},
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run reo_list_segments --input '{}'
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "data": [
      {
        "id": "id_123",
        "name": "Example",
        "type": "ACCOUNT"
      }
    ]
  }
}
```

Use `deepline describe reo_list_segments --json` for the latest machine-readable contract.

## Input reference

### Overview Returns all segments configured in your Reo workspace, including each segment's ID, name, type and owner. Use this endpoint first to discover segment IDs, then pass a segment ID into **Get Accounts in a Segment** or **Get Developers in a Segment** or **Get Buyers in a Segment** to pull the records inside it. ### Path Parameters None. ### Errors | Code | When it happens | Response body | |---|---|---| | 301 | Trailing slash in the URL (`/segments/`) | `Moved Permanently` | | 400 | `X-API-KEY` header missing or empty | `&#123;"error":"Missing API Key"&#125;` | | 403 | Invalid API key, or a write API key used on this host | `&#123;"error":"Invalid API Key."&#125;` | | 404 | Wrong HTTP method (POST, DELETE) | `404 page not found` | ### ENUMs | Field | Value | Meaning | |---|---|---| | type | `ACCOUNT` | Segment of accounts. Use with Get Accounts in a Segment. | | type | `DEVELOPER` | Segment of See the live schema below for the complete notes.

This action requires no input fields.

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "### Overview Returns all segments configured in your Reo workspace, including each segment's ID, name, type and owner. Use this endpoint first to discover segment IDs, then pass a segment ID into **Get Accounts in a Segment** or **Get Developers in a Segment** or **Get Buyers in a Segment** to pull the records inside it. ### Path Parameters None. ### Errors | Code | When it happens | Response body | |---|---|---| | 301 | Trailing slash in the URL (`/segments/`) | `Moved Permanently` | | 400 | `X-API-KEY` header missing or empty | `{\"error\":\"Missing API Key\"}` | | 403 | Invalid API key, or a write API key used on this host | `{\"error\":\"Invalid API Key.\"}` | | 404 | Wrong HTTP method (POST, DELETE) | `404 page not found` | ### ENUMs | Field | Value | Meaning | |---|---|---| | type | `ACCOUNT` | Segment of accounts. Use with Get Accounts in a Segment. | | type | `DEVELOPER` | Segment of developers. Use with Get Developers in a Segment. | | type | `BUYER` | Segment of buyers. Use with Get Buyers in a Segment. | ### Things to Note - A `page` query parameter is accepted but ignored. - `id` is the segment ID. Pass it as `segment_id` to Get Accounts, Get Developers and Get Buyers in a Segment. - Not paginated. Every segment comes back in one response, inside `data`. There is no `page_no`, `page_size`, `total_pages` or `request_id`. - `owner` is the email of the segment's owner. - `segment_tag` is an empty string when no tag is set.",
    "properties": {},
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.data` | `array` | No | — | All segments. Not paginated. |
| `result.data.data[].id` | `string` | No | — | Segment ID. Pass it as `segment_id` to Get Accounts, Get Developers or Get Buyers in a Segment. |
| `result.data.data[].name` | `string` | No | — | Segment name. |
| `result.data.data[].type` | `"ACCOUNT" \| "DEVELOPER" \| "BUYER"` | No | — | Segment type. See ENUMs. - `ACCOUNT`: Segment of accounts. Use with Get Accounts in a Segment. - `DEVELOPER`: Segment of developers. Use with Get Developers in a Segment. - `BUYER`: Segment of buyers. Use with Get Buyers in a Segment. Allowed: `ACCOUNT`, `DEVELOPER`, `BUYER`. |
| `result.data.data[].owner` | `string` | No | — | Email of the segment's owner. |
| `result.data.data[].segment_tag` | `string` | No | — | Segment tag. Empty string when no tag is set. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "data": {
            "type": "array",
            "description": "All segments. Not paginated.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Segment ID. Pass it as `segment_id` to Get Accounts, Get Developers or Get Buyers in a Segment."
                },
                "name": {
                  "type": "string",
                  "description": "Segment name."
                },
                "type": {
                  "type": "string",
                  "description": "Segment type. See ENUMs. - `ACCOUNT`: Segment of accounts. Use with Get Accounts in a Segment. - `DEVELOPER`: Segment of developers. Use with Get Developers in a Segment. - `BUYER`: Segment of buyers. Use with Get Buyers in a Segment.",
                  "enum": [
                    "ACCOUNT",
                    "DEVELOPER",
                    "BUYER"
                  ]
                },
                "owner": {
                  "type": "string",
                  "description": "Email of the segment's owner."
                },
                "segment_tag": {
                  "type": "string",
                  "description": "Segment tag. Empty string when no tag is set."
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Connect integrations](https://deepline.com/docs/integrations.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.