> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# CreateContentPlan

# Package: seo

# Namespace: SeoBlogPostCandidateServiceV1

# Method link: https://dev.wix.com/docs/api-reference/business-management/seo/content-plan-blog-post-candidate-v1/create-content-plan.md

## Permission Scopes:
Manage SEO Settings: SCOPE.PROMOTE.MANAGE-SEO

## Introduction

Generates the blog post briefs for a content plan flow.

For a flow waiting at `KEYWORD_RESEARCH`, this method generates the
briefs and lets the flow continue to `SUCCESS`. Some flows advance
automatically: skip this call for an existing flow already at
`CONTENT_PLAN` or `SUCCESS`, unless regeneration is intended.

The flow reaches `KEYWORD_RESEARCH` when keyword research starts, not
when it finishes. Before releasing a waiting flow, poll Get Site Keyword
Research with the flow's `keywordResearchId` until its status is
`SUCCESS`. Verify the returned research and flow IDs, then re-read the
same flow immediately before this call. It must still be at
`KEYWORD_RESEARCH` with the same research ID. Called while research is
still running, this method fails with `FLOW_NOT_READY_FOR_CONTENT_PLAN`.

Called on a flow that already reached `SUCCESS`, this method regenerates
the plan under a separate content plan flow. The response carries the new
`contentPlanFlowId`, and you poll that ID rather than the original. The
original flow keeps its own candidates.

Check `success` in the response as well as the HTTP status. A request
that omits `contentPlanFlowId` reports every failure that way, with
`success` set to `false` and the reason in `message` rather than an
error. A generation failure reports that way even when you do send the
ID.

Call this method once for a flow and wait for it to return. Concurrent
calls for the same site can produce duplicate content plans.

---

## REST API

### Schema

```
 Method: createContentPlan
 Description: Generates the blog post briefs for a content plan flow.  For a flow waiting at `KEYWORD_RESEARCH`, this method generates the briefs and lets the flow continue to `SUCCESS`. Some flows advance automatically: skip this call for an existing flow already at `CONTENT_PLAN` or `SUCCESS`, unless regeneration is intended.  The flow reaches `KEYWORD_RESEARCH` when keyword research starts, not when it finishes. Before releasing a waiting flow, poll Get Site Keyword Research with the flow's `keywordResearchId` until its status is `SUCCESS`. Verify the returned research and flow GUIDs, then re-read the same flow immediately before this call. It must still be at `KEYWORD_RESEARCH` with the same research GUID. Called while research is still running, this method fails with `FLOW_NOT_READY_FOR_CONTENT_PLAN`.  Called on a flow that already reached `SUCCESS`, this method regenerates the plan under a separate content plan flow. The response carries the new `contentPlanFlowId`, and you poll that GUID rather than the original. The original flow keeps its own candidates.  Check `success` in the response as well as the HTTP status. A request that omits `contentPlanFlowId` reports every failure that way, with `success` set to `false` and the reason in `message` rather than an error. A generation failure reports that way even when you do send the GUID.  Call this method once for a flow and wait for it to return. Concurrent calls for the same site can produce duplicate content plans.
 URL: https://www.wixapis.com/seo-content-plan-service/v1/create-content-plan
 Method: POST
 Method parameters:
   param name: contentPlanFlowId | type: contentPlanFlowId | description: GUID of the content plan flow to generate the blog post briefs for.  Omit to use the site's most recent eligible flow. Do not remove the fallback — existing callers depend on it.  | validation: format GUID
 Return type: CreateContentPlanResponse
  - name: success | type: boolean | description: Whether the blog post briefs were generated.  Check this field as well as the HTTP status. Some failures return `false` here rather than an error.  
  - name: message | type: string | description: Reason the generation failed.  Returned only when `success` is `false`.  | validation: maxLength 1000
  - name: contentPlanFlowId | type: string | description: GUID of the content plan flow the briefs were generated under.  When this method regenerates a plan for a flow that already succeeded, this is a new GUID. Poll this GUID rather than the one you sent.  | validation: format GUID

 Possible Errors:
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: CONTENT_PLAN_FLOW_NOT_FOUND | Description: Couldn't find the content plan flow.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: CONTENT_PLAN_FLOW_CANCELED | Description: The flow was canceled while generation was running, so no content plan was produced.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: FLOW_NOT_READY_FOR_CONTENT_PLAN | Description: The flow's status is neither `SUCCESS` nor `KEYWORD_RESEARCH`, or its keyword research is still running, so a content plan can't be generated from it yet.


```

