Skip to main content
POST

Authorizations

Authorization
string
header
required

An API key of one app, sent as Authorization: Bearer <key>. Keys start with fk_test_ (test mode: sandbox senders and test data only) or fk_live_ (live mode). Keep live keys on your server; never ship them in an app or page.

Headers

Idempotency-Key
string

A unique string (up to 255 characters) that makes this request safe to retry. A repeat with the same key within 24 hours returns the first answer instead of acting again. See "Idempotency" in the introduction.

Required string length: 1 - 255
Flow-Version
string<date>

The API version to use, as a date. Without it, the version pinned to your app when it was created is used.

Example:

"2026-11-01"

Body

application/json

A simulated conversation to create (test keys only).

channel
enum<string>
required

The channel to simulate. telegram, whatsapp, imessage or sms.

Available options:
telegram,
whatsapp,
imessage,
sms
contact
object

The simulated contact's address on the channel. Give one field that fits the channel: phone on SMS, iMessage and WhatsApp, handle on iMessage, telegram_user_id on Telegram. Omit contact to get a new contact with a made-up address.

name
string

The simulated contact's display name, as a channel would report it. Not with group.

Required string length: 1 - 64
group
object

imessage only: make a simulated group conversation (type group) instead of a one-to-one one, with these participants. Not with contact or name. Each turn names the participant who writes (from on POST /v0/test/conversations/{conversation_id}/inbound). Another channel answers 400 invalid_request with param group.

Response

The contact's simulated conversation already existed; it is returned as is.

One sender talking with one contact (type direct), or with an iMessage group chat (type group). Holds the window state and whether the contact opted in.

id
string
required

A conversation ID, conv_ and a ULID.

Pattern: ^conv_[0-9A-HJKMNP-TV-Z]{26}$
Example:

"conv_01JB8ZC3K5M7P9R1T3V5X7Z9B1"

app
string
required

An app ID, app_ and a ULID.

Pattern: ^app_[0-9A-HJKMNP-TV-Z]{26}$
Example:

"app_01JB8Z0A1C3E5G7J9K1M3P5R7T"

channel
enum<string>
required

A messaging channel. sms is US SMS and MMS (in pilot), from dedicated numbers only.

Available options:
telegram,
whatsapp,
imessage,
sms
sender
string
required

A sender ID, snd_ and a ULID.

Pattern: ^snd_[0-9A-HJKMNP-TV-Z]{26}$
Example:

"snd_01JB8Z4Q3V6W0R2N7C5H1M9K4T"

livemode
boolean
required

Whether the conversation belongs to live mode.

opted_in
boolean
required

Whether the contact has agreed to receive messages (wrote first, joined the sandbox, or you recorded consent). Always true on group conversations, which begin with the group writing.

created_at
string<date-time>
required

When the conversation began.

type
enum<string>
default:direct

Flow always sends it; read a missing one as direct (answers from before groups existed). direct: one sender and one contact (every channel). group: a group chat one of your dedicated iMessage lines was added to; it has group and no contact. Flow's shared iMessage line ignores group chats, so they never reach your app from it.

Available options:
direct,
group
contact
string

The contact the conversation is with. Always set when type is direct; absent on group conversations (each message's from says who wrote).

Pattern: ^ct_[0-9A-HJKMNP-TV-Z]{26}$
Example:

"ct_01JB8ZB2J4K6N8Q0S2V4W6Y8A0"

group
object
read-only

Group conversations only (iMessage): the group chat as Flow saw it last. People who join or leave change participants without an event; Flow updates the list when the group next writes. The channel's own group ID is never exposed: use the conversation's ID.

last_inbound_at
string<date-time>

When the contact last wrote. Absent if they never have.

window_open_until
string<date-time>

WhatsApp only. Until when free-form messages may be sent; after it, only templates. Absent when the window is closed or the channel has none.

simulated
boolean
read-only

true for a simulated conversation, whose contact exists only inside Flow (test mode only, from POST /v0/test/conversations); absent otherwise.

metadata
object

Up to 20 string pairs of your own, kept with the object and returned unchanged. Keys up to 40 characters, values up to 500.