Skip to content

API reference

Publishing API

Manage outgoing posts and connected publishing accounts

Beta

Base URL
https://reelmirror.com/api
Authentication
Authorization: Bearer rm_…
Contract
openapi.json

List publishing targets

GET/v1/personas/{persona_id}/publishing-targets

Scope publishing:read

List connected publishing accounts linked to a persona. These determine where auto-published content is delivered. Requires publishing:read scope.

Path parameters

  • persona_idstringrequired

Response 200

List of publishing targets Fields below are inside data.

  • idstringuuid
  • connected_account_idstringuuid
  • platformstring

    One ofinstagramtiktok

  • usernamestring
  • statusstring

    One ofactiveexpirederror

  • created_atstringdate-time
curl "https://reelmirror.com/api/v1/personas/$PERSONA_ID/publishing-targets" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY"
Response 200 (example)
{
  "data": [
    {
      "id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
      "connected_account_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
      "platform": "instagram",
      "username": "string",
      "status": "active",
      "created_at": "2026-09-30T17:00:00.000Z"
    }
  ]
}

Add publishing target

POST/v1/personas/{persona_id}/publishing-targets

Scope publishing:write

Link a connected publishing account to a persona. The account must already be connected via OAuth (dashboard). Requires publishing:write scope.

Path parameters

  • persona_idstringrequired

Request body application/json

  • connected_account_idstringrequireduuid

    ID of a connected publishing account from `GET /v1/publishing/accounts`

Response 201

Publishing target linked Fields below are inside data.

  • idstringuuid
  • connected_account_idstringuuid
  • platformstring

    One ofinstagramtiktok

  • usernamestring
  • statusstring

    One ofactiveexpirederror

  • created_atstringdate-time

Errors 409 use the standard error format.

curl -X POST "https://reelmirror.com/api/v1/personas/$PERSONA_ID/publishing-targets" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "connected_account_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10"
}'
Response 201 (example)
{
  "data": {
    "id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
    "connected_account_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
    "platform": "instagram",
    "username": "string",
    "status": "active",
    "created_at": "2026-09-30T17:00:00.000Z"
  }
}

Remove publishing target

DELETE/v1/personas/{persona_id}/publishing-targets/{target_id}

Scope publishing:write

Unlink a publishing account from a persona. Requires publishing:write scope.

Path parameters

  • persona_idstringrequired
  • target_idstringrequired

Response 200

Publishing target removed Fields below are inside data.

  • idstring
  • deletedboolean

    One oftrue

curl -X DELETE "https://reelmirror.com/api/v1/personas/$PERSONA_ID/publishing-targets/$TARGET_ID" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY"
Response 200 (example)
{
  "data": {
    "id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
    "deleted": true
  }
}

Get OAuth connect URL

GET/v1/publishing/accounts/connect

Scope publishing:write

Generate an OAuth URL to connect a new (or reconnect an existing) social account. Requires publishing:write scope.

The OAuth provider will redirect the user's browser to /api/internal/publishing/accounts/callback after authorization — this is not a JSON callback.

Query parameters

  • platformstringrequired

    Social platform to connect. Note: TikTok support is in alpha.

    One ofinstagramtiktok

  • accountIdstringuuid

    ID of an existing connected account to reconnect. Omit for a new connection.

Response 200

OAuth authorization URL Fields below are inside data.

  • auth_urlstringrequired

    Redirect the user to this URL to authorize the connection

Errors 400, 402 use the standard error format.

curl "https://reelmirror.com/api/v1/publishing/accounts/connect?platform=value" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY"
Response 200 (example)
{
  "data": {
    "auth_url": "https://reelmirror.com/…"
  }
}

Get account slots

GET/v1/publishing/accounts/slots

Scope publishing:read

Return the number of purchased, used, and available account slots. Requires publishing:read scope.

Response 200

Slot allocation Fields below are inside data.

  • purchasedintegerrequired
  • usedintegerrequired
  • availableintegerrequired
  • subscriptionIdstring | nullrequired
curl "https://reelmirror.com/api/v1/publishing/accounts/slots" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY"
Response 200 (example)
{
  "data": {
    "purchased": 1,
    "used": 1,
    "available": 1,
    "subscriptionId": "string"
  }
}

Purchase account slots

POST/v1/publishing/accounts/slots

Scope publishing:write

Set the total number of purchased account slots. Creates, updates, or cancels the Stripe subscription accordingly. Returns a checkoutUrl when no payment method is on file. Requires publishing:write scope.

Request body application/json

  • slotsintegerrequired≥ 0

    Total number of paid slots to set

  • returnUrlstring

    Path to redirect to after Stripe Checkout (used when no card is on file)

Response 200

Updated slot allocation, or a Stripe Checkout URL when no payment method is on file Fields below are inside data.

  • purchasedintegerrequired
  • subscriptionIdstring | nullrequired
  • checkoutUrlstring | null

    Stripe Checkout URL when payment collection is needed