### Examples

### Generate the blog post briefs for a content plan flow
Releases a flow parked at KEYWORD_RESEARCH. Check the success field as well as the HTTP status, and poll the returned contentPlanFlowId.

```curl
curl -X POST \
'https://www.wixapis.com/seo-content-plan-service/v1/create-content-plan' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "contentPlanFlowId": "d290f1ee-6c54-4b01-90e6-d701748f0851"
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.seo.blogPostCandidates.createContentPlan(options)
 Description: Generates the blog post briefs for a content plan flow.  For a flow waiting at `KEYWORD_RESEARCH`, this method generates the briefs and lets the flow continue to `SUCCESS`. Some flows advance automatically: skip this call for an existing flow already at `CONTENT_PLAN` or `SUCCESS`, unless regeneration is intended.  The flow reaches `KEYWORD_RESEARCH` when keyword research starts, not when it finishes. Before releasing a waiting flow, poll Get Site Keyword Research with the flow's `keywordResearchId` until its status is `SUCCESS`. Verify the returned research and flow GUIDs, then re-read the same flow immediately before this call. It must still be at `KEYWORD_RESEARCH` with the same research GUID. Called while research is still running, this method fails with `FLOW_NOT_READY_FOR_CONTENT_PLAN`.  Called on a flow that already reached `SUCCESS`, this method regenerates the plan under a separate content plan flow. The response carries the new `contentPlanFlowId`, and you poll that GUID rather than the original. The original flow keeps its own candidates.  Check `success` in the response as well as the HTTP status. A request that omits `contentPlanFlowId` reports every failure that way, with `success` set to `false` and the reason in `message` rather than an error. A generation failure reports that way even when you do send the GUID.  Call this method once for a flow and wait for it to return. Concurrent calls for the same site can produce duplicate content plans.
 Method parameters:
   param name: options | type: CreateContentPlanOptions  none  
        - name: contentPlanFlowId | type: string | description: GUID of the content plan flow to generate the blog post briefs for.  Omit to use the site's most recent eligible flow. Do not remove the fallback — existing callers depend on it.  | validation: format GUID
 Return type: PROMISE<CreateContentPlanResponse>
  - name: success | type: boolean | description: Whether the blog post briefs were generated.  Check this field as well as the HTTP status. Some failures return `false` here rather than an error.  
  - name: message | type: string | description: Reason the generation failed.  Returned only when `success` is `false`.  | validation: maxLength 1000
  - name: contentPlanFlowId | type: string | description: GUID of the content plan flow the briefs were generated under.  When this method regenerates a plan for a flow that already succeeded, this is a new GUID. Poll this GUID rather than the one you sent.  | validation: format GUID

 Possible Errors:
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: CONTENT_PLAN_FLOW_NOT_FOUND | Description: Couldn't find the content plan flow.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: CONTENT_PLAN_FLOW_CANCELED | Description: The flow was canceled while generation was running, so no content plan was produced.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: FLOW_NOT_READY_FOR_CONTENT_PLAN | Description: The flow's status is neither `SUCCESS` nor `KEYWORD_RESEARCH`, or its keyword research is still running, so a content plan can't be generated from it yet.


```

### Examples

### createContentPlan
```javascript
import { blogPostCandidates } from '@wix/seo';

async function createContentPlan(options) {
  const response = await blogPostCandidates.createContentPlan(options);
};
```

### createContentPlan (with elevated permissions)
```javascript
import { blogPostCandidates } from '@wix/seo';
import { auth } from '@wix/essentials';

async function myCreateContentPlanMethod(options) {
  const elevatedCreateContentPlan = auth.elevate(blogPostCandidates.createContentPlan);
  const response = await elevatedCreateContentPlan(options);
}
```

### createContentPlan (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { blogPostCandidates } from '@wix/seo';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { blogPostCandidates },
  // Include the auth strategy and host as relevant
});


async function createContentPlan(options) {
  const response = await myWixClient.blogPostCandidates.createContentPlan(options);
};
```

---