OpaSocial
Sign in
Menu
Language
Sign in Create account

Order from your own tools

A REST API that uses the same USD wallet, prices and statuses as the app. Send your own client references, receive signed webhooks, and reconcile against statements.

  • Scoped keysEach key gets only the permissions you choose, with optional IP rules, a daily spending limit and an expiry date.
  • Safe retriesEvery order carries your idempotency key, so a retried request can never create a second order or charge.
  • Signed webhooksOrder, subscription and delivery plan updates, signed with your secret, with delivery history and resend.
  • USD to 8 decimalsAmounts are USD decimal strings, never floating-point numbers. Prices are per unit; the catalogue shows them per 1,000.

Prefer to generate a client? Download the OpenAPI document — it describes every endpoint on this page.

Example: create an order
POST /api/v2/orders
Authorization: Bearer opk_••••
Content-Type: application/json

{
  "offer_id": 1042,
  "target": "https://social.example/p/8f2Kq9vLm",
  "quantity": 1000,
  "idempotency_key": "crm-8812",
  "client_ref": "crm-8812",
  "max_total": "2.50"
}

201 Created
{
  "order": 1042,
  "status": "pending",
  "charge": "2.37000000",
  "returned": "0.00000000",
  "quantity": 1000,
  "currency": "USD",
  "duplicate_flagged": false,
  "client_ref": "crm-8812",
  "created_at": "2026-10-28T09:15:00+00:00"
}

Permissions

A new permission is never added to an existing key. Create a new key to use it.

account:read
Read your balance
orders:read
Read orders and services
insights:read
Read delivery figures and service timings with each service
orders:write
Place orders
orders:refill
Request refills
orders:cancel
Request cancellations
drip_feeds:read / drip_feeds:write
Read or manage delivery plans
subscriptions:read / subscriptions:write
Read or manage automatic posts
webhooks:manage
Manage webhooks

Errors

Every error returns `error` and a `correlation_id` to quote to support. We never pass on a partner’s raw response.

HTTPerrorMeaning
401unauthenticatedThe key is missing, wrong, revoked or expired.
402insufficient_balanceNot enough balance. Nothing was charged.
403forbiddenThe key does not have the permission, or the IP address is not allowed.
409idempotency_conflictThe same idempotency key was used with different details.
409service_unavailableThe service cannot take orders right now. Nothing was charged.
422wrong_platform_linkThe link is for another platform than the service, for example a Facebook link on an Instagram service. Nothing was charged.
422validation_failedA field is missing or invalid, or the key’s daily spending limit would be passed; `fields` lists which.
429rate_limitedToo many requests. Try again later.
503temporarily_unavailableThe API is paused for maintenance.

Every endpoint

Send your key as Authorization: Bearer opk_…. Request and response bodies are JSON. A field marked required must be present; everything else may be left out.

Your account

What a key may see about the account it belongs to.

GET /api/v2/account

Read USD account balance

Needs account:read

Comes back
Status Shape Meaning
200 Account Successful response
Any refusal Error Safe refusal; no raw provider response.

Services

The catalogue, and how long each service has been taking.

GET /api/v2/services

Browse eligible services

Up to 100 scanned offers per cursor. Filtered pages may contain fewer eligible services. Follow next_after until null.

Needs orders:read

In the path or query
Field Type In Notes
after integer query least 0
Comes back
Status Shape Meaning
200 object Successful response
Any refusal Error Safe refusal; no raw provider response.
GET /api/v2/services/{offer}/delivery

Read delivery availability

Needs drip_feeds:read

In the path or query
Field Type In Notes
offer required integer path least 1
Comes back
Status Shape Meaning
200 object Successful response
Any refusal Error Safe refusal; no raw provider response.

Orders

Placing an order, following it, and asking for a refill or a cancellation.

POST /api/v2/orders

Place an order

Needs orders:write

