Scripts

POST

/channels/{id}/scripts

Required Permission scripts:write

Create a new canvas script (chat-first) within a channel. Scripts can be created with research URLs, topics, angles, and templates.

Request

Request Body
{
    "title": "string (required) - Script title (max 255)",
    "topic": "string (required) - Concept/brief (min 10, max 5000)",
    "length": "integer (required) - Target word count (200-20000)",
    "angle": "string (optional) - Angle/hook (max 1000)",
    "language": "string (optional) - Language (defaults to channel language)",
    "template_id": "integer (optional) - Must belong to the channel",
    "voice_id": "integer (optional) - Voice ID for the channel",
    "voice": "string (optional) - Raw voice string",
    "prompt": "string (optional) - Custom starting prompt",
    "research_urls": "array (optional) - URLs for research (max 10)",
    "research_texts": "array (optional) - Text snippets for research (max 10)"
}

Response (201)

Response Fields

Field Type Description
success boolean Request success
data.script_id integer Script identifier
data.script_number integer Sequential number per channel
data.thread_id integer Associated thread ID
data.status string Script status
data.canvas_url string Canvas URL for editing
Response Example
{
    "success": true,
    "data": {
        "script_id": 789,
        "script_number": 12,
        "thread_id": 456,
        "status": "active",
        "canvas_url": "https://subscribr.com/chat/{thread}/canvas/{script}"
    }
}
GET

/channels/{id}/scripts

Required Permission scripts:read

List scripts for a specific channel with optional filtering.

Request

Parameters

Name Type Description
id integer Channel ID (path parameter)
status string Filter by status (active, idea)
format string Filter by format (Tutorial, Documentary, News, Interview, Compilation)
search string Search in title/topic
per_page integer Results per page (default: 20)
page integer Page number (default: 1)

Response (200)

Response Fields

Field Type Description
success boolean Request success
data[].id integer Script ID
data[].channel_id integer Channel ID
data[].script_number integer Sequential number per channel
data[].title string Script title
data[].status string Script status (idea or active)
data[].has_outline boolean Outline exists
data[].has_script boolean Script exists
pagination.total integer Total results
Response Example
{
    "success": true,
    "data": [
        {
            "id": 789,
            "channel_id": 123,
            "script_number": 12,
            "title": "Why Apple's AI Changes Everything",
            "topic": "Break down the key changes...",
            "angle": "Explain the hidden implication most reviews miss",
            "length": 1200,
            "status": "active",
            "format": "Tutorial",
            "language": "English",
            "voice": "neutral",
            "template_id": 22,
            "production_status": "scripting",
            "thread_id": 456,
            "canvas_url": "https://subscribr.com/chat/{thread}/canvas/{script}",
            "has_outline": true,
            "has_script": false
        }
    ],
    "pagination": {
        "current_page": 1,
        "per_page": 20,
        "total": 1,
        "last_page": 1
    }
}
GET

/scripts/{id}

Required Permission scripts:read

Get detailed information about a specific script.

Request

Parameters

Name Type Description
id integer Script ID (path parameter)

Response (200)

Response Fields

Field Type Description
success boolean Request success
data.id integer Script ID
data.channel_id integer Channel ID
data.script_number integer Sequential number per channel
data.title string Script title
data.topic string Topic/brief
data.angle string Angle/hook
data.status string Script status (idea or active)
data.has_outline boolean Outline exists
data.has_script boolean Script exists
data.notes string|null Notes (nullable)
data.hook string|null Hook text (nullable)
data.thumbnail string|null Thumbnail text (nullable)
Response Example
{
    "success": true,
    "data": {
        "id": 789,
        "channel_id": 123,
        "script_number": 12,
        "title": "Why Apple's AI Changes Everything",
        "topic": "Break down the key changes...",
        "angle": "Explain the hidden implication most reviews miss",
        "length": 1200,
        "format": "Tutorial",
        "language": "English",
        "voice": "neutral",
        "template_id": 22,
        "status": "active",
        "production_status": "scripting",
        "thread_id": 456,
        "canvas_url": "https://subscribr.com/chat/{thread}/canvas/{script}",
        "has_outline": true,
        "has_script": false,
        "notes": "Notes for collaborators",
        "hook": "Open with a surprising fact",
        "thumbnail": "Apple AI Shock"
    }
}
GET

/scripts/{id}/content

Required Permission scripts:read

Fetch outline and script content for a canvas script.

Request

Parameters

Name Type Description
id integer Script ID (path parameter)

Response (200)

Response Fields

Field Type Description
success boolean Request success
data.script_id integer Script identifier
data.outline string Generated outline markdown
data.script string Generated script markdown
data.outline_version integer Outline version number
data.content_version integer Script content version number
Response Example
{
    "success": true,
    "data": {
        "script_id": 789,
        "outline": "# Outline\\n...",
        "script": "# Script\\n...",
        "outline_version": 3,
        "content_version": 7
    }
}
POST

/scripts/{id}/outline/generate

Required Permission scripts:write

Start outline generation for a script.

Request

Request Body
[]

Response (202)

Response Fields

Field Type Description
success boolean Request success
data.run_id string Run ID for polling
data.status string Initial status (queued)
Response Example
{
    "success": true,
    "data": {
        "run_id": "run_123",
        "status": "queued"
    }
}
POST

/scripts/{id}/script/generate

Required Permission scripts:write

Start script generation (requires outline).

Request

Request Body
[]

Response (202)

Response Fields

Field Type Description
success boolean Request success
data.run_id string Run ID for polling
data.status string Initial status (queued)
Response Example
{
    "success": true,
    "data": {
        "run_id": "run_456",
        "status": "queued"
    }
}
GET

/scripts/{id}/generate/poll

Required Permission scripts:read

Poll generation status using a run_id. Returns full content only when completed.

Request

Parameters

Name Type Description
id integer Script ID (path parameter)
run_id string Run UUID returned from generate endpoints

Response (200)

Response Fields

Field Type Description
success boolean Request success
data.run_id string Run ID
data.status string Status (queued, processing, completed, failed)
data.content_type string Type of content (outline or script)
data.outline string|null Generated outline (if available)
data.script string|null Generated script (if available)
Response Example
{
    "success": true,
    "data": {
        "run_id": "run_456",
        "status": "completed",
        "content_type": "script",
        "outline": "# Outline\\n...",
        "script": "# Script\\n..."
    }
}
GET

/scripts/{id}/export

Required Permission scripts:read

Export a completed script in various formats.

Request

Parameters

Name Type Description
id integer Script ID (path parameter)
format string Required. text, html, markdown
include_headings boolean Optional. true, false (default true)

Response (200)

Response Fields

Field Type Description
success boolean Request success
data.script_id integer Script ID
data.title string Script title
data.format string Format used
data.content string Exported content
data.include_headings boolean Whether headings were included
Response Example
{
    "success": true,
    "data": {
        "script_id": 789,
        "title": "Why Apple's AI Changes Everything",
        "format": "markdown",
        "content": "# Script\\n...",
        "include_headings": true
    }
}