Errors 400 use the standard error format.

curl -X POST "https://reelmirror.com/api/v1/publishing/accounts/slots" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "slots": 1
}'
Response 200 (example)
{
  "data": {
    "purchased": 1,
    "subscriptionId": "string",
    "checkoutUrl": "string"
  }
}

List connected accounts

GET/v1/publishing/accounts

Bearer token

List all publishing accounts (Instagram, TikTok (alpha)) connected to your profile.

Query parameters

  • limitinteger≤ 100default 20
  • offsetintegerdefault 0

Response 200

Connected publishing accounts

  • dataarray of object
    5 item attributes
    • idstringuuid
    • platformstring

      One ofinstagramtiktok

    • usernamestring
    • statusstring

      `active` = token valid; `expired` = token expired, reconnect needed; `error` = connection error

      One ofactiveexpirederror

    • created_atstringdate-time
  • countinteger

    Total number of connected accounts

curl "https://reelmirror.com/api/v1/publishing/accounts" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY"
Response 200 (example)
{
  "data": [
    {
      "id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
      "platform": "instagram",
      "username": "string",
      "status": "active",
      "created_at": "2026-09-30T17:00:00.000Z"
    }
  ],
  "count": 1
}

Get account health

GET/v1/publishing/accounts/{id}

Bearer token

Check the health/status of a connected publishing account.

Path parameters

  • idstringrequired

Response 200

Account health Fields below are inside data.

object

Account health information

curl "https://reelmirror.com/api/v1/publishing/accounts/$ID" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY"
Response 200 (example)
{
  "data": {}
}

Disconnect account

DELETE/v1/publishing/accounts/{id}

Bearer token

Disconnect a publishing account from your profile.

Path parameters

  • idstringrequired

Response 200

Account disconnected Fields below are inside data.

  • idstring
  • deletedboolean

    One oftrue

curl -X DELETE "https://reelmirror.com/api/v1/publishing/accounts/$ID" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY"
Response 200 (example)
{
  "data": {
    "id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
    "deleted": true
  }
}

List outgoing posts

GET/v1/publishing/posts

Bearer token

List all outgoing posts for your account, including media items and delivery statuses.

Query parameters

  • limitinteger≤ 100default 20
  • offsetintegerdefault 0

Response 200

List of outgoing posts

  • dataarray of object
    10 item attributes
    • idstringuuid
    • persona_idstring | nulluuid
    • captionstring | null
    • statusstring

      One ofdraftscheduledpublishingpublishedfailedcancelled

    • scheduled_forstring | nulldate-time
    • platform_settingsobject | null
    • itemsarray of object
      4 item attributes
      • idstringuuid
      • generated_media_item_idstringuuid
      • positioninteger
      • use_voice_convertedboolean
    • deliveriesarray of object

      One delivery per target publishing account. Check all deliveries to determine overall publish outcome.

      8 item attributes
      • idstringuuid
      • connected_account_idstringuuid
      • platformstring

        One ofinstagramtiktok

      • usernamestring
      • statusstring

        Terminal states: `published` (success) and `failed` (permanent error). Poll until terminal.

        One ofpendingpublishingpublishedfailed

      • platform_post_idstring | null

        Platform-assigned post ID after successful publish

      • error_messagestring | null

        Error detail when status is `failed`

      • published_atstring | nulldate-time
    • created_atstringdate-time
    • updated_atstringdate-time
  • countinteger

    Total number of outgoing posts

curl "https://reelmirror.com/api/v1/publishing/posts" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY"
Response 200 (example)
{
  "data": [
    {
      "id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
      "persona_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
      "caption": "string",
      "status": "draft",
      "scheduled_for": "2026-09-30T17:00:00.000Z",
      "platform_settings": {},
      "items": [
        {
          "id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
          "generated_media_item_id": "d3d94468-02a4-4c5e-b6f7-0a1b2c3d4e40",
          "position": 1,
          "use_voice_converted": true
        }
      ],
      "deliveries": [
        {
          "id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
          "connected_account_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
          "platform": "instagram",
          "username": "string",
          "status": "pending",
          "platform_post_id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
          "error_message": "string",
          "published_at": "2026-09-30T17:00:00.000Z"
        }
      ],
      "created_at": "2026-09-30T17:00:00.000Z",
      "updated_at": "2026-09-30T17:00:00.000Z"
    }
  ],
  "count": 1
}

Create outgoing post

POST/v1/publishing/posts

Bearer token

Create a draft outgoing post with media items and target publishing accounts.

Request body application/json

  • persona_idstringuuid
  • captionstring
  • itemsarray of objectrequired

    Media items to include in the post

    3 item attributes
    • generated_media_item_idstringrequireduuid
    • positionintegerrequired
    • use_voice_convertedboolean
  • target_account_idsarray of string
  • platform_settingsobject

