---
title: "Quickstart"
description: "Publish your first post with Dravo: create an API key, connect an account, and call the publish endpoint."
section: "Getting started"
url: https://dravo.dev/docs/quickstart
---
# Quickstart

This guide takes you from zero to a published post. It should take a few minutes.

## Before you start

You need a Dravo account and at least one social account connected through the
BYOK flow. If you have not connected anything yet, open the dashboard, go to
Connections, and follow [Authentication](/docs/authentication) plus the
[per network notes](/docs/networks/instagram) for the platform you want.

## Step 1. Create an API key

In the dashboard, open Keys and create a key. Copy it now: the secret is shown
once and never again. Keys look like `dra_live_...` or `dra_test_...`.

```bash
```

## Step 2. Connect an account

Connect an account in the dashboard (Connections). Each connected account has an
id you will pass to the publish endpoint. List them with:

```bash
curl https://api.dravo.dev/v1/accounts \
  -H "Authorization: Bearer $DRAVO_API_KEY"
```

```json
{
  "items": [
    { "id": "acc_8f2c1d", "provider": "x", "handle": "@dravo", "health": "active" }
  ],
  "next_cursor": null,
  "total": 1
}
```

## Step 3. Publish

Send the content to one or more accounts. Delivery is asynchronous, so this
returns right away with a job id.

```bash
curl -X POST https://api.dravo.dev/v1/publish \
  -H "Authorization: Bearer $DRAVO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "account_ids": ["acc_8f2c1d"],
    "text": "Hello from Dravo, one API for every social network."
  }'
```

```js
const res = await fetch("https://api.dravo.dev/v1/publish", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.DRAVO_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    account_ids: ["acc_8f2c1d"],
    text: "Hello from Dravo, one API for every social network.",
  }),
});
const job = await res.json(); // { job_id, status: "queued" }
```

To attach media, ingest it first with [POST /v1/media](/docs/api/media) and pass
the returned `public_url` in `media_urls`.

## Step 4. Check the result

The response is a job, not the final outcome. Poll the publish history to see the
per account delivery result.

```bash
curl "https://api.dravo.dev/v1/publish?limit=1" \
  -H "Authorization: Bearer $DRAVO_API_KEY"
```

A status of `published` means it went out, `partial` means some accounts
succeeded and others failed, and `failed` means none did. Read
[Async publishing](/docs/concepts/async-publishing) for the full lifecycle, and
[Errors](/docs/concepts/errors) for how to interpret failures.
