Skip to main content

Overview

When someone opens an onboarding link or invite, they get Composer’s setup page. To build your own setup experience instead, for example inside a mobile app, call the session routes directly. These routes need no API key. The token in the link is what grants access, and it only opens that one conversation. Errors come back as JSON: { "error": "..." }.
Treat a session token like a password. Don’t log it or show it to anyone other than the person it’s for.

Starting from an invite

A browser is redirected to a new session. To get the session as JSON, send Accept: application/json or add ?format=json. Each call starts a new session for a new person.

Talking to the setup assistant

string
required
What the person said. Up to 4,000 characters.
string
The setup assistant’s reply.
cURL

Loading the conversation

Returns { "messages": [{ "role": "user" | "assistant", "content", "at" }] }.

Checking progress

Pass ?tz= with the person’s IANA time zone.

Claiming the person’s key

When setup has finished, claim the person’s own API key so your app can keep talking to their new assistant.
string
The person’s key. It’s returned only once, so store it securely.
string
member for a personal assistant. admin when the onboarding created a workspace.
string
The person’s new assistant.
After claiming, the link stops working. Use the key with Chat from then on. Claiming before setup has finished returns 409.