Skip to main content

Onboarding

1 operation under /v1/onboarding (GET): parameters, status codes, refusal bodies, and the same request in curl, HTTP, Python and TypeScript.

1 min read
View MarkdownEdit on GitHub

Base URL: https://api.codespar.dev

Every operation below requires a Bearer token. See Authentication.

GET /v1/onboarding

GEThttps://api.codespar.dev/v1/onboarding

The first-access guide's progress for the project

Three steps, read in one call. agent: the organization has a registered agent other than a Playground scene's own; in_project says whether one of them works in this project (an active mandate funds it). scenario: a session of this project recorded a tool call; the first one names the session and, for a Playground session, its scene. result: money moved under a mandate in this project (the first debit); test funding is not a result. Read-only. project_id, when sent, must be the project the request resolved to, or the answer is 404.

Query parameters

NameTypeRequiredDescription
project_idstringno—

Responses

StatusBodyDescription
200objectOK
400objectThe query did not match the schema.
404objectproject_id names a project other than the one the request resolved to.

Response 200

FieldTypeRequiredDescription
agentobjectyes—
environment"live" | "test"yes—
project_idstringyes—
resultobjectyes—
scenarioobjectyes—
Example request
curl -X GET https://api.codespar.dev/v1/onboarding \
  -H "Authorization: Bearer $CODESPAR_API_KEY"
GET /v1/onboarding HTTP/1.1
Host: api.codespar.dev
Authorization: Bearer $CODESPAR_API_KEY
import os
import requests

res = requests.get(
    "https://api.codespar.dev/v1/onboarding",
    headers={"Authorization": f"Bearer {os.environ['CODESPAR_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
const res = await fetch("https://api.codespar.dev/v1/onboarding", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.CODESPAR_API_KEY}`,
  },
});

const data = await res.json();
const result = await cs.api.get("/v1/onboarding");
Example response 200
application/json
{
  "project_id": "prj_0000000000000000",
  "environment": "live",
  "agent": {
    "done": true,
    "agent_id": "agt_0000000000000000",
    "in_project": true,
    "at": "2026-01-15T12:00:00.000Z"
  },
  "scenario": {
    "done": true,
    "session_id": "ses_0000000000000000",
    "scene": "string",
    "at": "2026-01-15T12:00:00.000Z"
  },
  "result": {
    "done": true,
    "ledger_entry_id": "ledgerentry_0000000000000000",
    "at": "2026-01-15T12:00:00.000Z"
  }
}

On this page

Onboarding | CodeSpar