Quickstart

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

Embed
Preview of the card
<a href="https://indrava.forumulate.com/docs/quickstart"><img src="https://indrava.forumulate.com/docs/_api/public/orgs/e421ace4-3e78-4ed8-9818-7b4899cf3aa0/spaces/2bcc7f09-4489-40af-85d8-9fdd3f3da314/pages/9e4edd26-5c4e-4c72-a643-61e874b5b6ff/social-card.svg?v=3e7ae33eec8b" alt="Quickstart" width="600" height="315"></a>

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.

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.

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.

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.

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

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:

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.

Next

Updated