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

# Schedule Clips

> Schedule completed clips for future publishing to social media

> **For AI agents:** a documentation index is at [/llms.txt](/llms.txt). Every page is also available as markdown, just append `.md` to the URL.

## Overview

Schedule one or more completed clips for publishing at a future date. Clips are published sequentially with a configurable interval between each. Use this for batch publishing workflows where you want to space out content over time.

## Rate Limiting

This endpoint is rate limited to 10 requests per minute per API key.

<Note>
  * Schedule date must be at least 50 minutes in the future and within 12 months
  * Interval between clips must be at least 5 minutes (300 seconds)
  * Maximum 50 clips per request
  * Each clip is scheduled at `scheduleDate + (index * intervalSeconds)`
  * Partial success is possible: some clips may fail validation while others are scheduled successfully
  * Only completed clips can be scheduled
  * Clips from a cancelled project are returned in the `failed` array (not scheduled) with the error `The project for this clip was cancelled.`
</Note>

## Response

<ResponseField name="posts" type="array">
  Array of successfully scheduled post objects

  <Expandable title="AutomationPost Object">
    <ResponseField name="id" type="string">
      Unique post identifier
    </ResponseField>

    <ResponseField name="projectId" type="string">
      ID of the parent project
    </ResponseField>

    <ResponseField name="clipId" type="string">
      ID of the scheduled clip
    </ResponseField>

    <ResponseField name="platforms" type="array">
      Array of target platform names
    </ResponseField>

    <ResponseField name="successPlatforms" type="array">
      Platforms where publishing succeeded (empty until published)
    </ResponseField>

    <ResponseField name="failedPlatforms" type="array">
      Platforms where publishing failed (empty until published)
    </ResponseField>

    <ResponseField name="integrations" type="array">
      Array of integration IDs used for publishing
    </ResponseField>

    <ResponseField name="title" type="string">
      Post title
    </ResponseField>

    <ResponseField name="description" type="string">
      Post description
    </ResponseField>

    <ResponseField name="tags" type="array">
      Array of tags applied to the post
    </ResponseField>

    <ResponseField name="status" type="string">
      Post status (will be `scheduled` for newly created scheduled posts)
    </ResponseField>

    <ResponseField name="scheduleType" type="string">
      Always `scheduled` for this endpoint
    </ResponseField>

    <ResponseField name="scheduleDate" type="integer">
      Scheduled publish date as Unix timestamp
    </ResponseField>

    <ResponseField name="publishDate" type="integer">
      Actual publish date (null until published)
    </ResponseField>

    <ResponseField name="urls" type="object">
      Published URLs per platform (populated after publishing)
    </ResponseField>

    <ResponseField name="platformSettings" type="object">
      Per-platform configuration

      <Expandable title="Platform Settings">
        <ResponseField name="youtube" type="object">
          YouTube-specific settings

          <Expandable title="YouTube Settings">
            <ResponseField name="privacy" type="string">
              Video privacy: `public`, `private`, or `unlisted`
            </ResponseField>

            <ResponseField name="embeddable" type="boolean">
              Whether the video can be embedded on other sites
            </ResponseField>

            <ResponseField name="publicStats" type="boolean">
              Whether view counts are publicly visible
            </ResponseField>

            <ResponseField name="madeForKids" type="boolean">
              Whether the video is made for kids (COPPA compliance)
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="tiktok" type="object">
          TikTok-specific settings

          <Expandable title="TikTok Settings">
            <ResponseField name="privacy" type="string">
              Video privacy: `public`, `friends`, or `private`
            </ResponseField>

            <ResponseField name="disableComments" type="boolean">
              Disable comments on the video
            </ResponseField>

            <ResponseField name="disableDuet" type="boolean">
              Disable duets for the video
            </ResponseField>

            <ResponseField name="disableStitch" type="boolean">
              Disable stitches for the video
            </ResponseField>

            <ResponseField name="brandContent" type="boolean">
              Mark as paid partnership / brand content
            </ResponseField>

            <ResponseField name="brandOrganic" type="boolean">
              Mark as organic brand content
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="instagram" type="object">
          Instagram-specific settings

          <Expandable title="Instagram Settings">
            <ResponseField name="shareToFeed" type="boolean">
              Whether to share Reels to the main feed
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="linkedin" type="object">
          LinkedIn-specific settings

          <Expandable title="LinkedIn Settings">
            <ResponseField name="privacy" type="string">
              Post visibility: `public` or `connections`
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="createdAt" type="integer">
      Unix timestamp when the post was created
    </ResponseField>

    <ResponseField name="updatedAt" type="integer">
      Unix timestamp when the post was last updated
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="failed" type="array">
  Array of clips that failed validation

  <Expandable title="Failed Clip Object">
    <ResponseField name="clipId" type="string">
      ID of the clip that failed
    </ResponseField>

    <ResponseField name="index" type="integer">
      Index of the clip in the input array
    </ResponseField>

    <ResponseField name="error" type="string">
      Reason the clip failed validation
    </ResponseField>
  </Expandable>
