---
title: "Publish one post to several accounts"
method: POST
path: "/api/v1/publications"
tags: ["Posts"]
---

# Publish one post to several accounts

`POST /api/v1/publications`

## Request

- Base URL: `https://app.tryadeli.com`
- URL: `https://app.tryadeli.com/api/v1/publications`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/adeli/apis/adeli-api/docs/api/v1/publications/post.ts> (a function with typed inputs; its response is checked against the schema)

Shared `content` and `media` go to every target in `platforms`; a target's own `content`, `media`, and `options` (that platform's `createPost` fields) override them. Every target is validated as `createPost` would validate it, then the publication is accepted durably with 202 and a `statusUrl`. Poll `getPublication` until `status` is `published`, `partial`, or `failed`. Scheduling is not supported yet.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `profileId` string, uuid
  - `content` string
  - `media` union[]
    - union
      - object
        - `upload_id` string, required
      - object
        - `url` string, uri, required
  - `platforms` object[], required
    - `platform` 'instagram' | 'facebook' | 'tiktok' | 'youtube' | 'x' | 'bluesky' | 'linkedin', required
    - `accountId` string, uuid, required
    - `kind` 'image' | 'carousel' | 'video' | 'reel' | 'story'
    - `content` string
    - `media` object[]
    - `options` object

## Response `200`

Success

- object
  - `id` string, uuid, required
  - `profileId` string, uuid, required
  - `status` 'queued' | 'processing' | 'published' | 'partial' | 'failed', required
  - `progress` number, required
  - `statusUrl` string, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required
  - `completedAt` string, date-time, nullable, required
  - `targets` object[], required
    - `id` string, uuid, required
    - `platform` 'instagram' | 'facebook' | 'tiktok' | 'youtube' | 'x' | 'bluesky' | 'linkedin', required
    - `accountId` string, uuid, required
    - `status` 'queued' | 'submitting' | 'processing' | 'published' | 'failed' | 'outcome_unknown', required
    - `attempts` integer, required
    - `result` object, nullable, required
    - `error` object, nullable, required
      - `code` string, required
      - `message` string, required

## Other responses

- `202`: Success
- `400`: Invalid request or provider failure
- `401`: Missing or invalid API key
- `402`: Billing is required: a card is needed to connect more accounts or use X (`billing_required`, `x_billing_required`), or the workspace has used its free monthly allowance (`usage_limit_reached`)
- `404`: Profile, account, or object not found
- `409`: The request conflicts with existing state
- `502`: Invalid request or provider failure

---

[API](https://skmtc.dev/adeli/apis/adeli-api.md) - [All operations](https://skmtc.dev/adeli/apis/adeli-api/llms.txt) - [OpenAPI document](https://skmtc.dev/adeli/apis/adeli-api/revisions/ed680dfa9033?raw)
