> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useorgx.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# API quickstart

> Create visible, accountable work with one required body field in under five minutes.

Create work, see it in Mission Control, and keep the receipt returned by the
same request.

## 1. Create an API key

Sign in to [OrgX Settings](https://useorgx.com/settings), create an API key, and
save it when it is shown. The key resolves your user and workspace.

```bash theme={"dark"}
export ORGX_API_KEY='oxk_...'
```

<Warning>
  Keep API keys in server-side secrets. Never put them in browser code, logs,
  screenshots, or public repositories.
</Warning>

## 2. Create work

`title` is the only required body field. OrgX places the work in the workspace
Inbox and creates the supporting hierarchy when it is first needed.

```bash theme={"dark"}
curl -i https://useorgx.com/api/v1/work \
  -X POST \
  -H "Authorization: Bearer $ORGX_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: launch-plan-review-001' \
  -d '{"title":"Review the launch plan"}'
```

The first request returns `201 Created`:

```json theme={"dark"}
{
  "data": {
    "taskId": "7fbb727d-17c4-4bc7-9fc7-60eb15e9314d",
    "receiptId": "7ab98058-f221-49cc-8aa4-d3d8040249b8",
    "aggregateVersion": 1,
    "duplicate": false,
    "task": {
      "id": "7fbb727d-17c4-4bc7-9fc7-60eb15e9314d",
      "title": "Review the launch plan",
      "status": "todo",
      "updated_at": "2026-08-18T18:30:00.000Z"
    },
    "receipt": {
      "id": "7ab98058-f221-49cc-8aa4-d3d8040249b8",
      "status": "completed",
      "summary": "Review the launch plan"
    }
  },
  "meta": {
    "apiVersion": "1",
    "workspaceId": "5be1076d-8fd0-4c0f-847f-fd67fdb935e8",
    "duplicate": false
  }
}
```

## 3. See the result

Open Mission Control, or open the task directly with the returned ID:

```text theme={"dark"}
https://useorgx.com/tasks/7fbb727d-17c4-4bc7-9fc7-60eb15e9314d
```

The task page shows the title, current state, hierarchy, and linked evidence
available to your workspace.

## 4. Complete it with evidence

Fetch the work item immediately before completing it. This gives you a signed
`version_token` that preserves timestamp precision and prevents a stale client
from overwriting newer work.

```bash theme={"dark"}
curl https://useorgx.com/api/v1/work/7fbb727d-17c4-4bc7-9fc7-60eb15e9314d \
  -H "Authorization: Bearer $ORGX_API_KEY"
```

Copy `data.concurrency.version_token` into `ORGX_VERSION_TOKEN`.

```bash theme={"dark"}
curl https://useorgx.com/api/v1/work/7fbb727d-17c4-4bc7-9fc7-60eb15e9314d/complete \
  -X POST \
  -H "Authorization: Bearer $ORGX_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: launch-plan-review-complete-001' \
  -d '{
    "version_token":"'$ORGX_VERSION_TOKEN'",
    "summary":"Launch plan reviewed",
    "evidence":{"reviewed_sections":12,"broken_links":0}
  }'
```

The response returns the completed task and a new receipt. Refresh the task page
to see the completion and its evidence.

## Next useful step

<CardGroup cols={3}>
  <Card title="Organize work" icon="diagram-project" href="/docs/api-reference/initiatives/create">
    Create an initiative when the Inbox is no longer enough.
  </Card>

  <Card title="Use an SDK" icon="code" href="/docs/api/clients">
    Use the same flow from TypeScript or Python.
  </Card>

  <Card title="Read events" icon="wave-pulse" href="/docs/api-reference/events/list">
    Keep another system synchronized with accepted state changes.
  </Card>
</CardGroup>
