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

# Social Content Draft Queue

> Review, approve, schedule, and manage AI-generated Professor High social media content through the draft queue API.

## Overview

The Draft Queue is where all AI-generated social content lands after the [Social Content Pipeline](/help/features/social-content-pipeline) runs. Every piece of content starts as a draft and moves through a review lifecycle before it gets published. Nothing goes live without manual approval.

The queue is managed entirely through API endpoints -- giving you full control over the review, approval, scheduling, and publishing workflow.

## Draft Lifecycle

Every draft moves through a defined set of statuses:

```
generating --> draft --> reviewed --> approved --> scheduled --> posted
                  \                       \
                   --> rejected             --> failed
```

| Status       | Description                                                                |
| ------------ | -------------------------------------------------------------------------- |
| `generating` | Pipeline is actively creating this content (text, images in progress)      |
| `draft`      | Generation complete. Ready for initial review.                             |
| `reviewed`   | Has been looked at and has review notes, but not yet approved or rejected. |
| `approved`   | Content is approved and ready to publish or schedule.                      |
| `scheduled`  | Approved with a specific `scheduled_at` timestamp for future posting.      |
| `posted`     | Content has been published to the target platform.                         |
| `rejected`   | Content was rejected during review with a `rejection_reason`.              |
| `failed`     | Pipeline encountered an error during generation.                           |

## API Endpoints

### List Drafts

Retrieve drafts with optional filters for status, platform, content type, and pagination.

```bash theme={null}
GET /api/v1/social/drafts?status=draft&platform=tiktok&limit=50
```

**Query Parameters:**

| Parameter  | Type   | Default | Description                                                            |
| ---------- | ------ | ------- | ---------------------------------------------------------------------- |
| `status`   | string | `draft` | Filter by lifecycle status                                             |
| `platform` | string | --      | Filter by platform (`tiktok`, `instagram`, `x`, `youtube`, `linkedin`) |
| `limit`    | number | 50      | Max results per page (1-200)                                           |

**Response:**

```json theme={null}
{
  "data": {
    "drafts": [
      {
        "id": "uuid",
        "platform": "instagram",
        "contentType": "strain-breakdown",
        "status": "draft",
        "sourceSlug": "blue-dream",
        "text": "Professor High here with a deep dive into Blue Dream...",
        "hashtags": ["#BlueDream", "#CannabisTerpenes", "#ProfessorHigh"],
        "imageUrls": ["https://..."],
        "metadata": { "slideCount": 5, "characterCount": 2100 },
        "createdAt": "2026-04-11T18:00:00Z",
        "scheduledAt": null,
        "reviewNotes": null
      }
    ],
    "total": 142,
    "limit": 50,
    "offset": 0
  }
}
```

### Get Single Draft

Retrieve the full details of a single draft including all images and metadata.

```bash theme={null}
GET /api/v1/social/drafts/:id
```

### Update Draft Status

Move a draft through the lifecycle. Include optional review notes, rejection reason, or scheduled timestamp.

```bash theme={null}
PATCH /api/v1/social/drafts/:id/status
```

**Request Body:**

```json theme={null}
{
  "status": "approved",
  "review_notes": "Good to go. Minor tweak to hashtags needed.",
  "scheduled_at": "2026-04-14T14:00:00Z"
}
```

| Field              | Type              | Required | Description                                                               |
| ------------------ | ----------------- | -------- | ------------------------------------------------------------------------- |
| `status`           | string            | Yes      | Target status (`reviewed`, `approved`, `rejected`, `scheduled`, `posted`) |
| `review_notes`     | string            | No       | Notes from the reviewer                                                   |
| `rejection_reason` | string            | No       | Required when status is `rejected`                                        |
| `scheduled_at`     | string (ISO 8601) | No       | Publishing timestamp. Sets status to `scheduled` automatically.           |

### Bulk Approve

Approve multiple drafts at once. Useful after batch review sessions.

```bash theme={null}
POST /api/v1/social/drafts/bulk-approve
```

**Request Body:**

```json theme={null}
{
  "ids": [
    "550e8400-e29b-41d4-a716-446655440000",
    "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
  ]
}
```

### Content Stats

Get aggregate statistics about the draft queue and content generation.

```bash theme={null}
GET /api/v1/social/stats
```

**Response:**

```json theme={null}
{
  "data": {
    "byStatus": {
      "draft": 23,
      "reviewed": 8,
      "approved": 12,
      "scheduled": 35,
      "posted": 142,
      "rejected": 5,
      "failed": 2
    },
    "byPlatform": {
      "instagram": 85,
      "x": 62,
      "tiktok": 41,
      "youtube": 22,
      "linkedin": 17
    },
    "byContentType": {
      "strain-breakdown": 68,
      "science-explainer": 45,
      "myth-bust": 34,
      "carousel": 28,
      "thread": 22,
      "other": 30
    },
    "thisWeek": {
      "generated": 35,
      "approved": 28,
      "posted": 21
    }
  }
}
```