Body (required)
Field Type Notes
idempotency_key required string 191 characters
offer_id required integer least 1
target required string 2048 characters
agency_project_id integer least 1
client_ref string 160 characters
details object Fields for the enabled service type; see service-input table in phase-08-contracts.md.
max_rate string Maximum USD per UNIT, not catalogue per-1000 rate.
max_total string USD decimal string; never binary floating point.
quantity integer or null least 1, most 1000000000
Comes back
Status Shape Meaning
200 Order Idempotent replay of original resource
201 Order Successful response
Any refusal Error Safe refusal; no raw provider response.
POST /api/v2/validate-order

Validate order without creating it

Needs orders:write

Body (required)
Field Type Notes
offer_id required integer least 1
target required string 2048 characters
agency_project_id integer least 1
client_ref string 160 characters
details object Fields for the enabled service type; see service-input table in phase-08-contracts.md.
idempotency_key string 191 characters
max_rate string Maximum USD per UNIT, not catalogue per-1000 rate.
max_total string USD decimal string; never binary floating point.
quantity integer or null least 1, most 1000000000
Comes back
Status Shape Meaning
200 object Successful response
Any refusal Error Safe refusal; no raw provider response.
POST /api/v2/orders/status

Read mixed batch status

Needs orders:read

Body (required)
Field Type Notes
orders required integer list
Comes back
Status Shape Meaning
200 object Successful response
Any refusal Error Safe refusal; no raw provider response.
GET /api/v2/orders/{order}

Read own order

Needs orders:read

In the path or query
Field Type In Notes
order required integer path least 1
Comes back
Status Shape Meaning
200 Order Successful response
Any refusal Error Safe refusal; no raw provider response.
POST /api/v2/orders/{order}/cancel

Request order cancel

Provider request only; acknowledgement never changes order status or refunds money.

Needs orders:cancel

In the path or query
Field Type In Notes
order required integer path least 1
Body (required)
Field Type Notes
idempotency_key required string 191 characters
Comes back
Status Shape Meaning
202 ActionRequest Successful response
Any refusal Error Safe refusal; no raw provider response.
POST /api/v2/orders/{order}/refill

Request order refill

Provider request only; acknowledgement never changes order status or refunds money.

Needs orders:refill

In the path or query
Field Type In Notes
order required integer path least 1
Body (required)
Field Type Notes
idempotency_key required string 191 characters
Comes back
Status Shape Meaning
202 ActionRequest Successful response
Any refusal Error Safe refusal; no raw provider response.

Requests

A refill or a cancellation is a request with its own outcome.

GET /api/v2/requests/{actionRequest}

Read own action request

Needs orders:read

In the path or query
Field Type In Notes
actionRequest required integer path least 1
Comes back
Status Shape Meaning
200 ActionRequest Successful response
Any refusal Error Safe refusal; no raw provider response.

Delivery plans

Spreading one order over time, and pausing or resuming it.

POST /api/v2/drip-feeds

Create drip feed

Needs drip_feeds:write

Body (required)
Field Type Notes
idempotency_key required string 191 characters
interval_minutes required integer least 1, most 525600
mode required string scheduled | service_managed
offer_id required integer least 1
quantity required integer least 1
runs required integer least 2, most 500
target required string 2048 characters
client_ref string 160 characters
max_rate string USD decimal string; never binary floating point.
max_total string USD decimal string; never binary floating point.
Comes back
Status Shape Meaning
200 object Idempotent replay of original resource
201 object Successful response
Any refusal Error Safe refusal; no raw provider response.
GET /api/v2/drip-feeds

List own scheduled drips

Needs drip_feeds:read

In the path or query
Field Type In Notes
after integer query least 0
Comes back
Status Shape Meaning
200 object Successful response
Any refusal Error Safe refusal; no raw provider response.
GET /api/v2/drip-feeds/{plan}

Read scheduled drip runs

Needs drip_feeds:read

In the path or query
Field Type In Notes
plan required integer path least 1
page integer query least 1
Comes back
Status Shape Meaning
200 object Successful response
Any refusal Error Safe refusal; no raw provider response.
POST /api/v2/drip-feeds/{plan}/{action}

