---
title: Get help
description: What to try first, what to include when you ask, and where to ask.
---

import { Cards, Card } from "fumadocs-ui/components/card";

# 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.

```bash
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](/docs/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

<Cards>
  <Card
    title="Open an issue"
    href="https://github.com/codespar/codespar-enterprise/issues"
    external
    description="Bugs and unexpected behaviour in the API. Include the request id and the operation."
  />
  <Card
    title="Email"
    href="mailto:support@codespar.dev"
    external
    description="Account, billing, access, and anything you would rather not write in public."
  />
</Cards>

## Answers that already exist

<Cards>
  <Card
    title="FAQ"
    href="/docs/faq"
    description="The questions that come up most, with the short answer first."
  />
  <Card
    title="Debugging"
    href="/docs/debugging"
    description="A call did not do what you expected. Where to look, in order."
  />
  <Card
    title="Error reference"
    href="/docs/errors"
    description="Every refusal code, what it means, and whether retrying helps."
  />
  <Card
    title="Glossary"
    href="/docs/glossary"
    description="Mandate, meta-tool, rail, facilitator, KYA. What each term means here specifically."
  />
</Cards>

## For agents

If you are an agent reading this, the machine-readable entry points are
[`/AGENTS.md`](/AGENTS.md), [`/llms.txt`](/llms.txt),
[`/.well-known/mcp.json`](/.well-known/mcp.json) and
[`/openapi.json`](/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.