</ResponseField>

## Example Request

<CodeGroup>
  ```bash cURL theme={"system"}
  curl -X POST "https://public.reap.video/api/v1/automation/schedule-clips" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "clips": [
        {
          "projectId": "65f1a2b3c4d5e6f7a8b9c0d2",
          "clipId": "65f1a2b3c4d5e6f7a8b9c0d4",
          "title": "The Future of AI - Part 1",
          "description": "First in our AI series",
          "tags": ["ai", "technology"]
        },
        {
          "projectId": "65f1a2b3c4d5e6f7a8b9c0d2",
          "clipId": "65f1a2b3c4d5e6f7a8b9c0d5",
          "title": "The Future of AI - Part 2",
          "description": "Second in our AI series",
          "tags": ["ai", "technology"]
        }
      ],
      "integrations": ["66a1b2c3d4e5f6a7b8c9d0e1"],
      "scheduleDate": 1710100000,
      "intervalSeconds": 600,
      "platformSettings": {
        "youtube": {
          "privacy": "public",
          "madeForKids": false
        }
      }
    }'
  ```

  ```javascript JavaScript theme={"system"}
  const response = await fetch('https://public.reap.video/api/v1/automation/schedule-clips', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      clips: [
        {
          projectId: '65f1a2b3c4d5e6f7a8b9c0d2',
          clipId: '65f1a2b3c4d5e6f7a8b9c0d4',
          title: 'The Future of AI - Part 1',
          description: 'First in our AI series',
          tags: ['ai', 'technology']
        },
        {
          projectId: '65f1a2b3c4d5e6f7a8b9c0d2',
          clipId: '65f1a2b3c4d5e6f7a8b9c0d5',
          title: 'The Future of AI - Part 2',
          description: 'Second in our AI series',
          tags: ['ai', 'technology']
        }
      ],
      integrations: ['66a1b2c3d4e5f6a7b8c9d0e1'],
      scheduleDate: 1710100000,
      intervalSeconds: 600,
      platformSettings: {
        youtube: { privacy: 'public', madeForKids: false }
      }
    })
  });

  const data = await response.json();
  console.log(`Scheduled: ${data.posts.length}, Failed: ${data.failed.length}`);
  ```

  ```python Python theme={"system"}
  import requests

  headers = {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
  }

  data = {
      'clips': [
          {
              'projectId': '65f1a2b3c4d5e6f7a8b9c0d2',
              'clipId': '65f1a2b3c4d5e6f7a8b9c0d4',
              'title': 'The Future of AI - Part 1',
              'description': 'First in our AI series',
              'tags': ['ai', 'technology']
          },
          {
              'projectId': '65f1a2b3c4d5e6f7a8b9c0d2',
              'clipId': '65f1a2b3c4d5e6f7a8b9c0d5',
              'title': 'The Future of AI - Part 2',
              'description': 'Second in our AI series',
              'tags': ['ai', 'technology']
          }
      ],
      'integrations': ['66a1b2c3d4e5f6a7b8c9d0e1'],
      'scheduleDate': 1710100000,
      'intervalSeconds': 600,
      'platformSettings': {
          'youtube': {'privacy': 'public', 'madeForKids': False}
      }
  }

  response = requests.post(
      'https://public.reap.video/api/v1/automation/schedule-clips',
      headers=headers,
      json=data
  )

  result = response.json()
  print(f"Scheduled: {len(result['posts'])}, Failed: {len(result['failed'])}")
  ```

  ```php PHP theme={"system"}
  <?php
  $data = [
      'clips' => [
          [
              'projectId' => '65f1a2b3c4d5e6f7a8b9c0d2',
              'clipId' => '65f1a2b3c4d5e6f7a8b9c0d4',
              'title' => 'The Future of AI - Part 1',
              'description' => 'First in our AI series',
              'tags' => ['ai', 'technology']
          ],
          [
              'projectId' => '65f1a2b3c4d5e6f7a8b9c0d2',
              'clipId' => '65f1a2b3c4d5e6f7a8b9c0d5',
              'title' => 'The Future of AI - Part 2',
              'description' => 'Second in our AI series',
              'tags' => ['ai', 'technology']
          ]
      ],
      'integrations' => ['66a1b2c3d4e5f6a7b8c9d0e1'],
      'scheduleDate' => 1710100000,
      'intervalSeconds' => 600,
      'platformSettings' => [
          'youtube' => ['privacy' => 'public', 'madeForKids' => false]
      ]
  ];

  $ch = curl_init('https://public.reap.video/api/v1/automation/schedule-clips');
  curl_setopt($ch, CURLOPT_POST, true);
  curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      'Authorization: Bearer YOUR_API_KEY',
      'Content-Type: application/json'
  ]);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($ch);
  curl_close($ch);
  $result = json_decode($response, true);
  echo 'Scheduled: ' . count($result['posts']) . ', Failed: ' . count($result['failed']) . "\n";
  ?>
  ```

  ```go Go theme={"system"}
  package main
  import (
      "bytes"
      "encoding/json"
      "fmt"
      "io/ioutil"
      "net/http"
  )
  func main() {
      data := map[string]interface{}{
          "clips": []map[string]interface{}{
              {
                  "projectId":   "65f1a2b3c4d5e6f7a8b9c0d2",
                  "clipId":      "65f1a2b3c4d5e6f7a8b9c0d4",
                  "title":       "The Future of AI - Part 1",
                  "description": "First in our AI series",
                  "tags":        []string{"ai", "technology"},
              },
              {
                  "projectId":   "65f1a2b3c4d5e6f7a8b9c0d2",
                  "clipId":      "65f1a2b3c4d5e6f7a8b9c0d5",
                  "title":       "The Future of AI - Part 2",
                  "description": "Second in our AI series",
                  "tags":        []string{"ai", "technology"},
              },
          },
          "integrations":   []string{"66a1b2c3d4e5f6a7b8c9d0e1"},
          "scheduleDate":   1710100000,
          "intervalSeconds": 600,
          "platformSettings": map[string]interface{}{
              "youtube": map[string]interface{}{
                  "privacy": "public", "madeForKids": false,
              },
          },
      }
      jsonData, _ := json.Marshal(data)
      req, _ := http.NewRequest("POST", "https://public.reap.video/api/v1/automation/schedule-clips", bytes.NewBuffer(jsonData))
      req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
      req.Header.Set("Content-Type", "application/json")
      client := &http.Client{}
      resp, _ := client.Do(req)
      defer resp.Body.Close()
      body, _ := ioutil.ReadAll(resp.Body)
      fmt.Println(string(body))
  }
  ```

  ```java Java theme={"system"}
  import java.io.*;
  import java.net.HttpURLConnection;
  import java.net.URL;
  public class ScheduleClipsExample {
      public static void main(String[] args) throws Exception {
          URL url = new URL("https://public.reap.video/api/v1/automation/schedule-clips");
          HttpURLConnection conn = (HttpURLConnection) url.openConnection();
          conn.setRequestMethod("POST");
          conn.setRequestProperty("Authorization", "Bearer YOUR_API_KEY");
          conn.setRequestProperty("Content-Type", "application/json");
          conn.setDoOutput(true);
          String jsonBody = """
              {
                "clips": [
                  {
                    "projectId": "65f1a2b3c4d5e6f7a8b9c0d2",
                    "clipId": "65f1a2b3c4d5e6f7a8b9c0d4",
                    "title": "The Future of AI - Part 1",
                    "description": "First in our AI series",
                    "tags": ["ai", "technology"]
                  },
                  {
                    "projectId": "65f1a2b3c4d5e6f7a8b9c0d2",
                    "clipId": "65f1a2b3c4d5e6f7a8b9c0d5",
                    "title": "The Future of AI - Part 2",
                    "description": "Second in our AI series",
                    "tags": ["ai", "technology"]
                  }
                ],
                "integrations": ["66a1b2c3d4e5f6a7b8c9d0e1"],
                "scheduleDate": 1710100000,
                "intervalSeconds": 600,
                "platformSettings": {
                  "youtube": { "privacy": "public", "madeForKids": false }
                }
              }""";
          try (OutputStream os = conn.getOutputStream()) {
              os.write(jsonBody.getBytes("utf-8"));
          }
          BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream(), "utf-8"));
          StringBuilder response = new StringBuilder();
          String responseLine;
          while ((responseLine = br.readLine()) != null) {
              response.append(responseLine.trim());
          }
          System.out.println(response.toString());
      }
  }
  ```