Control future scheduled runs

Needs drip_feeds:write

In the path or query
Field Type In Notes
plan required integer path least 1
action required string path pause | resume | cancel
Comes back
Status Shape Meaning
200 object Successful response
Any refusal Error Safe refusal; no raw provider response.

Automatic posts

Watching an account and ordering for each new post.

POST /api/v2/subscriptions

API create subscription

Needs subscriptions:write

Body (required)
Field Type Notes
idempotency_key required string 191 characters
max_posts_per_day required integer least 1, most 100
monthly_spend_usd required string USD decimal string; never binary floating point.
offer_id required integer least 1
quantity required integer least 1, most 1000000000
username required string
agency_project_id integer least 1
include_reels boolean
label string 160 characters
max_post_usd string USD decimal string; never binary floating point.
Comes back
Status Shape Meaning
200 object Idempotent replay of original resource
201 object Successful response
Any refusal Error Safe refusal; no raw provider response.
GET /api/v2/subscriptions

API list subscriptions

Needs subscriptions:read

In the path or query
Field Type In Notes
after integer query least 0
Comes back
Status Shape Meaning
200 object Successful response
Any refusal Error Safe refusal; no raw provider response.
GET /api/v2/subscriptions/{subscription}

API read subscription

Needs subscriptions:read

In the path or query
Field Type In Notes
subscription required integer path least 1
Comes back
Status Shape Meaning
200 object Successful response
Any refusal Error Safe refusal; no raw provider response.
GET /api/v2/subscriptions/{subscription}/posts

API read subscription posts

Needs subscriptions:read

In the path or query
Field Type In Notes
subscription required integer path least 1
after integer query least 0
Comes back
Status Shape Meaning
200 object Successful response
Any refusal Error Safe refusal; no raw provider response.
POST /api/v2/subscriptions/{subscription}/{action}

API control subscription

Needs subscriptions:write

In the path or query
Field Type In Notes
subscription required integer path least 1
action required string path pause | resume | cancel
Comes back
Status Shape Meaning
200 object Successful response
Any refusal Error Safe refusal; no raw provider response.

Webhooks

Where updates are sent, with the secret, the delivery history and a resend.

GET /api/v2/webhooks

List webhook endpoints

Needs webhooks:manage

Comes back
Status Shape Meaning
200 object Successful response
Any refusal Error Safe refusal; no raw provider response.
POST /api/v2/webhooks

Register webhook endpoint

Public HTTPS port 443; no query, fragment, credentials, private address or redirect. Also needs each selected event scope. Five enabled endpoints per account. Secret returned once.

Needs webhooks:manage

Body (required)
Field Type Notes
events required object list
url required string 1024 characters
Comes back
Status Shape Meaning
201 object Successful response
Any refusal Error Safe refusal; no raw provider response.
PATCH /api/v2/webhooks/{endpoint}

Update webhook opt in

Needs webhooks:manage

In the path or query
Field Type In Notes
endpoint required integer path least 1
Body (required)
Field Type Notes
enabled boolean
events object list
Comes back
Status Shape Meaning
200 object Successful response
Any refusal Error Safe refusal; no raw provider response.
POST /api/v2/webhooks/{endpoint}/activate-secret

Activate webhook signing secret

Needs webhooks:manage

In the path or query
Field Type In Notes
endpoint required integer path least 1
Body (required)
Field Type Notes
proof required string
Comes back
Status Shape Meaning
200 object Successful response
Any refusal Error Safe refusal; no raw provider response.
GET /api/v2/webhooks/{endpoint}/deliveries

Read webhook delivery history

Needs webhooks:manage

In the path or query
Field Type In Notes
endpoint required integer path least 1
after integer query least 0
Comes back
Status Shape Meaning
200 object Successful response
Any refusal Error Safe refusal; no raw provider response.
POST /api/v2/webhooks/{endpoint}/rotate