## Database Schema

The `social_content_drafts` table in Supabase stores all generated content:

| Column             | Type        | Description                                                                                                 |
| ------------------ | ----------- | ----------------------------------------------------------------------------------------------------------- |
| `id`               | uuid        | Primary key                                                                                                 |
| `platform`         | text        | Target platform (`tiktok`, `instagram`, `x`, `youtube`, `linkedin`)                                         |
| `content_type`     | text        | Content category (`strain-breakdown`, `myth-bust`, etc.)                                                    |
| `content_pillar`   | text        | Strategy pillar (`strain-intel`, `science-drops`, `myth-busting`, `lifestyle`, `app-features`, `community`) |
| `status`           | text        | Lifecycle status (see lifecycle above)                                                                      |
| `source_type`      | text        | Source data type (`strain`, `blog`, `terpene`, `general`)                                                   |
| `source_slug`      | text        | Slug of the source strain, blog post, or terpene                                                            |
| `text`             | text        | Generated post text / thread content                                                                        |
| `hashtags`         | text\[]     | Array of hashtag strings                                                                                    |
| `image_urls`       | text\[]     | Array of Supabase Storage URLs for generated images                                                         |
| `metadata`         | jsonb       | Platform-specific metadata (slide count, character count, thread length, etc.)                              |
| `ai_model_text`    | text        | Model used for text generation (e.g., `claude-sonnet`)                                                      |
| `ai_model_image`   | text        | Model used for image generation (e.g., `gemini`)                                                            |
| `review_notes`     | text        | Reviewer notes                                                                                              |
| `rejection_reason` | text        | Reason for rejection (if rejected)                                                                          |
| `scheduled_at`     | timestamptz | Planned publish time                                                                                        |
| `posted_at`        | timestamptz | Actual publish time                                                                                         |
| `trigger_run_id`   | text        | Trigger.dev run ID for traceability                                                                         |
| `created_at`       | timestamptz | When the draft was created                                                                                  |
| `updated_at`       | timestamptz | Last modification time                                                                                      |

## Storage

Generated images are stored in the `social-content` Supabase Storage bucket:

| Path Pattern                            | Content                   |
| --------------------------------------- | ------------------------- |
| `{draft_id}/image_{index}.png`          | Standard post images      |
| `{draft_id}/carousel/slide_{index}.png` | Instagram carousel slides |
| `{draft_id}/thumbnail.png`              | Video thumbnail concepts  |

## Review Workflow

<Steps>
  <Step title="Check the Queue">
    List new drafts filtered by status `draft`:

    ```bash theme={null}
    GET /api/v1/social/drafts?status=draft&limit=20
    ```
  </Step>

  <Step title="Review Each Draft">
    Open individual drafts to review text, images, and hashtags. Check that the Professor High voice is consistent and the content is accurate.

    ```bash theme={null}
    GET /api/v1/social/drafts/:id
    ```
  </Step>

  <Step title="Approve, Edit, or Reject">
    Approve drafts that are ready. Reject those that miss the mark with a reason. Add review notes for context.

    ```bash theme={null}
    PATCH /api/v1/social/drafts/:id/status
    { "status": "approved" }
    ```
  </Step>

  <Step title="Schedule Approved Content">
    Set publish timestamps for approved drafts to build out your content calendar:

    ```bash theme={null}
    PATCH /api/v1/social/drafts/:id/status
    { "status": "scheduled", "scheduled_at": "2026-04-14T14:00:00Z" }
    ```
  </Step>

  <Step title="Publish and Mark as Posted">
    Copy content to your social media tool or post directly. Then mark the draft as posted:

    ```bash theme={null}
    PATCH /api/v1/social/drafts/:id/status
    { "status": "posted" }
    ```
  </Step>
</Steps>

<Tip>
  Use the **bulk approve** endpoint after batch review sessions to approve multiple drafts at once instead of updating them one by one.
</Tip>

<Tip>
  Check the **stats** endpoint regularly to monitor your content pipeline health -- how many drafts are waiting, how many are scheduled, and your generation-to-publish ratio.
</Tip>

<Warning>
  Rejected drafts are kept in the database for analytics and pipeline improvement. They are not deleted automatically. Review `rejection_reason` values periodically to identify patterns that may need prompt tuning.
</Warning>

## Related Features

* [Social Content Pipeline](/help/features/social-content-pipeline) -- The Trigger.dev pipeline that generates all draft content
* [Ask AI (Professor High)](/help/features/professor-high) -- The AI persona whose voice drives all generated content
* [Strain Discovery](/help/features/strain-discovery/searching) -- Browse strains that serve as source material for content

<Snippet file="contact-support.mdx" />
