Thrive API

Agent

Ask the Thrive Agent questions and list saved chats.

Ask the Agent

POST /v1/agent/ask

Asks the Thrive Agent a money question and returns a text answer. Costs 1 Agent credit from the owner's normal balance, charged once per Idempotency-Key — retries never double charge. Returns 402 when the balance is empty.

Authentication: API key · Required scope: agent:write · Supports Idempotency-Key

Parameters · Ask the Agent

questionstringrequired

1–2000 characters.

curl -X POST "https://jointhrive.org/api/public/v1/agent/ask" \
  -H "Authorization: Bearer $THRIVE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"question":"How does an emergency fund work?"}'
Response · 200
{
  "object": "agent_answer",
  "answer": "An emergency fund is…",
  "credits_charged": 1,
  "credits_remaining": 83
}

Errors: missing_scope, insufficient_credits, agent_unavailable, idempotency_conflict

List Agent chats

GET /v1/agent/chats

Titles of the owner's saved Agent chats, most recent first.

Authentication: API key · Required scope: agent:read

Parameters · List Agent chats

limitinteger

1–100, default 20.

curl "https://jointhrive.org/api/public/v1/agent/chats" \
  -H "Authorization: Bearer $THRIVE_API_KEY"
Response · 200
{
  "object": "list",
  "data": [ { "id": "…", "title": "Can I afford a $20k car?" } ]
}

Errors: missing_scope

Try it

Sign in to test this endpoint with one of your keys.