</CodeGroup>

## Example Response

<CodeGroup>
  <CodeGroup.Tab label="200 OK">
    ```json theme={"system"}
    {
      "posts": [
        {
          "id": "67b1c2d3e4f5a6b7c8d9e0f1",
          "projectId": "65f1a2b3c4d5e6f7a8b9c0d2",
          "clipId": "65f1a2b3c4d5e6f7a8b9c0d4",
          "platforms": ["youtube"],
          "successPlatforms": [],
          "failedPlatforms": [],
          "integrations": ["66a1b2c3d4e5f6a7b8c9d0e1"],
          "title": "The Future of AI - Part 1",
          "description": "First in our AI series",
          "tags": ["ai", "technology"],
          "status": "scheduled",
          "scheduleType": "scheduled",
          "scheduleDate": 1710100000,
          "publishDate": null,
          "urls": {},
          "platformSettings": {
            "youtube": { "privacy": "public", "madeForKids": false }
          },
          "createdAt": 1710000000,
          "updatedAt": 1710000000
        },
        {
          "id": "67b1c2d3e4f5a6b7c8d9e0f2",
          "projectId": "65f1a2b3c4d5e6f7a8b9c0d2",
          "clipId": "65f1a2b3c4d5e6f7a8b9c0d5",
          "platforms": ["youtube"],
          "successPlatforms": [],
          "failedPlatforms": [],
          "integrations": ["66a1b2c3d4e5f6a7b8c9d0e1"],
          "title": "The Future of AI - Part 2",
          "description": "Second in our AI series",
          "tags": ["ai", "technology"],
          "status": "scheduled",
          "scheduleType": "scheduled",
          "scheduleDate": 1710100600,
          "publishDate": null,
          "urls": {},
          "platformSettings": {
            "youtube": { "privacy": "public", "madeForKids": false }
          },
          "createdAt": 1710000000,
          "updatedAt": 1710000000
        }
      ],
      "failed": []
    }
    ```
  </CodeGroup.Tab>

  <CodeGroup.Tab label="200 Partial Success">
    ```json theme={"system"}
    {
      "posts": [
        {
          "id": "67b1c2d3e4f5a6b7c8d9e0f1",
          "projectId": "65f1a2b3c4d5e6f7a8b9c0d2",
          "clipId": "65f1a2b3c4d5e6f7a8b9c0d4",
          "platforms": ["youtube"],
          "successPlatforms": [],
          "failedPlatforms": [],
          "integrations": ["66a1b2c3d4e5f6a7b8c9d0e1"],
          "title": "The Future of AI - Part 1",
          "description": "First in our AI series",
          "tags": ["ai", "technology"],
          "status": "scheduled",
          "scheduleType": "scheduled",
          "scheduleDate": 1710100000,
          "publishDate": null,
          "urls": {},
          "platformSettings": {},
          "createdAt": 1710000000,
          "updatedAt": 1710000000
        }
      ],
      "failed": [
        {
          "clipId": "65f1a2b3c4d5e6f7a8b9c0d5",
          "index": 1,
          "error": "Clip is not completed"
        },
        {
          "clipId": "65f1a2b3c4d5e6f7a8b9c0d6",
          "index": 2,
          "error": "The project for this clip was cancelled."
        }
      ]
    }
    ```
  </CodeGroup.Tab>

  <CodeGroup.Tab label="400 Bad Request">
    ```json theme={"system"}
    {
      "detail": "Schedule date must be at least 50 minutes in the future"
    }
    ```
  </CodeGroup.Tab>

  <CodeGroup.Tab label="400 Too Many Clips">
    ```json theme={"system"}
    {
      "detail": "Maximum 50 clips per request"
    }
    ```
  </CodeGroup.Tab>

  <CodeGroup.Tab label="400 Invalid Interval">
    ```json theme={"system"}
    {
      "detail": "Interval must be at least 300 seconds (5 minutes)"
    }
    ```
  </CodeGroup.Tab>

  <CodeGroup.Tab label="401 Unauthorized">
    ```json theme={"system"}
    {
      "detail": "Unauthorized - Invalid or missing API key"
    }
    ```
  </CodeGroup.Tab>

  <CodeGroup.Tab label="429 Too Many Requests">
    ```json theme={"system"}
    {
      "detail": "Too Many Requests - Rate limit of 10 requests per minute exceeded"
    }
    ```
  </CodeGroup.Tab>
