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

# Content Pipeline

> Create, manage, draft, schedule, and publish content via roadmap items.

Roadmap items are the core of ClickFlow's content pipeline. Each item represents a piece of content — from initial planning through AI drafting to CMS publication.

## platform\_create\_roadmap\_item

Create a new content roadmap item. Optionally start the AI drafting workflow immediately.

### Parameters

| Name                | Type    | Required | Default     | Description                                                                                                   |
| ------------------- | ------- | -------- | ----------- | ------------------------------------------------------------------------------------------------------------- |
| `keyword`           | string  | Yes      | —           | Target keyword for the content                                                                                |
| `prompt`            | string  | No       | `""`        | Content brief or instructions for the AI                                                                      |
| `strategy`          | string  | No       | `"Article"` | Content type: `Article`, `Listicle`, `How-to guide`, `Case study`, `News post`, `Review`, `Comparison`, `FAQ` |
| `scheduled_date`    | string  | No       | `""`        | Publication date in ISO format (e.g. `2026-03-25`)                                                            |
| `start_drafting`    | boolean | No       | `false`     | Start the AI drafting workflow immediately                                                                    |
| `image_generation`  | string  | No       | `""`        | Image style: `stock_photos`, `diagrams`, `illustrations`, `watercolor`                                        |
| `delivery_mode`     | string  | No       | `"draft"`   | `draft` (save to roadmap item) or `cms` (publish to CMS on completion)                                        |
| `cms_connection_id` | string  | No       | `""`        | Required when `delivery_mode` is `cms`                                                                        |

### Response

Without `start_drafting`:

```json theme={null}
{
  "roadmap_item_id": "ri_abc123",
  "status": "ready for review"
}
```

With `start_drafting: true`:

```json theme={null}
{
  "roadmap_item_id": "ri_abc123",
  "workflow_id": "wf_xyz789",
  "status": "In Progress",
  "message": "Roadmap item created and drafting started. Poll workflows_get_status for progress."
}
```

### Usage

<Tabs>
  <Tab title="MCP">
    ```json theme={null}
    {
      "keyword": "best CRM for startups",
      "prompt": "Write a comparison for bootstrapped founders",
      "strategy": "Comparison",
      "start_drafting": true
    }
    ```
  </Tab>

  <Tab title="API">
    ```bash theme={null}
    curl -X POST https://api.clickflow.com/v1/api/roadmap-items \
      -H "Authorization: Bearer cf_ak_your_key_here" \
      -H "Content-Type: application/json" \
      -d '{
        "keyword": "best CRM for startups",
        "prompt": "Write a comparison for bootstrapped founders",
        "strategy": "Comparison",
        "start_drafting": true
      }'
    ```
  </Tab>
</Tabs>

***

## platform\_list\_roadmap\_items

List all roadmap items, optionally filtered by status.

### Parameters

| Name     | Type   | Required | Default | Description                                                                          |
| -------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------ |
| `status` | string | No       | `""`    | Filter: `ready for review`, `approved`, `scheduled`, `drafted`, `synced`, `archived` |

### Response

```json theme={null}
{
  "items": [
    {
      "_id": "ri_abc123",
      "keyword": "best CRM for startups",
      "status": "drafted",
      "title": "Best CRM for Startups in 2026",
      "workflowId": "wf_xyz789"
    }
  ],
  "count": 1
}
```

### Usage

<Tabs>
  <Tab title="MCP">
    ```json theme={null}
    { "status": "drafted" }
    ```
  </Tab>

  <Tab title="API">
    ```bash theme={null}
    curl "https://api.clickflow.com/v1/api/roadmap-items?status=drafted" \
      -H "Authorization: Bearer cf_ak_your_key_here"
    ```
  </Tab>
</Tabs>

***

## platform\_get\_roadmap\_item

Get a single roadmap item with full details including draft content.

### Parameters

| Name              | Type   | Required | Default  | Description                                                                                                                                                                                 |
| ----------------- | ------ | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `roadmap_item_id` | string | Yes      | —        | The roadmap item ID                                                                                                                                                                         |
| `output_format`   | string | No       | `"html"` | `html` (default) or `markdown`. When `markdown`, the response includes a `draft.markdown` field with the content converted to Markdown. The `draft.html` field is always present. MCP only. |

### Response