Response 201

Outgoing post created Fields below are inside data.

  • idstringuuid
  • persona_idstring | nulluuid
  • captionstring | null
  • statusstring

    One ofdraftscheduledpublishingpublishedfailedcancelled

  • scheduled_forstring | nulldate-time
  • platform_settingsobject | null
  • itemsarray of object
    4 item attributes
    • idstringuuid
    • generated_media_item_idstringuuid
    • positioninteger
    • use_voice_convertedboolean
  • deliveriesarray of object

    One delivery per target publishing account. Check all deliveries to determine overall publish outcome.

    8 item attributes
    • idstringuuid
    • connected_account_idstringuuid
    • platformstring

      One ofinstagramtiktok

    • usernamestring
    • statusstring

      Terminal states: `published` (success) and `failed` (permanent error). Poll until terminal.

      One ofpendingpublishingpublishedfailed

    • platform_post_idstring | null

      Platform-assigned post ID after successful publish

    • error_messagestring | null

      Error detail when status is `failed`

    • published_atstring | nulldate-time
  • created_atstringdate-time
  • updated_atstringdate-time
curl -X POST "https://reelmirror.com/api/v1/publishing/posts" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "items": [
    {
      "generated_media_item_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
      "position": 1
    }
  ]
}'
Response 201 (example)
{
  "data": {
    "id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
    "persona_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
    "caption": "string",
    "status": "draft",
    "scheduled_for": "2026-09-30T17:00:00.000Z",
    "platform_settings": {},
    "items": [
      {
        "id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
        "generated_media_item_id": "d3d94468-02a4-4c5e-b6f7-0a1b2c3d4e40",
        "position": 1,
        "use_voice_converted": true
      }
    ],
    "deliveries": [
      {
        "id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
        "connected_account_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
        "platform": "instagram",
        "username": "string",
        "status": "pending",
        "platform_post_id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
        "error_message": "string",
        "published_at": "2026-09-30T17:00:00.000Z"
      }
    ],
    "created_at": "2026-09-30T17:00:00.000Z",
    "updated_at": "2026-09-30T17:00:00.000Z"
  }
}

Get outgoing post

GET/v1/publishing/posts/{id}

Bearer token

Path parameters

  • idstringrequired

Response 200

Outgoing post with items and deliveries Fields below are inside data.

  • idstringuuid
  • persona_idstring | nulluuid
  • captionstring | null
  • statusstring

    One ofdraftscheduledpublishingpublishedfailedcancelled

  • scheduled_forstring | nulldate-time
  • platform_settingsobject | null
  • itemsarray of object
    4 item attributes
    • idstringuuid
    • generated_media_item_idstringuuid
    • positioninteger
    • use_voice_convertedboolean
  • deliveriesarray of object

    One delivery per target publishing account. Check all deliveries to determine overall publish outcome.

    8 item attributes
    • idstringuuid
    • connected_account_idstringuuid
    • platformstring

      One ofinstagramtiktok

    • usernamestring
    • statusstring

      Terminal states: `published` (success) and `failed` (permanent error). Poll until terminal.

      One ofpendingpublishingpublishedfailed

    • platform_post_idstring | null

      Platform-assigned post ID after successful publish

    • error_messagestring | null

      Error detail when status is `failed`

    • published_atstring | nulldate-time
  • created_atstringdate-time
  • updated_atstringdate-time
curl "https://reelmirror.com/api/v1/publishing/posts/$ID" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY"
Response 200 (example)
{
  "data": {
    "id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
    "persona_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
    "caption": "string",
    "status": "draft",
    "scheduled_for": "2026-09-30T17:00:00.000Z",
    "platform_settings": {},
    "items": [
      {
        "id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
        "generated_media_item_id": "d3d94468-02a4-4c5e-b6f7-0a1b2c3d4e40",
        "position": 1,
        "use_voice_converted": true
      }
    ],
    "deliveries": [
      {
        "id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
        "connected_account_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
        "platform": "instagram",
        "username": "string",
        "status": "pending",
        "platform_post_id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
        "error_message": "string",
        "published_at": "2026-09-30T17:00:00.000Z"
      }
    ],
    "created_at": "2026-09-30T17:00:00.000Z",
    "updated_at": "2026-09-30T17:00:00.000Z"
  }
}

Update outgoing post

PATCH/v1/publishing/posts/{id}

Bearer token

Update caption, platform settings, or other mutable fields on a draft post.

Path parameters

  • idstringrequired

Request body application/json

  • captionstring
  • platform_settingsobject

Response 200

