Documentation Index
Fetch the complete documentation index at: https://segmentflow.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Minting a key
- Sign in at dashboard.segmentflow.ai.
- Open Settings → API Keys.
- Click Create API key, give it a label (e.g.
production-zapier), and pick the scopes it needs. - Copy the key — it’s shown once, never again. Store it in your secrets manager.
Using the key
Send the key on every request as thex-api-key header:
401 Unauthorized. A valid key without the required scope returns 403 Forbidden.
Scopes
Each key carries a fixed set of scopes. The dashboard scope picker lists every available scope; the most common ones are:| Scope | Resource | Description |
|---|---|---|
journeys:trigger | Journeys | Trigger an API-entry journey |
journeys:read | Journeys | Read journey run status |
templates:read | Templates | List and read email templates |
segments:read | Segments | List segments and run audience previews |
assets:write | Assets | Mint presigned uploads and finalize asset rows |
brand-kit:read | Brand kit | Read brand kits |
broadcasts:create | Broadcasts | One-shot broadcast create+send (legacy) |
broadcasts:prepare | Broadcasts | Build a broadcast dry-run |
broadcasts:send | Broadcasts | Redeem a prepared send |
broadcasts:cancel | Broadcasts | Cancel an in-flight broadcast |
broadcasts:read | Broadcasts | Read broadcast status |
The allowSends flag
Sending a broadcast is destructive. To prevent agent or automation tooling from triggering sends accidentally, every key carries a separate allowSends flag in its metadata. The flag is off by default.
Endpoints that actually fire bytes — currently POST /broadcasts/send-prepared — require both the broadcasts:send scope and allowSends=true on the key. A key with the scope but not the flag returns 403 send_not_allowed.
Mint read-only keys for tools that should never send (analytics dashboards, BI exports, AI drafting agents). Mint a separate send-enabled key for the workflow that actually triggers broadcasts.
Rotating and revoking keys
Keys never expire automatically — rotate on a schedule that matches your security policy. Revoke a leaked key from Settings → API Keys → Revoke. Revocation takes effect within seconds; in-flight requests on a revoked key complete, but the next request returns401.
Idempotency
Destructive endpoints accept anIdempotency-Key header. Send the same key with the same body to safely retry — the server replays the original response instead of acting twice. Currently honored on:
POST /api/v1/public/broadcastsPOST /api/v1/public/broadcasts/preparePOST /api/v1/public/broadcasts/{id}/cancelPOST /api/v1/public/journeys/{id}/trigger
Idempotency-Key with a different body returns 422 idempotency_key_reuse.