</CodeGroup>


## OpenAPI

````yaml POST /automation/schedule-clips
openapi: 3.1.0
info:
  title: Reap Automation API
  description: AI-powered video processing automation API
  version: 1.0.0
servers:
  - url: https://public.reap.video/api/v1
security:
  - bearerAuth: []
paths:
  /automation/schedule-clips:
    post:
      summary: Schedule Clips
      description: Schedule one or more clips for future publishing
      operationId: scheduleClips
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScheduleClipsRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleClipsResponse'
components:
  schemas:
    ScheduleClipsRequest:
      type: object
      required:
        - clips
        - integrations
        - scheduleDate
      properties:
        clips:
          type: array
          items:
            $ref: '#/components/schemas/ScheduleClipItem'
          description: List of clips to schedule (1-50)
        integrations:
          type: array
          items:
            type: string
          description: List of integration IDs
        scheduleDate:
          type: integer
          description: Unix timestamp for the first clip (min 50 min in future)
        intervalSeconds:
          type: integer
          default: 300
          description: Seconds between each clip (min 300)
        platformSettings:
          $ref: '#/components/schemas/PlatformSettings'
          nullable: true
          description: Per-platform publishing settings
    ScheduleClipsResponse:
      type: object
      properties:
        posts:
          type: array
          items:
            $ref: '#/components/schemas/AutomationPost'
        failed:
          type: array
          items:
            $ref: '#/components/schemas/ScheduleFailedItem'
    ScheduleClipItem:
      type: object
      required:
        - projectId
        - clipId
      properties:
        projectId:
          type: string
          description: ID of the project
        clipId:
          type: string
          description: ID of the clip
        title:
          type: string
          nullable: true
          description: Override title for this clip
        description:
          type: string
          nullable: true
          description: Override description
        tags:
          type: array
          items:
            type: string
          nullable: true
          description: Override tags
    PlatformSettings:
      type: object
      properties:
        youtube:
          $ref: '#/components/schemas/YouTubeSettings'
          nullable: true
        tiktok:
          $ref: '#/components/schemas/TikTokSettings'
          nullable: true
        instagram:
          $ref: '#/components/schemas/InstagramSettings'
          nullable: true
        linkedin:
          $ref: '#/components/schemas/LinkedInSettings'
          nullable: true
    AutomationPost:
      type: object
      properties:
        id:
          type: string
        projectId:
          type: string
          nullable: true
        clipId:
          type: string
          nullable: true
        platforms:
          type: array
          items:
            type: string
        successPlatforms:
          type: array
          items:
            type: string
        failedPlatforms:
          type: array
          items:
            type: string
        integrations:
          type: array
          items:
            type: string
        title:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        tags:
          type: array
          items:
            type: string
          nullable: true
        status:
          type: string
          enum:
            - processing
            - draft
            - completed
            - failed
            - cancelled
            - unresolved
        scheduleType:
          type: string
          enum:
            - scheduled
            - immediate
        scheduleDate:
          type: integer
        publishDate:
          type: integer
        urls:
          type: object
          description: Social media URLs keyed by integration ID
        platformSettings:
          $ref: '#/components/schemas/PlatformSettings'
        createdAt:
          type: integer
        updatedAt:
          type: integer
    ScheduleFailedItem:
      type: object
      properties:
        clipId:
          type: string
        index:
          type: integer
        error:
          type: string
    YouTubeSettings:
      type: object
      properties:
        privacy:
          type: string
          enum:
            - public
            - unlisted
            - private
          default: public
          description: YouTube video privacy
        embeddable:
          type: boolean
          default: true
          description: Allow embedding
        publicStats:
          type: boolean
          default: true
          description: Show public statistics
        madeForKids:
          type: boolean
          default: false
          description: Mark as made for kids
    TikTokSettings:
      type: object
      properties:
        privacy:
          type: string
          enum:
            - public
            - unlisted
            - followers
            - friends
            - private
          default: public
          description: TikTok video privacy
        disableComments:
          type: boolean
          default: false
        disableDuet:
          type: boolean
          default: false
        disableStitch:
          type: boolean
          default: false
        brandContent:
          type: boolean
          default: false
        brandOrganic:
          type: boolean
          default: false
    InstagramSettings:
      type: object
      properties:
        shareToFeed:
          type: boolean
          default: false
          description: Share reel to Instagram feed
    LinkedInSettings:
      type: object
      properties:
        privacy:
          type: string
          enum:
            - public
            - connections
            - logged_in
          default: public
          description: LinkedIn post visibility
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````