PostEverywhere Campaigns API
Group posts into campaigns to tag, filter, and report on related content across platforms.
Group posts into campaigns to tag, filter, and report on related content across platforms.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/posteverywhere-ai:posteverywhere-ai-campaigns-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: PostEverywhere API Reference Campaigns API
version: 1.0.1
description: 'Public v1 API for PostEverywhere: schedule and publish content across
13 platforms: X (Twitter), Google Business Profile, Instagram, Facebook, LinkedIn, YouTube,
TikTok, Threads, Pinterest, Bluesky, Telegram, Discord and WordPress.
New here? Start with the Quick Start (first post in 5
minutes) and Authentication. Platform-specific
behavior lives in the Platform Guides, and
media constraints in Media Requirements.
## Authentication
All endpoints (except the device-login pair under `/auth/device`) accept an
API key in the `Authorization` header:
```
Authorization: Bearer pe_live_...
```
Keys are created in the dashboard (Developers) or minted by the CLI device
flow (`POST /auth/device` → `POST /auth/device/token`). Keys carry scopes
(`read`, `write`, `ai`); each operation''s required scope is noted via
`x-scope`. A missing scope returns `403 insufficient_scope`. A browser
session cookie also works as a fallback for interactive testing; scopes are
then implicitly `read, write, ai` and API-key rate limits are skipped.
Auth failures return `401` with codes `invalid_api_key`, `api_key_revoked`,
or `api_key_expired`. Organizations without an active subscription receive
`402 subscription_required` (the error object additionally carries
`subscription_status`).
## Response envelope
Every endpoint responds with the same JSON envelope: a `data` object, an
`error` object and a `meta` object (`meta.request_id`, an 8-character
correlation id, and `meta.timestamp`, ISO 8601). On success `error` is
`null`. On failure `data` is `null` and `error` carries `message`, `code`
(for example `validation_error`), `retryable` and an optional `details`
object.
`error.retryable` is `true` for transient failures (HTTP 5xx and 429) and
`false` for permanent ones; clients should not blindly retry 4xx.
Exception: the auth layer''s own 401/402 responses omit `retryable` and
`meta.request_id` (they carry only `meta.timestamp`).
## Rate limiting
API keys are limited to 60 requests/minute and 1,000 requests/hour.
When the API-key limit is hit the `429` response includes
`X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`
(unix seconds) headers. Every `429` (including posting-budget and
AI-budget limits, which are separate from the API-key limit) includes a
`Retry-After` header (seconds, default 30).
Posting budgets (per user): immediate publishes 60/min, 200/hour,
1,000/day; scheduled posts 100/min, 1,000/hour with no daily cap.
Media uploads: 500/hour, 2,500/day, counted when an upload finishes
(`/media/ID/complete`, a direct upload, or `/media/upload-from-url`),
not at presign.
X: scheduled posts are limited to 100 a day per organisation. A post over
the limit is held and sent when the window reopens; it is not failed.
During a free trial each X account can post 15 times a day.
## Timestamps
All timestamps are ISO 8601. `scheduled_for` request values without an
explicit offset are interpreted as UTC. The `timezone` field is display
metadata only. It never changes when a post fires.'
contact:
name: PostEverywhere Developers
url: https://posteverywhere.ai/docs
servers:
- url: https://app.posteverywhere.ai/api/v1
description: Production
security:
- apiKey: []
tags:
- name: Campaigns
description: Group posts into campaigns to tag, filter, and report on related content across platforms.
paths:
/campaigns:
get:
operationId: listCampaigns
x-scope: read
tags:
- Campaigns
summary: List campaigns in the workspace
description: 'Returns every campaign in the workspace with name, color, status,
and post counts. Use `status` to filter active vs archived.'
parameters:
- name: status
in: query
schema:
type: string
enum:
- active
- archived
- name: limit
in: query
schema:
type: integer
default: 50
maximum: 100
- name: offset
in: query
schema:
type: integer
default: 0
responses:
'200':
description: Campaigns
content:
application/json:
schema:
type: object
required:
- data
- error
- meta
properties:
data:
type: object
required:
- campaigns
- pagination
properties:
campaigns:
type: array
items:
$ref: '#/components/schemas/Campaign'
pagination:
$ref: '#/components/schemas/Pagination'
error:
type: 'null'
meta:
$ref: '#/components/schemas/Meta'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimited'
'500':
$ref: '#/components/responses/ServerError'
post:
operationId: createCampaign
x-scope: write
tags:
- Campaigns
summary: Create a campaign
description: 'Campaigns group related posts (assign via `campaign_id` when listing
posts; the dashboard sets it on posts). Default color is `#3b82f6`.'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- name
properties:
name:
type: string
maxLength: 100
description:
type: string
maxLength: 500
color:
type: string
pattern: ^#[0-9a-fA-F]{6}$
status:
type: string
enum:
- active
- archived
default: active
example:
name: Q3 Launch
description: Everything for the July product launch
color: '#3b82f6'
responses:
'201':
description: Campaign created
content:
application/json:
schema:
type: object
required:
- data
- error
- meta
properties:
data:
$ref: '#/components/schemas/Campaign'
error:
type: 'null'
meta:
$ref: '#/components/schemas/Meta'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimited'
'500':
$ref: '#/components/responses/ServerError'
/campaigns/{id}:
get:
operationId: getCampaign
x-scope: read
tags:
- Campaigns
summary: Get a campaign
description: 'Fetch one campaign by id: name, description, color, status, and
its `post_count`.'
parameters:
- $ref: '#/components/parameters/CampaignId'
responses:
'200':
description: Campaign
content:
application/json:
schema:
type: object
required:
- data
- error
- meta
properties:
data:
$ref: '#/components/schemas/Campaign'
error:
type: 'null'
meta:
$ref: '#/components/schemas/Meta'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/RateLimited'
'500':
$ref: '#/components/responses/ServerError'
patch:
operationId: updateCampaign
x-scope: write
tags:
- Campaigns
summary: Update a campaign
description: At least one of name, description, color, status is required.
parameters:
- $ref: '#/components/parameters/CampaignId'
requestBody:
required: true
content:
application/json:
schema:
type: object
minProperties: 1
properties:
name:
type: string
maxLength: 100
description:
type: string
maxLength: 500
color:
type: string
pattern: ^#[0-9a-fA-F]{6}$
status:
type: string
enum:
- active
- archived
responses:
'200':
description: Updated campaign
content:
application/json:
schema:
type: object
required:
- data
- error
- meta
properties:
data:
$ref: '#/components/schemas/Campaign'
error:
type: 'null'
meta:
$ref: '#/components/schemas/Meta'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/RateLimited'
'500':
$ref: '#/components/responses/ServerError'
delete:
operationId: deleteCampaign
x-scope: write
tags:
- Campaigns
summary: Delete a campaign
description: Posts in the campaign survive; their campaign_id is set to null.
parameters:
- $ref: '#/components/parameters/CampaignId'
responses:
'200':
description: Deleted
content:
application/json:
schema:
type: object
required:
- data
- error
- meta
properties:
data:
type: object
required:
- id
- deleted
properties:
id:
type: integer
deleted:
type: boolean
const: true
error:
type: 'null'
meta:
$ref: '#/components/schemas/Meta'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/RateLimited'
'500':
$ref: '#/components/responses/ServerError'
components:
schemas:
Meta:
type: object
description: Response metadata. request_id is an 8-char correlation id (absent on auth-layer 401/402).
properties:
request_id:
type: string
timestamp:
type: string
format: date-time
required:
- timestamp
Campaign:
type: object
required:
- id
- name
- status
- post_count
- created_at
- updated_at
properties:
id:
type: integer
name:
type: string
description:
type:
- string
- 'null'
color:
type:
- string
- 'null'
description: 'Hex color, e.g. #3b82f6'
status:
type: string
enum:
- active
- archived
post_count:
type: integer
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
ErrorBody:
type: object
required:
- message
properties:
message:
type: string
code:
type: string
description: Machine-readable error code (e.g. validation_error, not_found, rate_limit_exceeded)
retryable:
type: boolean
description: true for transient failures (5xx, 429). Absent on auth-layer 401/402 errors.
details:
description: Optional structured context specific to the error code
subscription_status:
type: string
description: Present only on 402 subscription_required
additionalProperties: true
Pagination:
type: object
required:
- limit
- offset
properties:
limit:
type: integer
offset:
type: integer
total:
type: integer
has_more:
type: boolean
ErrorEnvelope:
type: object
required:
- data
- error
- meta
properties:
data:
type: 'null'
error:
$ref: '#/components/schemas/ErrorBody'
meta:
$ref: '#/components/schemas/Meta'
responses:
BadRequest:
description: Validation error; see error.code and error.details
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
example:
data: null
error:
message: account_ids is required and must be a non-empty array. Use GET /accounts to find your account IDs.
code: account_ids_required
retryable: false
meta:
request_id: 1a2b3c4d
timestamp: '2026-07-08T09:00:00.000Z'
NotFound:
description: Resource not found in your organization/workspace (not_found)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
example:
data: null
error:
message: Post not found. Verify the post ID belongs to your organization.
code: not_found
retryable: false
meta:
request_id: 1a2b3c4d
timestamp: '2026-07-08T09:00:00.000Z'
RateLimited:
description: 'Rate limit exceeded (rate_limit_exceeded, or plan budgets
post_limit_reached / daily_limit_reached on schedulePost). All 429s
carry Retry-After. The API-key limiter additionally sets the
X-RateLimit-* headers and error.details (limit, remaining, reset_at).
'
headers:
Retry-After:
description: Seconds to wait before retrying
schema:
type: integer
X-RateLimit-Limit:
description: Requests allowed in the window (API-key limiter only)
schema:
type: integer
X-RateLimit-Remaining:
description: Requests remaining (API-key limiter only)
schema:
type: integer
X-RateLimit-Reset:
description: Unix seconds when the window resets (API-key limiter only)
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
example:
data: null
error:
message: API rate limit exceeded (60 requests/min). Please slow down.
code: rate_limit_exceeded
retryable: true
details:
limit: 60
remaining: 0
reset_at: '2026-07-08T09:01:00.000Z'
meta:
request_id: 1a2b3c4d
timestamp: '2026-07-08T09:00:00.000Z'
PaymentRequired:
description: 'No active subscription (code subscription_required; the error object
also carries subscription_status), or insufficient AI credits
(insufficient_credits) / paid plan required (upgrade_required).
'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
example:
data: null
error:
message: Your free trial has ended. Please upgrade to a paid plan to continue using the API.
code: subscription_required
subscription_status: expired
meta:
timestamp: '2026-07-08T09:00:00.000Z'
Forbidden:
description: API key missing the required scope (insufficient_scope), storage quota exceeded (storage_quota_exceeded), or account limit reached (account_limit_reached)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
example:
data: null
error:
message: 'API key missing required scope: ''write''. Your key has scopes: [read]'
code: insufficient_scope
retryable: false
details:
required_scope: write
current_scopes:
- read
meta:
request_id: 1a2b3c4d
timestamp: '2026-07-08T09:00:00.000Z'
ServerError:
description: Internal error (internal_error and endpoint-specific 5xx codes). Retryable.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
example:
data: null
error:
message: Failed to create post. Verify content, account_ids, and optional media_ids/scheduled_for are valid, then retry.
code: internal_error
retryable: true
meta:
request_id: 1a2b3c4d
timestamp: '2026-07-08T09:00:00.000Z'
Unauthorized:
description: 'Missing/invalid/revoked/expired API key (codes invalid_api_key,
api_key_revoked, api_key_expired, api_key_required, auth_failed).
Auth-layer 401s omit error.retryable and meta.request_id.
'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
example:
data: null
error:
message: 'Invalid API key format. Expected: Bearer pe_live_...'
code: invalid_api_key
meta:
timestamp: '2026-07-08T09:00:00.000Z'
parameters:
CampaignId:
name: id
in: path
required: true
description: Campaign ID (integer)
schema:
type: integer
minimum: 1
securitySchemes:
apiKey:
type: http
scheme: bearer
bearerFormat: pe_live_...
description: 'API key created in the dashboard (Developers) or via the device-login
flow. Keys start with `pe_live_` and carry scopes (read, write, ai);
only a SHA-256 hash is stored server-side. See each operation''s
`x-scope` for the scope it requires.
'