```json theme={null}
{
  "_id": "ri_abc123",
  "keyword": "best CRM for startups",
  "status": "drafted",
  "title": "Best CRM for Startups in 2026",
  "draft": {
    "title": "Best CRM for Startups in 2026",
    "html": "<h1>Best CRM for Startups</h1>...",
    "markdown": "# Best CRM for Startups\n...",
    "metaDescription": "Compare the top CRM tools...",
    "thumbnailUrl": "https://storage.googleapis.com/...",
    "generatedAt": 1711324800000
  },
  "workflowId": "wf_xyz789",
  "organizationId": "org_abc123"
}
```

<Note>The `draft.markdown` field is only present when `output_format="markdown"`.</Note>

### Usage

<Tabs>
  <Tab title="MCP">
    ```json theme={null}
    { "roadmap_item_id": "ri_abc123", "output_format": "markdown" }
    ```
  </Tab>

  <Tab title="API">
    ```bash theme={null}
    curl https://api.clickflow.com/v1/api/roadmap-items/ri_abc123 \
      -H "Authorization: Bearer cf_ak_your_key_here"
    ```

    <Note>The `output_format` parameter is available via MCP only. REST API always returns HTML.</Note>
  </Tab>
</Tabs>

***

## platform\_update\_roadmap\_item

Update a roadmap item's metadata. Only provided fields are updated.

### Parameters

| Name               | Type   | Required | Description          |
| ------------------ | ------ | -------- | -------------------- |
| `roadmap_item_id`  | string | Yes      | The roadmap item ID  |
| `title`            | string | No       | New title            |
| `meta_description` | string | No       | New meta description |
| `slug`             | string | No       | New URL slug         |

### Response

```json theme={null}
{ "success": true }
```

### Usage

<Tabs>
  <Tab title="MCP">
    ```json theme={null}
    {
      "roadmap_item_id": "ri_abc123",
      "title": "Updated Title",
      "meta_description": "Updated description for SEO"
    }
    ```
  </Tab>

  <Tab title="API">
    ```bash theme={null}
    curl -X PATCH https://api.clickflow.com/v1/api/roadmap-items/ri_abc123 \
      -H "Authorization: Bearer cf_ak_your_key_here" \
      -H "Content-Type: application/json" \
      -d '{"title": "Updated Title", "meta_description": "Updated description for SEO"}'
    ```
  </Tab>
</Tabs>

***

## platform\_update\_roadmap\_item\_status

Change the status of a roadmap item.

### Parameters

| Name              | Type   | Required | Description                                                                          |
| ----------------- | ------ | -------- | ------------------------------------------------------------------------------------ |
| `roadmap_item_id` | string | Yes      | The roadmap item ID                                                                  |
| `status`          | string | Yes      | `ready for review`, `approved`, `changes requested`, `drafted`, `synced`, `archived` |

### Response

```json theme={null}
{ "success": true }
```

### Usage

<Tabs>
  <Tab title="MCP">
    ```json theme={null}
    { "roadmap_item_id": "ri_abc123", "status": "approved" }
    ```
  </Tab>

  <Tab title="API">
    ```bash theme={null}
    curl -X PATCH https://api.clickflow.com/v1/api/roadmap-items/ri_abc123/status \
      -H "Authorization: Bearer cf_ak_your_key_here" \
      -H "Content-Type: application/json" \
      -d '{"status": "approved"}'
    ```
  </Tab>
</Tabs>

***

## platform\_schedule\_roadmap\_item

Set or change the scheduled publication date.

### Parameters

| Name              | Type   | Required | Description                         |
| ----------------- | ------ | -------- | ----------------------------------- |
| `roadmap_item_id` | string | Yes      | The roadmap item ID                 |
| `date`            | string | Yes      | ISO date format (e.g. `2026-03-25`) |

### Response

```json theme={null}
{ "success": true }
```

### Usage

<Tabs>
  <Tab title="MCP">
    ```json theme={null}
    { "roadmap_item_id": "ri_abc123", "date": "2026-04-15" }
    ```
  </Tab>

  <Tab title="API">
    ```bash theme={null}
    curl -X PUT https://api.clickflow.com/v1/api/roadmap-items/ri_abc123/schedule \
      -H "Authorization: Bearer cf_ak_your_key_here" \
      -H "Content-Type: application/json" \
      -d '{"date": "2026-04-15"}'
    ```
  </Tab>
</Tabs>

***

