# Quickstart

> For AI agents: the index of these docs is at https://indrava.forumulate.com/docs/llms.txt (every page it lists has a Markdown version like this one).

Make an API key, list your channels and schedule a first post with the Indrava API.

The Indrava API lets a script or an AI agent do most of what a member does in the app: connect and read channels, upload media, write, schedule and submit posts, decide approvals, answer the inbox, and read analytics. The same operations are served three ways:

- REST, under `/api/v1`
- MCP tools, at `/mcp`
- the `indrava` command line, which calls the REST API

In these pages `http://localhost:4000` stands for the address of your Indrava API. The Developers screen in the app shows the real address, ready to copy.

## 1. Make an API key

A workspace admin opens **Developers** in the app and creates a key under **API keys**. Choose the scopes the key needs; a key without scopes can do nothing. The key is shown once, when it is created.

```bash
export INDRAVA_API_KEY="paste the key here"
```

## 2. List your channels

A channel is one connected account, such as a Bluesky profile or a Discord server. Connect your first one in the app. This call needs the `channels:read` scope.

```bash
curl http://localhost:4000/api/v1/channels \
  -H "Authorization: Bearer $INDRAVA_API_KEY"
```

Each channel has an `id`, a `provider`, a `name` and a `handle`. Keep the `id` of the channel you want to post to.

## 3. Schedule a post

`action` decides what happens to the post, and which scopes the key needs:

| `action` | Result | Scopes |
| --- | --- | --- |
| `draft` | The post is saved and nothing is published. | `posts:write` |
| `schedule` | The post is published at `scheduledAt`. | `posts:write` and `posts:publish` |
| `now` | The post is published right away. | `posts:write` and `posts:publish` |

A key without `posts:publish` can only save drafts. That is the right key for an agent whose work a person should look at first.

```bash
curl -X POST http://localhost:4000/api/v1/posts \
  -H "Authorization: Bearer $INDRAVA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "parts": [{ "text": "Hello from the Indrava API" }],
    "targets": [{ "channelId": "CHANNEL_ID" }],
    "action": "schedule",
    "scheduledAt": "2027-01-31T09:00:00Z"
  }'
```

The answer is the id of the post: `{ "id": "..." }`.

`parts` is the text of the post. More than one part makes a thread on channels that have threads. `targets` names the channels; more than one cross-posts.

To check a post without saving it, send the same body to `POST /posts/validate`: the answer lists what each channel would refuse. If the answer to `POST /posts` may get lost, send an `Idempotency-Key` header: a retry with the same key returns the first post instead of making a second.

:::hint{style="info" title="Approval workflows"}
If the workspace, or the client the post belongs to, requires approval, a call with `schedule` or `now` is refused with `403`. Send `"action": "draft"`, then call `POST /posts/POST_ID/submit`: the post's status becomes `pending_approval` and the approvers are told.
:::

## 4. See what happened

```bash
curl "http://localhost:4000/api/v1/posts?status[]=scheduled&status[]=failed" \
  -H "Authorization: Bearer $INDRAVA_API_KEY"
```

A post's `status` is one of `draft`, `pending_approval`, `scheduled`, `publishing`, `published` or `failed`. If some channels of a post failed, retry only those:

```bash
curl -X POST http://localhost:4000/api/v1/posts/POST_ID/retry \
  -H "Authorization: Bearer $INDRAVA_API_KEY"
```

To be told about results instead of asking, add a [webhook endpoint](https://indrava.forumulate.com/docs/webhooks).

## Next

- [Authentication](https://indrava.forumulate.com/docs/authentication): keys, scopes, and OAuth for MCP clients and the CLI
- [Scopes](https://indrava.forumulate.com/docs/scopes): every scope with the operations it opens
- [Operations](https://indrava.forumulate.com/docs/operations): every operation with its scope and inputs
- [MCP server](https://indrava.forumulate.com/docs/mcp) and [command line](https://indrava.forumulate.com/docs/cli)

---

## For AI agents

- This page for a human reader: https://indrava.forumulate.com/docs/quickstart
- The whole space as one Markdown file: https://indrava.forumulate.com/docs/llms-full.txt
- Live search + fetch over MCP: https://indrava.forumulate.com/docs/_api/public/orgs/e421ace4-3e78-4ed8-9818-7b4899cf3aa0/spaces/2bcc7f09-4489-40af-85d8-9fdd3f3da314/mcp
  - Install (Claude CLI): `claude mcp add forumulate-docs --transport http https://indrava.forumulate.com/docs/_api/public/orgs/e421ace4-3e78-4ed8-9818-7b4899cf3aa0/spaces/2bcc7f09-4489-40af-85d8-9fdd3f3da314/mcp`

This Markdown is the same content the page renders — safe to quote and to ground answers in.
