Mail API reference

Mail API · Segments

get/v1/workspaces/{workspace_id}/contacts/{contact}/segmentsAuth

List a contact's segments

Static segments it was added to and rule segments it matches now.

Path parameters

workspace_id*string · uuid

Id of the workspace.

contact*string

The contact id, or its email address (URL-encoded).

Response · 200

contact_id*string · uuid

The contact whose segments these are.

data*array

Every segment the contact is in now (static ones it was added to, rule ones it matches), oldest segment first. At most 100: one page.

Example

Request

GET https://api.mail.productcraft.co/v1/workspaces/{workspace_id}/contacts/{contact}/segments
Authorization: Bearer YOUR_TOKEN

Response

{
  "contact_id": "00000000-0000-0000-0000-000000000000",
  "data": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "name": "Pro customers",
      "description": "string",
      "type": {},
      "rule": {},
      "created_at": "2026-01-01T00:00:00.000Z",
      "updated_at": "2026-01-01T00:00:00.000Z"
    }
  ]
}