Documentation menu

API reference

Publish

View .md

Enqueue a unified publish job, cancel a scheduled one, and read the delivery history.

The publish resource is the core of Dravo. You enqueue a job against one or more connected accounts and Dravo delivers asynchronously. For the model behind these calls, read async publishing.

Publish a post

Send the target accounts and the content. Returns 202 with a job id; the post is delivered in the background.

POST/v1/publish

Enqueue a unified publish job to one or more connected accounts. Returns immediately (202) and delivers asynchronously.

Auth: API key (dra_…) or dashboard JWT

Headers

FieldInTypeRequiredDescription
AuthorizationbodyyesBearer <DRAVO_API_KEY> or Bearer <JWT>.
Idempotency-KeybodynoOptional. Repeated requests with the same key return the same job instead of enqueuing a duplicate.

Parameters

FieldInTypeRequiredDescription
account_idsbodystring[]yes1 to 100 connected account IDs to publish to.
textbodystringyesPost body, 1 to 5000 chars.
media_urlsbodystring[]noPublic URLs of images/videos, ideally ingested first via POST /v1/media.
provider_optionsbodyobjectnoPer-provider overrides keyed by provider (e.g. tiktok.privacy_level).
scheduled_atbodystring (ISO 8601)noIf set, schedule the job. Must be timezone-aware and at least 60 seconds in the future.

Request

{
  "account_ids": [
    "acc_8f2c1d",
    "acc_4b9e07"
  ],
  "text": "Shipping Dravo: one API for every social network.",
  "media_urls": [
    "https://cdn.dravo.dev/u/abc/cover.jpg"
  ],
  "provider_options": {
    "tiktok": {
      "privacy_level": "SELF_ONLY"
    }
  }
}

Response 202 Job accepted and queued (or scheduled).

{
  "job_id": "job_2a7f93",
  "status": "queued",
  "scheduled_at": null
}

Errors

  • 400: Validation error (empty text, no account_ids, scheduled_at in the past).
  • 401: Missing or invalid API key / JWT.

Cancel a scheduled job

Cancel a job while it is still scheduled. Once it has queued for delivery it can no longer be canceled.

POST/v1/publish/{job_id}/cancel

Cancel a scheduled job that has not yet been queued for delivery.

Auth: API key (dra_…) or dashboard JWT

Parameters

FieldInTypeRequiredDescription
job_idpathstringyesThe job to cancel.

Response 200 Job canceled.

{
  "job_id": "job_2a7f93",
  "status": "canceled",
  "scheduled_at": "2026-07-01T09:00:00Z"
}

Errors

  • 409: Job already queued/processing and can no longer be canceled.
  • 404: Job not found.

List publish history

Paginated history with the per account delivery results, filterable by status, provider and free text.

GET/v1/publish

Paginated history of publish jobs with per-account delivery results.

Auth: API key (dra_…) or dashboard JWT

Parameters

FieldInTypeRequiredDescription
statusquerystringnoFilter: queued, processing, published, partial, failed, canceled, scheduled.
providerquerystringnoFilter by provider.
qquerystringnoFull-text search on post text.
limitqueryintnoPage size, 1 to 100 (default 50).
cursorquerystringnoKeyset pagination cursor from next_cursor.

Response 200 A page of publish logs.

{
  "items": [
    {
      "id": "log_19ab",
      "job_id": "job_2a7f93",
      "status": "published",
      "text": "Shipping Dravo…",
      "providers": [
        "x",
        "linkedin"
      ],
      "results": [
        {
          "provider": "x",
          "status": "published",
          "platform_post_id": "1890…"
        }
      ],
      "created_at": "2026-06-23T10:15:30Z"
    }
  ],
  "next_cursor": null,
  "total": 1
}