InformlyInformly
Segments
GET
/segments

Returns all segments available in the organization.

Authorization

BearerAuth
AuthorizationBearer <token>

API token obtained from the Informly dashboard

In: header

Response Body

application/json

application/json

application/json

curl -X GET "http://api.informly.co/api/v1/segments"
{
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "title": "string",
      "color": "string"
    }
  ]
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "string",
    "details": [
      {
        "path": "string",
        "message": "string"
      }
    ]
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "string",
    "details": [
      {
        "path": "string",
        "message": "string"
      }
    ]
  }
}

SDK

import { Informly } from "@informly/sdk";

const client = new Informly.Client({
  token: "YOUR_API_TOKEN",
});

const response = await client.segments.listSegments();

console.log(response);