Skip to main content
POST
Start an agent connect session

Body

application/json
domain
string

The human's website hostname (for example acme.com), prefilled in onboarding. A value that is not a hostname is a 400.

Maximum string length: 253
Example:

"acme.com"

email
string<email>

The human's email, if the agent knows it.

Maximum string length: 254
agentName
string

Shown to the human on the approval step and used to name the key: 1 to 60 printable characters. Omit it and the page says "Your agent".

Example:

"Claude Code"

onboarding
object

The setup you prepared for the human. With it, the link opens ONE review page (site, description, audiences, competitors, prompts, plan and price) instead of the onboarding steps; the human approves and starts the trial with one button. Validated with the rules onboarding applies; each problem is a 400 entry in details. If the human already has a set-up workspace (an active plan or a finished project), they approve for it as it is and this setup is not applied; a workspace left from an earlier attempt that was approved but never paid takes this setup.

Response

201 - application/json

The session.

connectUrl
string
required

Give this link to the human. It signs them up, onboards and asks them to approve.

Example:

"https://www.spreadjam.com/connect/ABCD234567"

userCode
string
required

Show this code to the human with the link. The approval page shows the same code, so they can check the request came from you.

Example:

"K7M-Q2X"

pollToken
string
required

Secret. Poll GET /v1/agent-connect/{pollToken} with it. Never show it to anyone.

expiresAt
string
required

When the session ends if nobody approves it.

intervalSeconds
integer
required

Poll no more often than this.

reviewUrl
string

With onboarding: the page where the human reviews your setup, pays and approves. The same link as connectUrl.

plan
object

With onboarding: the plan the review page opens on and its monthly price, as the plan page prices it.

prompts
object

With onboarding: how many prompts you sent, or that Jam will suggest them.