Prepare webhook signing secret

Needs webhooks:manage

In the path or query
Field Type In Notes
endpoint required integer path least 1
Comes back
Status Shape Meaning
200 object Successful response
Any refusal Error Safe refusal; no raw provider response.
POST /api/v2/webhooks/{endpoint}/deliveries/{delivery}/replay

Replay webhook business event

Needs webhooks:manage

In the path or query
Field Type In Notes
endpoint required integer path least 1
delivery required integer path least 1
Comes back
Status Shape Meaning
202 object Successful response
Any refusal Error Safe refusal; no raw provider response.

Older panel format

One endpoint that takes the action in the body, for tools written against other panels.

POST /api/v2

Standard SMM panel API compatibility

The standard key + action API used by SMM panels (Decision 95), with OpaSocial extras accepted on top. Bearer key OR body key is required; query key cannot authenticate. JSON or form encoding. status, refill and cancel take `order` or a comma list in `orders`; refill_status takes `refill` or `refills`. add with `runs` and `interval` is a drip feed with `quantity` per run. It uses OpaSocial's own scheduled plan first, returned as order number 1000000000 + plan ID, otherwise a provider-managed order. Errors are {"error": code}. Unknown actions including create_order are refused.

Body (required)
Field Type Notes
action required string balance | services | add | status | orders | refill | cancel | refill_status
agency_project_id integer least 1
client_ref string
idempotency_key string
interval integer Minutes between runs. — least 1
key string
link string 2048 characters
max_rate string USD decimal string; never binary floating point.
max_total string USD decimal string; never binary floating point.
order integer least 1
orders string 2200 characters
quantity integer least 1
refill integer least 1
refills string Comma list of up to 100 refill IDs. — 2200 characters
runs integer least 2, most 500
service integer least 1
Comes back
Status Shape Meaning
200 object Successful response
Any refusal Error Safe refusal; no raw provider response.

Receiving webhooks

We POST this body to the URL you registered. Answer 2xx within a few seconds; anything else is retried.

The body

Field Type Notes
data required object Owner-safe payload by event type; see contract event table.
id required string
occurred_at required string
type required string order.status | order.settled | service.price_changed | subscription.changed | subscription.post | drip.changed
version required string
Event types
  • order.status
  • order.settled
  • service.price_changed
  • subscription.changed
  • subscription.post
  • drip.changed

Checking the signature

HeaderWhat it is
X-OpaSocial-Event The event id. The same event retried keeps this id, so use it to make your handler idempotent.
X-OpaSocial-Delivery This attempt. Changes on every retry.
X-OpaSocial-Timestamp Unix seconds, signed along with the body. Refuse anything older than five minutes.
X-OpaSocial-Key-Version Which secret signed it, so a rotated secret and the old one can both be accepted while you switch.
X-OpaSocial-Signature `sha256=` followed by the hex digest below.

HMAC-SHA256 over timestamp.event_id.delivery_id.raw_body, joined with full stops, with your endpoint secret as the key. Use the raw body exactly as it arrived — re-encoding the JSON changes the bytes and the signature will not match.

$expected = hash_hmac(
    'sha256',
    $timestamp.'.'.$eventId.'.'.$deliveryId.'.'.$rawBody,
    $yourSecret,
);

// Constant-time, so a wrong signature cannot be guessed one
// character at a time by watching how long the check takes.
if (! hash_equals($expected, substr($header, strlen('sha256=')))) {
    abort(400);
}

Shapes

The objects named above, field by field.

Account

Field Type Notes
balance required string USD decimal string; never binary floating point.
currency required string

ActionRequest

Field Type Notes
created_at required string
kind required string refill | cancel
order required integer least 1
request required integer least 1
status required string pending | completed | rejected

DripInput

Field Type Notes
idempotency_key required string 191 characters
interval_minutes required integer least 1, most 525600
mode required string scheduled | service_managed
offer_id required integer least 1
quantity required integer least 1
runs required integer least 2, most 500
target required string 2048 characters
client_ref string 160 characters
max_rate string USD decimal string; never binary floating point.
max_total string USD decimal string; never binary floating point.

