Sorry, no results found for "".
RFC 4122 UUID of workflow expressed in URL-safe base64 format
"uJzC2b6YQg-DW2A5edpQYQ"
Must be exactly "workflow"
.
The name of the workflow
"Approval by editors required"
The stages of the workflow
[{ id: "waiting_for_review", name: "Waiting for review", initial: true }]
ID of the stage
"waiting_for_review"
Name of the stage
"Waiting for review"
Description of the stage
"Editor has finished writing and is waiting for approval from a supervisor"
Whether this is the initial stage or not
Workflow API key
"approval_by_editors"
Returns a resource object of type workflow.
POST https://site-api.datocms.com/workflows HTTP/1.1Authorization: Bearer YOUR-API-TOKENAccept: application/jsonX-Api-Version: 3Content-Type: application/vnd.api+json
{ "data": { "type": "workflow", "attributes": { "name": "Approval by editors required", "stages": [ { "id": "waiting_for_review", "name": "Waiting for review", "initial": true } ], "api_key": "approval_by_editors" } }}
curl -g 'https://site-api.datocms.com/workflows' \ -X POST \ -H "Authorization: Bearer YOUR-API-TOKEN" \ -H "Accept: application/json" \ -H "X-Api-Version: 3" \ -H "Content-Type: application/vnd.api+json" \ --data-binary '{"data":{"type":"workflow","attributes":{"name":"Approval by editors required","stages":[{"id":"waiting_for_review","name":"Waiting for review","initial":true}],"api_key":"approval_by_editors"}}}'
await fetch("https://site-api.datocms.com/workflows", { method: "POST", headers: { Authorization: "Bearer YOUR-API-TOKEN", Accept: "application/json", "X-Api-Version": "3", "Content-Type": "application/vnd.api+json", }, body: JSON.stringify({ data: { type: "workflow", attributes: { name: "Approval by editors required", stages: [ { id: "waiting_for_review", name: "Waiting for review", initial: true, }, ], api_key: "approval_by_editors", }, }, }),});
HTTP/1.1 200 OKContent-Type: application/jsonCache-Control: cache-control: max-age=0, private, must-revalidateX-RateLimit-Limit: 30X-RateLimit-Remaining: 28
{ "data": { "type": "workflow", "id": "uJzC2b6YQg-DW2A5edpQYQ", "attributes": { "name": "Approval by editors required", "stages": [ { "id": "waiting_for_review", "name": "Waiting for review", "initial": true } ], "api_key": "approval_by_editors" } }}