Post updated Fields below are inside data.

  • idstringuuid
  • persona_idstring | nulluuid
  • captionstring | null
  • statusstring

    One ofdraftscheduledpublishingpublishedfailedcancelled

  • scheduled_forstring | nulldate-time
  • platform_settingsobject | null
  • itemsarray of object
    4 item attributes
    • idstringuuid
    • generated_media_item_idstringuuid
    • positioninteger
    • use_voice_convertedboolean
  • deliveriesarray of object

    One delivery per target publishing account. Check all deliveries to determine overall publish outcome.

    8 item attributes
    • idstringuuid
    • connected_account_idstringuuid
    • platformstring

      One ofinstagramtiktok

    • usernamestring
    • statusstring

      Terminal states: `published` (success) and `failed` (permanent error). Poll until terminal.

      One ofpendingpublishingpublishedfailed

    • platform_post_idstring | null

      Platform-assigned post ID after successful publish

    • error_messagestring | null

      Error detail when status is `failed`

    • published_atstring | nulldate-time
  • created_atstringdate-time
  • updated_atstringdate-time
curl -X PATCH "https://reelmirror.com/api/v1/publishing/posts/$ID" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
Response 200 (example)
{
  "data": {
    "id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
    "persona_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
    "caption": "string",
    "status": "draft",
    "scheduled_for": "2026-09-30T17:00:00.000Z",
    "platform_settings": {},
    "items": [
      {
        "id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
        "generated_media_item_id": "d3d94468-02a4-4c5e-b6f7-0a1b2c3d4e40",
        "position": 1,
        "use_voice_converted": true
      }
    ],
    "deliveries": [
      {
        "id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
        "connected_account_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20",
        "platform": "instagram",
        "username": "string",
        "status": "pending",
        "platform_post_id": "45c48cce-2e2d-4fbd-8a1c-5e6f7a8b9c30",
        "error_message": "string",
        "published_at": "2026-09-30T17:00:00.000Z"
      }
    ],
    "created_at": "2026-09-30T17:00:00.000Z",
    "updated_at": "2026-09-30T17:00:00.000Z"
  }
}

Delete outgoing post

DELETE/v1/publishing/posts/{id}

Bearer token

Path parameters

  • idstringrequired

Response 200

Post deleted Fields below are inside data.

  • idstring
  • deletedboolean

    One oftrue

curl -X DELETE "https://reelmirror.com/api/v1/publishing/posts/$ID" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY"
Response 200 (example)
{
  "data": {
    "id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
    "deleted": true
  }
}

Publish now

POST/v1/publishing/posts/{id}/publish

Bearer token

Immediately publish an outgoing post to all configured accounts.

Path parameters

  • idstringrequired

Response 200

Publishing started Fields below are inside data.

  • statusstring
curl -X POST "https://reelmirror.com/api/v1/publishing/posts/$ID/publish" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY"
Response 200 (example)
{
  "data": {
    "status": "publishing"
  }
}

Schedule post

POST/v1/publishing/posts/{id}/schedule

Bearer token

Schedule an outgoing post for a future time.

Path parameters

  • idstringrequired

Request body application/json

  • scheduled_forstringrequireddate-time

    ISO 8601 datetime to publish at

  • timezonestringdefault "UTC"

    IANA timezone name (e.g. America/New_York)

Response 200

Post scheduled Fields below are inside data.

  • statusstring
curl -X POST "https://reelmirror.com/api/v1/publishing/posts/$ID/schedule" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "scheduled_for": "2026-09-30T17:00:00.000Z"
}'
Response 200 (example)
{
  "data": {
    "status": "scheduled"
  }
}

Retry publish

POST/v1/publishing/posts/{id}/retry

Bearer token

Retry publishing a post that previously failed.

Path parameters

  • idstringrequired

Response 200

Retry started Fields below are inside data.

  • statusstring
curl -X POST "https://reelmirror.com/api/v1/publishing/posts/$ID/retry" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY"
Response 200 (example)
{
  "data": {
    "status": "publishing"
  }
}

Cancel scheduled post

POST/v1/publishing/posts/{id}/cancel

Bearer token

Cancel a scheduled outgoing post before it is published.

Path parameters

  • idstringrequired

Response 200

Post cancelled Fields below are inside data.

  • statusstring
curl -X POST "https://reelmirror.com/api/v1/publishing/posts/$ID/cancel" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY"
Response 200 (example)
{
  "data": {
    "status": "cancelled"
  }
}

Generate caption

POST/v1/publishing/caption

Bearer token

AI-generate a publishing caption from one or more generated media items, matching the persona's writing style.

Request body application/json

  • generated_media_item_idsarray of stringrequired
  • persona_idstringuuid

Response 200

Generated caption Fields below are inside data.

  • captionstring
curl -X POST "https://reelmirror.com/api/v1/publishing/caption" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "generated_media_item_ids": [
    "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10"
  ]
}'
Response 200 (example)
{
  "data": {
    "caption": "string"
  }
}