---
updatedAt: 2026-06-25T13:09:54.000Z
agentTools:
  projectIndex: https://marketing.developer.dotdigital.com/llms.txt
---

# Get segments

Gets all segments

<br />

> 📘 Pagination in our API
>
> To learn about pagination in our API, check out [Paging through data](https://marketing.developer.dotdigital.com/docs/api-conventions#paging-through-data).

<span class="callRateLow" />

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Segments",
    "description": "Retrieve and manage contact segments. Use this API to list all segments with\ntheir current contact counts, trigger a refresh of a segment's membership, and\ncheck the progress of an in-flight refresh.",
    "version": "2.0.1"
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "x-samples-languages": [
    "curl",
    "csharp",
    "java",
    "javascript",
    "node",
    "python",
    "php",
    "ruby"
  ],
  "externalDocs": {
    "description": "Learn more about Dotdigital APIs",
    "url": "https://developer.dotdigital.com"
  },
  "servers": [
    {
      "url": "https://{region}-api.dotdigital.com",
      "variables": {
        "region": {
          "default": "r1",
          "enum": [
            "r1",
            "r2",
            "r3"
          ],
          "description": "The Dotdigital region id your account belongs to"
        }
      }
    }
  ],
  "security": [
    {
      "basicAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "paths": {
    "/v2/segments": {
      "parameters": [
        {
          "in": "header",
          "name": "x-ddg-integration-token",
          "required": false,
          "description": "If you are a partner of Dotdigital and have a [verified integration](https://developer.dotdigital.com/docs/partner-integration-verification) then include your [integration tracking token](https://developer.dotdigital.co/docs/verified-integration-tracking) here.",
          "schema": {
            "type": "string",
            "pattern": "/^(?:\\{{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\\}{0,1})$/",
            "example": "5a96bc79-19a7-4544-973b-e2da0c9136f9"
          }
        }
      ],
      "get": {
        "summary": "Get segments",
        "deprecated": false,
        "description": "Gets all segments",
        "operationId": "get-segments",
        "tags": [
          "Segments"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "default": 0,
                        "examples": [
                          1
                        ]
                      },
                      "name": {
                        "type": "string",
                        "examples": [
                          "Test"
                        ]
                      },
                      "contacts": {
                        "type": "integer",
                        "default": 0,
                        "examples": [
                          5
                        ]
                      }
                    }
                  }
                },
                "examples": {
                  "Result": {
                    "summary": "Result",
                    "value": [
                      {
                        "id": 1,
                        "name": "Test",
                        "contacts": 5
                      },
                      {
                        "id": 2,
                        "name": "Contacts who opened campaign X",
                        "contacts": 7
                      },
                      {
                        "id": 3,
                        "name": "First Stream who have not opened a campaign",
                        "contacts": 7
                      },
                      {
                        "id": 4,
                        "name": "Professionals who have opened a campaign",
                        "contacts": 6
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
```

# Sibling pages

* [Refresh segment](https://marketing.developer.dotdigital.com/reference/refresh-segment.md)
* [Get refresh progress for segment](https://marketing.developer.dotdigital.com/reference/get-refresh-progress-for-segment.md)