WorkflowsCreate step

POST /v1/projects/{project}/workflows

Add a step to a project's custom workflow.

curl -X POST https://serpon.ai/v1/projects/1/workflows \
  -H "Authorization: Bearer $SERPON_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "article_type": "product_datasheet",
    "step_number": 1,
    "step_name": "Research product details",
    "step_description": "Compile specifications and use cases",
    "system": "You are a technical writer specializing in product documentation.",
    "user": "Research and compile detailed specifications for: {title}. Focus on features, specifications, and target use cases.",
    "output_format": "json",
    "timeout_seconds": 120,
    "include_additional_context": true
  }'
{
  "success": true,
  "data": {
    "id": 501,
    "workflow_id": 12,
    "project_id": 1,
    "article_type": "product_datasheet",
    "step_number": 1,
    "step_name": "Research product details",
    "step_description": "Compile specifications and use cases",
    "step_icon": null,
    "system": "You are a technical writer specializing in product documentation.",
    "user": "Research and compile detailed specifications for: {title}.",
    "output_format": "json",
    "timeout_seconds": 120,
    "include_additional_context": true,
    "include_additional_instruction": false,
    "include_requirements": false,
    "include_research": false,
    "include_outline": false,
    "json_schema": null,
    "is_custom": true,
    "is_redacted": false,
    "created_at": "2026-08-02T11:00:00.000000Z",
    "updated_at": "2026-08-02T11:00:00.000000Z"
  }
}

Create one step of a custom workflow.

POST https://serpon.ai/v1/projects/{project}/workflows

A workflow is built one step at a time: post step 1, then step 2, and so on. The first step you create for a given article_type creates the workflow itself, bringing that article type into existence for the project — after that, POST /v1/articles accepts it. See Custom workflows.

Authentication

Bearer token in the Authorization header. Requires update access to the project. See Authentication.

Path parameters

path
projectinteger
Required

The project ID. Custom workflows are always scoped to one project.

Body parameters

Required

body
article_typestring
Required

The custom type this step belongs to, max 255 characters. Cannot be one of the reserved built-in names (blog_post, ultimate_guide, listicle, product_review, comparison, tutorial, news, case_study, song_meaning, song_meaning_single_gpt_5).

body
step_numberinteger
Required

Position in the pipeline, from 1. Must be unique within the workflow. Steps run in ascending order, and the numbers need not be contiguous.

body
step_namestring
Required

Max 255 characters. Surfaced as current_step on articles while this step runs, so make it readable.

body
systemstring
Required

System prompt — the model's role and standing rules. Accepts template variables.

body
userstring
Required

User prompt — the actual instruction for this step. Accepts template variables, including {step_N_output} to consume earlier steps.

body
output_formatstring
Required

text, json, or markdown. Use json for research and outline steps, markdown for steps that write prose.

Optional

body
step_descriptionstring

Free-text note about what the step does. Shown in the dashboard.

body
step_iconstring

Icon name for the dashboard, max 50 characters.

body
timeout_secondsinteger

30–600. How long the step may run before it is treated as failed.

body
json_schemaobject

Structured-output schema, used with output_format: "json". Every object needs additionalProperties: false and a required list covering its properties; arrays need explicit items.

body
include_additional_contextboolean

Inject the article's additional_context as {additional_context}. Best on research and planning steps.

body
include_additional_instructionboolean

Inject the article's additional_instruction as {additional_instruction}. Best on writing and revision steps.

body
include_requirementsboolean

Inject word count, tone, and point-of-view guidance as {requirements}. Belongs on the steps that actually write.

body
include_researchboolean

Inject web research results as {research}. A workflow must contain at least one step with this flag before articles of this type can set research_enabled.

body
include_outlineboolean

Inject the generated outline as {outline}.

Example

Response fields

successboolean
Required

Always true on 201.

dataobject
Required

The created step. See Get workflow step for the full field reference.

Errors

StatusWhen
401Missing, invalid, or expired token
402Account has no active subscription
403No update access to the project
404No such project
422Reserved article type name, duplicate step_number, or a missing required field
429Rate limit exceeded

See Errors for the full reference.

Tips

Building a pipeline from nothing is slower than starting from a copy. Duplicate a type whose shape is close to what you want, then edit the steps.

Whatever the last step returns becomes the article's content. End the pipeline with a step that emits the finished body, not one that critiques it.