> ## Documentation Index
> Fetch the complete documentation index at: https://help.opus.pro/llms.txt
> Use this file to discover all available pages before exploring further.

# Social Posting

> Connect social accounts, generate social copy, publish clips instantly, or schedule them for later.

### Introduction

The social posting APIs let you take an Opus clip that already exists and distribute it to connected channels without leaving your workflow.

### Workflow

Use the following workflow when you want to turn completed clips into social posts.

<Steps>
  <Step title="Step 1: Get Social Accounts">
    Call [<u>Get Social Accounts</u>](/api-reference/endpoints/social-posting/get-social-accounts) first so you know which connected destinations are available and which `postAccountId` and `subAccountId` values to use later.

    ```bash theme={"dark"}
    curl --request GET \
    --url 'https://api.opus.pro/api/social-accounts?q=mine' \
    --header 'Authorization: Bearer <API_KEY>'
    ```
  </Step>

  <Step title="Step 2: Create a Project">
    Submit your source video with [<u>Create a New Project</u>](/api-reference/endpoints/create-project). This starts the normal Opus clipping workflow and returns a `projectId`.
  </Step>

  <Step title="Step 3: Wait for Project Completion">
    Wait for the project-completed callback from OpusClip, or otherwise confirm the project has finished processing before you try to fetch exportable clips.
  </Step>

  <Step title="Step 4: Fetch Clips">
    After the project is complete, call [<u>Get Clips</u>](/api-reference/endpoints/get-clips) to retrieve the clips created for that `projectId`.

    ```bash theme={"dark"}
    curl --request GET \
    --url 'https://api.opus.pro/api/exportable-clips?q=findByProjectId&projectId=<PROJECT_ID>' \
    --header 'Authorization: Bearer <API_KEY>' \
    --header 'x-opus-org-id: <ORG_ID>'
    ```

    <Warning>
      The `id` field in the response is a composite `{projectId}.{clipId}` (e.g. `P0000000demo.CUexample1`). The social-posting endpoints in the following steps expect the **bare** `clipId` (e.g. `CUexample1`) — strip everything up to and including the dot before passing it to `POST /api/social-copy-jobs`, `POST /api/post-tasks`, or `POST /api/publish-schedules`. Use the `curationId` field if you prefer not to parse the `id`.
    </Warning>
  </Step>

  <Step title="Step 5: Generate Social Copy">
    For each clip and each selected social destination, call [<u>Create a Social Copy Generation Job</u>](/api-reference/endpoints/social-posting/create-social-copy-job), then poll [<u>Get Social Copy Generation Result</u>](/api-reference/endpoints/social-posting/get-social-copy-job) until the job status is `COMPLETED`.
  </Step>

  <Step title="Step 6: Publish or Schedule">
    If the post should go out immediately, call [<u>Publish a Post Instantly</u>](/api-reference/endpoints/social-posting/publish-post). If it should go out later, call [<u>Schedule a Post</u>](/api-reference/endpoints/social-posting/schedule-post) with a future UTC timestamp.
  </Step>

  <Step title="Step 7: Cancel a Scheduled Post">
    If a scheduled post needs to be withdrawn before publish time, call [<u>Cancel a Scheduled Post</u>](/api-reference/endpoints/social-posting/cancel-scheduled-post) with the `scheduleId` returned by the scheduling call.
  </Step>
</Steps>

### Supported Platforms

Connected accounts may report one of these platform values:

* `YOUTUBE`: YouTube channel
* `TIKTOK_BUSINESS`: TikTok account
* `FACEBOOK_PAGE`: Facebook account
* `INSTAGRAM_BUSINESS`: Instagram account
* `LINKEDIN`: LinkedIn account
* `TWITTER`: X (formerly Twitter) account

### Rate Limits

* `GET /api/social-accounts`: `10 req/s`
* `POST /api/social-copy-jobs`: `1 req/s`
* `GET /api/social-copy-jobs/{jobId}`: `10 req/s`
* `POST /api/post-tasks`: `1 req/s`
* `POST /api/publish-schedules`: `1 req/s`
* `DELETE /api/publish-schedules/{scheduleId}`: `1 req/s`

### Credit Consumption for X

When posting clips to `X`, each post consumes `1` credit.

This applies to:

* instant publishing with `POST /api/post-tasks`
* scheduled publishing with `POST /api/publish-schedules`

### Endpoints

<CardGroup cols={2}>
  <Card title="Get Social Accounts" icon="code" href="/api-reference/endpoints/social-posting/get-social-accounts">
    List the connected social destinations available for posting.
  </Card>

  <Card title="Create Social Copy Job" icon="code" href="/api-reference/endpoints/social-posting/create-social-copy-job">
    Generate post copy for a clip with optional tone guidance.
  </Card>

  <Card title="Get Social Copy Result" icon="code" href="/api-reference/endpoints/social-posting/get-social-copy-job">
    Poll a social copy job until the generated content is ready.
  </Card>

  <Card title="Publish Instantly" icon="code" href="/api-reference/endpoints/social-posting/publish-post">
    Publish a clip immediately to a connected social account.
  </Card>

  <Card title="Schedule a Post" icon="code" href="/api-reference/endpoints/social-posting/schedule-post">
    Queue a clip for future publishing with a UTC timestamp.
  </Card>

  <Card title="Cancel a Scheduled Post" icon="code" href="/api-reference/endpoints/social-posting/cancel-scheduled-post">
    Cancel an existing scheduled publish task.
  </Card>
</CardGroup>
