Skip to main content

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.

SegmentFlow.ai is a customer engagement platform for sending email broadcasts, running automated journeys, and managing audience segments. If you’ve used Brevo (formerly Sendinblue) or Klaviyo, the model will feel familiar — this API exposes the same primitives so you can drive sends from your own backend, CRM, e-commerce platform, or workflow tool.

What you can do

The public API surface covers the customer-facing operations of SegmentFlow.ai:
  • Journeys — trigger an API-entry journey for a recipient and poll its run status. Equivalent to Klaviyo’s event-triggered flows or Brevo’s automation workflows.
  • Broadcasts — prepare a dry-run, review the audience snapshot, then redeem the prepared send to fire a broadcast. Equivalent to a Klaviyo campaign or a Brevo email campaign. A one-shot create+send endpoint is also available for legacy integrations.
  • Templates — list and read email templates created in your organization. Equivalent to Brevo email templates or Klaviyo templates.
  • Segments — list segments and run a fresh audience preview against the live definition. Equivalent to Klaviyo segments or Brevo contact lists with dynamic filters.
  • Assets — request a presigned S3 upload, PUT the bytes, then finalize the asset row. Use this to upload images for use inside templates.
  • Brand kit — read your organization’s brand kits (logos, colors, sender profiles).

Core concepts

SegmentFlow.aiKlaviyoBrevoWhat it is
JourneyFlowAutomation workflowA multi-step automation triggered by an event or API call. Each recipient progresses through steps independently.
BroadcastCampaignEmail campaignA one-time send to a static or dynamically-resolved audience.
SegmentSegmentDynamic listA live audience definition that re-evaluates on every read.
TemplateTemplateTemplateA reusable email body with merge fields.
Brand kitBrand libraryBrand identityLogos, colors, and sender profile defaults applied to outgoing email.
Prepared sendA dry-run snapshot of a broadcast with frozen audience and template — review it, then redeem within 15 minutes to actually send.

Types of emails

SegmentFlow.ai has two ways to actually put mail on the wire — pick the one that matches your use case.
BroadcastsJourneys
AudienceMany recipients at once (segment, list, or filter)One recipient per trigger call
Triggered byManual send from the dashboard or POST /broadcasts/send-preparedEvent in your system → POST /journeys/{id}/trigger
Klaviyo equivalentCampaignFlow
Brevo equivalentEmail campaignAutomation workflow / transactional
Loops equivalentCampaignLoop / Transactional
Best forNewsletters, announcements, product launches, one-off blastsWelcome emails, password resets, order confirmations, drip sequences, abandoned-cart
Audience snapshotFrozen at prepare time, valid for 15 minN/A — single recipient resolved at trigger time
UnsubscribesSkipped automatically (counted in skippedUnsubscribedCount)Skipped automatically (counted in skippedUnsubscribedCount)
Open / click trackingOn by defaultOn by default
IdempotencyYes — Idempotency-Key on prepare/send/cancelYes — Idempotency-Key on trigger
If you’re coming from Loops or another platform that has a separate Transactional email type, use a Journey with a single API-trigger step. The trigger endpoint accepts merge data the same way Loops’ /transactional API accepts dataVariables — see the Quickstart below for the shape.

Quickstart

The shortest path from zero to a working request:
Sending email also requires a verified sending domain (SPF + DKIM). Read-only API calls (templates, segments, brand kit) work without one — see Sending domain for the DNS setup before you trigger your first send.
1

Mint an API key

In the dashboard, open Settings → API Keys, create a key with the scopes you need (e.g. templates:read), and copy the value. See Authentication.
2

Make your first call

List the templates in your organization:
curl https://api.segmentflow.ai/api/v1/public/templates \
  -H "x-api-key: sk_live_..."
3

Trigger a journey

Send the recipient and any merge data your journey expects:
curl https://api.segmentflow.ai/api/v1/public/journeys/jrn_abc123/trigger \
  -H "x-api-key: sk_live_..." \
  -H "content-type: application/json" \
  -H "Idempotency-Key: order-9421-welcome" \
  -d '{
    "recipient": { "email": "alex@example.com" },
    "data": { "firstName": "Alex", "orderTotal": 49.00 }
  }'

Common use cases

  • Replace transactional triggers from Brevo/Klaviyo. Point your existing event source (order placed, cart abandoned, signup) at POST /journeys/{id}/trigger instead of Brevo’s transactionalEmails API or Klaviyo’s track endpoint. Use Idempotency-Key to dedupe webhook retries.
  • Send a one-off campaign from a script. Call POST /broadcasts/prepare, inspect the returned audience size and sample, then call POST /broadcasts/send-prepared to actually fire. The two-step pattern is the safe default — Brevo and Klaviyo both default to a manual review step in their UI for the same reason.
  • Sync segments to a downstream tool. Use GET /segments and POST /segments/{id}/preview to feed a live audience into ad platforms, BI dashboards, or a CDP.
  • Drive sends from an AI agent. Mint a key with allowSends=false and read-only scopes — the agent can draft templates and prepare broadcasts but cannot redeem a send. A human (or a separate send-enabled key) handles the final step. See the allowSends flag.

Base URL

https://api.segmentflow.ai
All endpoints are under /api/v1/public/.

Authentication

Every request authenticates with an API key sent in the x-api-key header. See Authentication for the key minting flow, scopes, idempotency, and per-key send-permission gating.

SDKs

A typed TypeScript client is generated from the same OpenAPI spec that powers this documentation. If you’d like an official SDK in another language, open an issue. The OpenAPI spec is also published at the bottom of this site, so you can generate a client for any language with openapi-generator or Kubb.

Versioning

The public API is versioned in the URL (/api/v1/public/...). Breaking changes ship under a new prefix; additive changes (new fields, new endpoints, new optional query params) ship into the existing version without a version bump. Pin to v1 and you’re safe.

Next steps

Sending domain

Verify SPF, DKIM, and DMARC so SegmentFlow.ai can send on your domain.

Authentication

Mint a key, pick scopes, and learn the allowSends safeguard.

Errors

Status codes, the error envelope, and stable error codes to switch on.

API Reference

Every endpoint, request shape, and response shape — with an interactive playground.