Skip to main content
POST
Answer Marketing Agent setup step

Authorizations

Authorization
string
header
required

Personal access token, sent as Authorization: Bearer <token>.

Headers

Idempotency-Key
string | null

Your key for this answer, as an alternative to message_id. A retry with the same key returns the current state and applies nothing. Ignored when the body carries message_id.

Required string length: 1 - 100

Path Parameters

app_id
string
required

ID of the app.

Body

application/json
stage
string
required

The step you're answering, from the state's setup_stage. Either "channels", "kpis", or "budget".

Maximum string length: 40
Example:

"budget"

answers
SetupAnswerItem · object[]
required

Answers to the step's questions. Between 1 and 4.

Required array length: 1 - 4 elements
reset_epoch
integer | null

The state's reset_epoch, so the answer is rejected if the plan was reset since you read it. Omit it to skip that check.

Required range: x >= 0
Example:

0

message_id
string<uuid>

ID for the chat message that records the answer. Use a new UUID for every answer, and the same one when you retry it. A retry with the same ID returns the current state and applies nothing. Defaults to a new UUID.

Example:

"3f2504e0-4f89-11d3-9a0c-0305e82c3301"

Response

Successful Response

The Marketing Agent's plan for an app and the state of its latest run.

status
enum<string>
required

State of the latest run. Either "idle" before any run, "provisioning" while the workspace's Marketing Agent is created, "analyzing" while a run is working, "ready" once it finished, or "error" if it failed. A run that stops reporting for 15 minutes reads as "error".

Available options:
idle,
provisioning,
analyzing,
ready,
error
Example:

"ready"

run_id
string | null
required

ID of the latest run, or null if no run has started. Compare it between polls to tell a new run from the one you started.

Example:

"68a1c9b7f0b3d9001a7e5d04"

last_error
string | null
required

Why the latest run failed, or null if it didn't.

Example:

"The scan did not complete. Retry the setup."

setup_stage
enum<string>
required

How far setup has got. Either "not_started", "scanning", "channels", "kpis", "budget", "generating", or "complete". At channels, kpis, and budget the agent is waiting for an answer.

Available options:
not_started,
scanning,
channels,
kpis,
budget,
generating,
complete
Example:

"channels"

reset_epoch
integer
required

Number of times the plan was reset. Send it back as reset_epoch when you answer a setup step.

Example:

0

channels
MarketingChannel · object[]
required

The marketing channels the agent proposed. Empty until the opening scan finishes.

channels_revision_suggestion
string | null
required

A change to the channels the agent offers to make, or null if it offers none. Send it as a message to accept it.

Example:

"Swap LinkedIn for Product Hunt"

kpis
MarketingKpi · object[]
required

The KPIs the agent proposed. Empty until the opening scan finishes.

kpis_revision_suggestion
string | null
required

A change to the KPIs the agent offers to make, or null if it offers none. Send it as a message to accept it.

Example:

"Track paid conversions instead of signups"

strategy
MarketingStrategy · object | null
required

The marketing strategy, or null until setup writes one.

suggestions
MarketingSuggestion · object[]
required

Growth ideas the agent generated for the app.

budget
MarketingBudget · object | null
required

The marketing budget given during setup, or null if none was given yet.

competitor_research_opt_in
boolean
required

Whether competitor research runs alongside the strategy.

Example:

true

competitor_research_answer
boolean | null
required

Whether competitor research was accepted (true) or declined (false), or null if the question wasn't answered yet.

Example:

true

setup_paused
boolean
required

Whether setup is paused because the user asked the agent to stop. Sending a message resumes it.

Example:

false

competitors
MarketingCompetitor · object[]
required

Competitors found by the research, with verified URLs.

competitor_scan_status
enum<string> | null
required

State of the competitor research. Either "running", "done", or "failed", or null if it never ran.

Available options:
running,
done,
failed
Example:

"done"

cmo_agent_app_id
string | null
required

ID of the workspace's Marketing Agent app your conversation runs on, or null if you haven't talked to it on this app yet.

Example:

"68a1c2e4f0b3d9001a7e5c21"