DripPlan

Field Type Notes
authorization_required required boolean
channel required string api | website
charge_usd required string USD decimal string; never binary floating point.
interval_minutes required integer least 1
paused required boolean
plan_id required integer least 1
refund_settled_usd required string USD decimal string; never binary floating point.
remaining_refund_cap_usd required string USD decimal string; never binary floating point.
run_count required integer least 1
runs required DripRun list
runs_page required object
status required string
status_accessibility required object
total_quantity required integer least 1

DripRun

Field Type Notes
allocated_quantity required integer least 1
allocated_usd required string USD decimal string; never binary floating point.
child_order_reference required string
child_status required string
delivered_quantity required string
planned_at required string
released_at required string
review_required required boolean
sequence required integer least 1
settlement_usd required string USD decimal string; never binary floating point.
status required string
status_accessibility required object
submitted_at required string
terminal_at required string

Error

Field Type Notes
error required string
correlation_id string
fields string list

Order

Field Type Notes
charge required string USD decimal string; never binary floating point.
client_ref required string
created_at required string
currency required string
duplicate_flagged required boolean
order required integer least 1
quantity required integer least 1
returned required string USD decimal string; never binary floating point.
status required string
remains integer From the last verified status poll; the whole quantity before the first, 0 once completed. — least 0
start_count integer From the last verified status poll; 0 before the first. — least 0

OrderInput

Field Type Notes
idempotency_key required string 191 characters
offer_id required integer least 1
target required string 2048 characters
agency_project_id integer least 1
client_ref string 160 characters
details object Fields for the enabled service type; see service-input table in phase-08-contracts.md.
max_rate string Maximum USD per UNIT, not catalogue per-1000 rate.
max_total string USD decimal string; never binary floating point.
quantity integer or null least 1, most 1000000000

Service

Field Type Notes
cancel required boolean Whether cancellation can be requested on this service.
category required string
currency required string
max required string
min required integer least 1
name required string
offer_id required integer least 1
platform required string
rate required string USD per 1000 units, except package types: per package.
refill required boolean Whether refills can be requested on this service.
service required integer least 1
type required string
unit_rate_usd required string USD decimal string; never binary floating point.
insights object Only for keys granted insights:read (Decision 95): the offer's status and its measured figures over 30 days. measured is null below the minimum sample. Never a provider, route or cost.

Subscription

Field Type Notes
created_at required string
currency required string
detection required object Provider-neutral watch state. Only public Instagram Business or Creator accounts can be watched; account_not_supported means personal, private or missing, is rechecked daily and is never charged.
id required integer least 1
label required string
offer_id required integer least 1
settings required object quantity, max_post_usd, max_posts_per_day, monthly_spend_usd, include_reels, timezone=UTC, new_posts_only=true
status required string active | paused | cancelled
username required string

SubscriptionInput

Field Type Notes
idempotency_key required string 191 characters
max_posts_per_day required integer least 1, most 100
monthly_spend_usd required string USD decimal string; never binary floating point.
offer_id required integer least 1
quantity required integer least 1, most 1000000000
username required string
agency_project_id integer least 1
include_reels boolean
label string 160 characters
max_post_usd string USD decimal string; never binary floating point.

SubscriptionPost

Field Type Notes
charge_usd required string USD decimal string; never binary floating point.
id required integer least 1
order required string
published_at required string
reason required string
status required string ordered | skipped
target required string

WebhookEndpoint

Field Type Notes
enabled required boolean
events required string list
id required integer least 1
rotation_pending required boolean
secret_version required integer least 1
url required string

WebhookEvent

Field Type Notes
data required object Owner-safe payload by event type; see contract event table.
id required string
occurred_at required string
type required string order.status | order.settled | service.price_changed | subscription.changed | subscription.post | drip.changed
version required string

Something not answered here? API questions