Get help
What to try first, what to include when you ask, and where to ask.
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_orcsk_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
Open an issue
Bugs and unexpected behaviour in the API. Include the request id and the operation.
Account, billing, access, and anything you would rather not write in public.
Answers that already exist
FAQ
The questions that come up most, with the short answer first.
Debugging
A call did not do what you expected. Where to look, in order.
Error reference
Every refusal code, what it means, and whether retrying helps.
Glossary
Mandate, meta-tool, rail, facilitator, KYA. What each term means here specifically.
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.
Webhook Providers Reference
Per-provider inbound webhook signature schemes — HMAC-SHA256, ECDSA P-256, HTTP Basic, shared-secret. For self-hosters and operators verifying provider events.
FAQ
Frequently asked questions about CodeSpar -- pricing, capabilities, supported countries, security, technical details, and open source.