## platform\_save\_draft

Save or replace the full draft content on a roadmap item. Sets status to `drafted`.

### Parameters

| Name               | Type   | Required | Description            |
| ------------------ | ------ | -------- | ---------------------- |
| `roadmap_item_id`  | string | Yes      | The roadmap item ID    |
| `title`            | string | Yes      | Draft title            |
| `html`             | string | Yes      | Full HTML content body |
| `meta_description` | string | No       | SEO meta description   |
| `thumbnail_url`    | string | No       | Featured image URL     |

### Response

```json theme={null}
{ "success": true }
```

### Usage

<Tabs>
  <Tab title="MCP">
    ```json theme={null}
    {
      "roadmap_item_id": "ri_abc123",
      "title": "My Custom Article",
      "html": "<h1>My Custom Article</h1><p>Content goes here...</p>",
      "meta_description": "A brief summary for search engines"
    }
    ```
  </Tab>

  <Tab title="API">
    ```bash theme={null}
    curl -X PUT https://api.clickflow.com/v1/api/roadmap-items/ri_abc123/draft \
      -H "Authorization: Bearer cf_ak_your_key_here" \
      -H "Content-Type: application/json" \
      -d '{
        "title": "My Custom Article",
        "html": "<h1>My Custom Article</h1><p>Content goes here...</p>",
        "meta_description": "A brief summary for search engines"
      }'
    ```
  </Tab>
</Tabs>

***

## platform\_publish\_to\_cms

Publish a roadmap item's draft to your connected CMS.

Supported CMS: WordPress, Sanity, HubSpot, Shopify, Strapi.

### Parameters

| Name                | Type   | Required | Description                                                                                                                                          |
| ------------------- | ------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `roadmap_item_id`   | string | Yes      | The roadmap item ID (must have a draft)                                                                                                              |
| `cms_connection_id` | string | No       | CMS connection to use. If omitted, ClickFlow resolves automatically: previous publish connection > linked workflow connection > first available CMS. |

### Response

```json theme={null}
{
  "success": true,
  "post_id": "12345",
  "permalink": "https://example.com/blog/my-article",
  "edit_url": "https://example.com/wp-admin/post.php?post=12345",
  "cms_type": "wordpress"
}
```

### Errors

| Error                                            | Cause                                   |
| ------------------------------------------------ | --------------------------------------- |
| `"Roadmap item has no draft content to publish"` | No draft saved yet                      |
| `"No CMS connection found"`                      | No CMS connected in ClickFlow dashboard |

### Usage

<Tabs>
  <Tab title="MCP">
    ```json theme={null}
    { "roadmap_item_id": "ri_abc123" }
    ```
  </Tab>

  <Tab title="API">
    ```bash theme={null}
    curl -X POST https://api.clickflow.com/v1/api/roadmap-items/ri_abc123/publish \
      -H "Authorization: Bearer cf_ak_your_key_here" \
      -H "Content-Type: application/json" \
      -d '{}'
    ```
  </Tab>
</Tabs>

***

## platform\_add\_target\_keyword

Add a keyword to your organization's tracking list.

### Parameters

| Name         | Type    | Required | Default           | Description                                                    |
| ------------ | ------- | -------- | ----------------- | -------------------------------------------------------------- |
| `keyword`    | string  | Yes      | —                 | The keyword to track                                           |
| `volume`     | integer | No       | `0`               | Monthly search volume                                          |
| `difficulty` | integer | No       | `0`               | Keyword difficulty (0-100)                                     |
| `intent`     | string  | No       | `"informational"` | `informational`, `commercial`, `transactional`, `navigational` |

### Response

```json theme={null}
{
  "keyword": "best CRM for startups",
  "status": "added"
}
```

### Usage

<Tabs>
  <Tab title="MCP">
    ```json theme={null}
    {
      "keyword": "best CRM for startups",
      "volume": 8100,
      "difficulty": 58,
      "intent": "commercial"
    }
    ```
  </Tab>

  <Tab title="API">
    ```bash theme={null}
    curl -X POST https://api.clickflow.com/v1/api/target-keywords \
      -H "Authorization: Bearer cf_ak_your_key_here" \
      -H "Content-Type: application/json" \
      -d '{"keyword": "best CRM for startups", "volume": 8100, "difficulty": 58, "intent": "commercial"}'
    ```
  </Tab>
</Tabs>

```
```
