# Segments

URL: https://docs.folkways.io/docs/platform-api/segments

GET /segments/{segmentId}: read a segment's settings, its overrides and the limits actually in force.

```http
GET /api/v1/segments/{segmentId}
X-API-Key: <key with access to the segment or its workspace>
```

## The segment object [#the-segment-object]

| Field | Meaning |
| --- | --- |
| `id`, `name`, `description`, `organizationId` | The segment and its workspace |
| `environment` | `PRODUCTION`, `STAGING` or `DEVELOPMENT` |
| `active` | `false` when the segment is turned off |
| `websocketEnabled`, `httpEnabled` | Which [transports](/docs/realtime-api/transports) it accepts |
| `limits` | Your overrides only; a missing field follows the package |
| `effectiveLimits` | What is enforced: `maxConnections`, `maxPayloadBytes`, `maxTopics`, `maxPublishPerSec` |
| `preset` | The rate preset: `GENERAL`, `AI_STREAMING`, `CHAT`, `LIVE_DASHBOARD` or `IOT` |
| `rateLimits` | Your rate-limit overrides only |
| `effectiveRateLimits` | What is enforced: the preset's limits, scaled to your package and lowered by your overrides |
| `caps` | [Monthly caps](/docs/console/segments#monthly-caps): `maxMessages`, `maxDataTransferBytes`, `action` (`STOP`, `CONTINUE`, `CONTINUE_WITH_EXTRA`), `extraPercent` |
| `identityPolicy` | Who may connect: `allowAnonymous`, `maxAnonymousConnections`, `maxConnectionsPerIdentity`, `onIdentityLimit` (`EVICT_OLDEST` or `REJECT`) |
| `signingKeyCount`, `topicRuleCount` | How many keys and rules it has |
| `createdAt`, `updatedAt` | Timestamps |

Rate-limit fields, in both `rateLimits` and `effectiveRateLimits`: `publishPerSec`, `publishBurst`,
`topicPublishPerSec`, `topicPublishBurst`, `segmentPublishPerSec`, `segmentPublishBurst`, `inboundBytesPerSec`,
`outboundBytesPerSec`, `maxSubscribersPerTopic`, `subscribesPerMin`, `topicCreatesPerMin`, `newConnectionsPerMin`.
See [Limits](/docs/realtime-api/limits#rate-limits) for what each means.

`effectiveLimits` and `effectiveRateLimits` are always complete: overrides are capped at the package, so a downgrade
never leaves a segment above its new package.

```json
{
  "status": "SUCCESS",
  "data": {
    "active": true,
    "effectiveLimits": { "maxConnections": 1000, "maxPayloadBytes": 61440, "maxPublishPerSec": 20, "maxTopics": 2000 },
    "environment": "PRODUCTION",
    "httpEnabled": true,
    "id": "6f1c2a0e-0000-4000-8000-000000000001",
    "identityPolicy": { "allowAnonymous": false, "maxAnonymousConnections": 0, "maxConnectionsPerIdentity": 0, "onIdentityLimit": "EVICT_OLDEST" },
    "name": "Chat (production)",
    "preset": "CHAT",
    "signingKeyCount": 1,
    "topicRuleCount": 3,
    "websocketEnabled": true
  },
  "meta": { "requestId": "…", "timestamp": "…", "version": "v1" }
}
```

(Shortened. Values depend on your package and settings.)
