> 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

# GetContentPlanFlow

# Package: seo

# Namespace: ContentPlanFlowServiceV1

# Method link: https://dev.wix.com/docs/api-reference/business-management/seo/content-plan-content-plan-flow-v1/get-content-plan-flow.md

## Permission Scopes:
View SEO Settings: SCOPE.PROMOTE.VIEW-SEO

## Introduction

Retrieves a content plan flow.

While a flow is generating, poll this method with the
`contentPlanFlowId` returned by Trigger Content Plan Generation Flow to
follow the flow's progress.

Omit `contentPlanFlowId` to retrieve the site's most recent successful
flow. This is useful for picking up a content plan that was generated in
the site dashboard. A flow that's still running is never returned this
way, and a site with no successful flow returns a not found error.

---

## REST API

### Schema

```
 Method: getContentPlanFlow
 Description: Retrieves a content plan flow.  While a flow is generating, poll this method with the `contentPlanFlowId` returned by Trigger Content Plan Generation Flow to follow the flow's progress.  Omit `contentPlanFlowId` to retrieve the site's most recent successful flow. This is useful for picking up a content plan that was generated in the site dashboard. A flow that's still running is never returned this way, and a site with no successful flow returns a not found error.
 URL: https://www.wixapis.com/seo-content-plan-service/v1/content-plan-flows/{contentPlanFlowId}
 Method: GET
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  contentPlanFlowId
 Method parameters: 
   param name: contentPlanFlowId | type:   none | required: true 
 Return type: GetContentPlanFlowResponse
  - name: contentPlanFlow | type: ContentPlanFlow | description: Retrieved content plan flow.  
     - name: id | type: string | description: Content plan flow GUID.  | read-only: true | validation: format GUID
     - name: createdAt | type: string | description: Date and time the content plan flow was created.  | validation: maxLength 100
     - name: updatedAt | type: string | description: Date and time the content plan flow was updated.  | validation: maxLength 100
     - name: status | type: Status | description: Current status of the content plan flow.  `KEYWORD_RESEARCH` can mean research is running or the flow is waiting for Create Content Plan. Get Site Keyword Research reports research's own status. A flow already at `CONTENT_PLAN` or `SUCCESS` needs no release call.  
         - enum:
         -     CREATED: The flow is created and the generation pipeline is starting.
         -     SITE_SUMMARY: The site's existing content is being summarized.
         -     KEYWORD_RESEARCH: Keyword research has started. This does not prove research is ready. Check the matching research with Get Site Keyword Research. After research succeeds, re-read the flow before calling Create Content Plan once if it still waits here.
         -     CONTENT_PLAN: Blog post briefs are being generated from the keyword research.
         -     SUCCESS: Generation is complete. Retrieve the results with List Blog Post Candidates and List Keyword Research Items.
         -     FAIL: Generation failed. Trigger a flow to try again.
         -     PENDING_REQUIREMENTS: The site is missing business information that keyword research requires. The flow resumes automatically once the information is added to the site.
         -     CANCELED: The flow was canceled and can't be resumed.
         -     SITE_ANALYSIS: The site's pages are being analyzed.
     - name: origin | type: string | description: What started the content plan flow. Flows started by an app are recorded as `AGENT`.  | validation: maxLength 100
     - name: summaryId | type: string | description: GUID of the site content summary the flow produced.  | validation: format GUID
     - name: keywordResearchId | type: string | description: GUID of the keyword research the flow started.  Available once `status` is `KEYWORD_RESEARCH` or later. Pass it to Get Site Keyword Research to check whether the research finished.  | validation: format GUID


```

### Examples

### Retrieve a content plan flow by ID
Polls a running flow. Here the flow has finished, so status is SUCCESS and the results are ready to read.

```curl
curl -X GET \
'https://www.wixapis.com/seo-content-plan-service/v1/content-plan-flows/d290f1ee-6c54-4b01-90e6-d701748f0851' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.seo.contentPlanFlows.getContentPlanFlow(contentPlanFlowId)
 Description: Retrieves a content plan flow.  While a flow is generating, poll this method with the `contentPlanFlowId` returned by Trigger Content Plan Generation Flow to follow the flow's progress.  Omit `contentPlanFlowId` to retrieve the site's most recent successful flow. This is useful for picking up a content plan that was generated in the site dashboard. A flow that's still running is never returned this way, and a site with no successful flow returns a not found error.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  contentPlanFlowId
 Method parameters: 
   param name: contentPlanFlowId | type: string | description: GUID of the content plan flow to retrieve.  Omit to retrieve the site's most recent successful flow. | required: true | validation: format GUID
 Return type: PROMISE<GetContentPlanFlowResponse>
  - name: contentPlanFlow | type: ContentPlanFlow | description: Retrieved content plan flow.  
     - name: _id | type: string | description: Content plan flow GUID.  | read-only: true | validation: format GUID
     - name: createdAt | type: string | description: Date and time the content plan flow was created.  | validation: maxLength 100
     - name: updatedAt | type: string | description: Date and time the content plan flow was updated.  | validation: maxLength 100
     - name: status | type: Status | description: Current status of the content plan flow.  `KEYWORD_RESEARCH` can mean research is running or the flow is waiting for Create Content Plan. Get Site Keyword Research reports research's own status. A flow already at `CONTENT_PLAN` or `SUCCESS` needs no release call.  
         - enum:
         -     CREATED: The flow is created and the generation pipeline is starting.
         -     SITE_SUMMARY: The site's existing content is being summarized.
         -     KEYWORD_RESEARCH: Keyword research has started. This does not prove research is ready. Check the matching research with Get Site Keyword Research. After research succeeds, re-read the flow before calling Create Content Plan once if it still waits here.
         -     CONTENT_PLAN: Blog post briefs are being generated from the keyword research.
         -     SUCCESS: Generation is complete. Retrieve the results with List Blog Post Candidates and List Keyword Research Items.
         -     FAIL: Generation failed. Trigger a flow to try again.
         -     PENDING_REQUIREMENTS: The site is missing business information that keyword research requires. The flow resumes automatically once the information is added to the site.
         -     CANCELED: The flow was canceled and can't be resumed.
         -     SITE_ANALYSIS: The site's pages are being analyzed.
     - name: origin | type: string | description: What started the content plan flow. Flows started by an app are recorded as `AGENT`.  | validation: maxLength 100
     - name: summaryId | type: string | description: GUID of the site content summary the flow produced.  | validation: format GUID
     - name: keywordResearchId | type: string | description: GUID of the keyword research the flow started.  Available once `status` is `KEYWORD_RESEARCH` or later. Pass it to Get Site Keyword Research to check whether the research finished.  | validation: format GUID


```

### Examples

### getContentPlanFlow
```javascript
import { contentPlanFlows } from '@wix/seo';

async function getContentPlanFlow(contentPlanFlowId) {
  const response = await contentPlanFlows.getContentPlanFlow(contentPlanFlowId);
};
```

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

async function myGetContentPlanFlowMethod(contentPlanFlowId) {
  const elevatedGetContentPlanFlow = auth.elevate(contentPlanFlows.getContentPlanFlow);
  const response = await elevatedGetContentPlanFlow(contentPlanFlowId);
}
```

### getContentPlanFlow (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 { contentPlanFlows } from '@wix/seo';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function getContentPlanFlow(contentPlanFlowId) {
  const response = await myWixClient.contentPlanFlows.getContentPlanFlow(contentPlanFlowId);
};
```

---