PATCH /v1/projects/{project}/workflows/{workflow}
Change a custom workflow step's prompts, output format, or context flags.
curl -X PATCH https://serpon.ai/v1/projects/1/workflows/503 \
-H "Authorization: Bearer $SERPON_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"user": "Using this research:
{step_1_output}
write a {target_word_count}-word datasheet for {title} in a {tone} tone.",
"include_requirements": true
}'
const res = await fetch('https://serpon.ai/v1/projects/1/workflows/503', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SERPON_TOKEN}`,
'Content-Type': 'application/json',
Accept: 'application/json',
},
body: JSON.stringify({
user: 'Using this research:
{step_1_output}
write a {target_word_count}-word datasheet for {title}.',
include_requirements: true,
}),
});
const { data } = await res.json();
import os, requests
r = requests.patch(
"https://serpon.ai/v1/projects/1/workflows/503",
headers={
"Authorization": f"Bearer {os.environ['SERPON_TOKEN']}",
"Accept": "application/json",
},
json={
"user": "Using this research:
{step_1_output}
write a {target_word_count}-word datasheet for {title}.",
"include_requirements": True,
},
)
data = r.json()["data"]
{
"success": true,
"data": {
"id": 503,
"project_id": 1,
"workflow_id": 12,
"article_type": "product_datasheet",
"step_number": 3,
"step_name": "Draft",
"system": "You are an experienced technical copywriter.",
"user": "Using this research:
{step_1_output}
write a {target_word_count}-word datasheet for {title}.",
"output_format": "markdown",
"timeout_seconds": 180,
"include_additional_context": false,
"include_additional_instruction": true,
"include_requirements": true,
"include_research": false,
"include_outline": true,
"json_schema": null,
"is_custom": true,
"is_redacted": false,
"created_at": "2026-07-14T09:00:00.000000Z",
"updated_at": "2026-08-02T11:20:00.000000Z"
}
}
{
"message": "The given data was invalid.",
"errors": {
"step_number": [
"A workflow step with this step number already exists for this article type in this project."
]
}
}
Update one workflow step.
PATCH https://serpon.ai/v1/projects/{project}/workflows/{workflow}
PUT https://serpon.ai/v1/projects/{project}/workflows/{workflow}
Both verbs behave identically: every field is optional, and omitted fields are left alone. Changes apply to the next article generated — anything already running keeps the workflow it started with.
Authentication
Bearer token in the Authorization header. Requires update access to the project. See Authentication.
Path parameters
The project ID.
The workflow step ID. Must belong to that project.
Body parameters
All optional. Send only what changes.
Move the step to a different custom article type, within the same project. The target workflow is created if it does not exist yet, and if the move empties the workflow the step came from, that workflow is deleted and its article type stops being accepted. Reserved built-in names are rejected.
New position, from 1. Must not collide with another step in the same workflow — to change the order of several steps at once, use reorder instead.
Max 255 characters.
Free-text note.
Icon name, max 50 characters.
Replacement system prompt.
Replacement user prompt.
text, json, or markdown.
30–600.
Structured-output schema for output_format: "json".
Inject {additional_context}.
Inject {additional_instruction}.
Inject {requirements}.
Inject {research}. Turning this off on the only step that has it stops articles of this type from enabling research.
Inject {outline}.
Example
Response fields
Always true on 200.
The updated step. See Get workflow step for the full field reference.
Errors
| Status | When |
|---|---|
401 | Missing, invalid, or expired token |
402 | Account has no active subscription |
403 | No update access to the project |
404 | No such step, or it belongs to another project |
422 | Reserved article type name, or a step_number already taken |
429 | Rate limit exceeded |
See Errors for the full reference.
Tips
To try a prompt change without risking a live article type, duplicate the workflow into a second article type, edit the copy, and generate against both.