Skip to main content

Get help

What to try first, what to include when you ask, and where to ask.

2 min read
View MarkdownEdit on GitHub

Get help

Try this first, in this order

1. GET /v1/whoami. It answers four questions at once: whether the key is valid, which organization and project it is bound to, which environment it acts in, and which scopes it holds. A surprising share of "it does not work" is a key bound somewhere other than where you thought.

curl https://api.codespar.dev/v1/whoami \
  -H "Authorization: Bearer $CODESPAR_API_KEY"

2. Check the prefix, not the host. csk_test_ and csk_live_ reach the same base URL and act on different data. A call that "returns nothing" is often a live key reading a sandbox project, or the reverse.

3. Read the refusal. A CodeSpar refusal is explicit and carries a code. /docs/errors says what each one means and which are worth retrying. A call that would exceed a mandate cap fails rather than partially succeeding, and the failure names the cap.

What to include when you ask

The single most useful thing is the X-Request-Id. Every response carries it, including failures, and it is what lets someone find your exact call instead of guessing from a description.

X-Request-Id: req_...

It is on the response headers of every call, it is printed by the CLI, and the Run button on any API reference page shows it next to the status.

With the request id, include:

  • the operation, as method and path (POST /v1/consumers/{id}/wallet/transfer)
  • what you expected and what came back, including the status code
  • whether the key was csk_test_ or csk_live_never the key itself

⚠️ Never paste a key, a mandate signature, or a full webhook payload into a message. If a key has been shared anywhere, even briefly, rotate it: a key that has been seen is a key that has to be replaced, and rotating is cheaper than deciding whether it was seen by the wrong person.

Where to ask

Answers that already exist

For agents

If you are an agent reading this, the machine-readable entry points are /AGENTS.md, /llms.txt, /.well-known/mcp.json and /openapi.json. Any documentation page is available as raw markdown by putting /api/docs-md/ in front of its path — both /api/docs-md/first-call and /api/docs-md/docs/first-call work.

Get help | CodeSpar