Create workflow
curl -X POST 'https://dashboard.justcrawl.io/api/v1/workflows' \ -H 'Authorization: Bearer $JUSTCRAWL_API_KEY' \ -H 'Content-Type: application/json' \ -d '{"name":"My workflow","dag":{"nodes":[{"id":"entry","type":"entry"},{"id":"svc","type":"service","providerId":"brightdata"},{"id":"out","type":"result"}],"edges":[{"from":"entry","to":"svc"},{"from":"svc","to":"out"}]}}'import os, requestsdag = { 'nodes': [ {'id': 'entry', 'type': 'entry'}, {'id': 'svc', 'type': 'service', 'providerId': 'brightdata'}, {'id': 'out', 'type': 'result'}, ], 'edges': [{'from': 'entry', 'to': 'svc'}, {'from': 'svc', 'to': 'out'}],}r = requests.post( 'https://dashboard.justcrawl.io/api/v1/workflows', headers={'Authorization': f'Bearer {os.environ["JUSTCRAWL_API_KEY"]}'}, json={'name': 'My workflow', 'dag': dag},)r.raise_for_status()workflow = r.json()const dag = { nodes: [ { id: 'entry', type: 'entry' }, { id: 'svc', type: 'service', providerId: 'brightdata' }, { id: 'out', type: 'result' }, ], edges: [{ from: 'entry', to: 'svc' }, { from: 'svc', to: 'out' }],};const res = await fetch('https://dashboard.justcrawl.io/api/v1/workflows', { method: 'POST', headers: { Authorization: `Bearer ${process.env.JUSTCRAWL_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ name: 'My workflow', dag }),});if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);const workflow = await res.json();Create a new workflow with a name and DAG definition. The DAG is validated
server-side via validate() before persistence; structural errors return 400
with a validationErrors array enumerating each problem. New workflows start
in draft status — call POST /api/v1/workflows/{id}/publish to make them
live. Set autoGenerated: true if the DAG was emitted by an auto-workflow
builder; this surfaces the “Run benchmark to optimize” CTA in the dashboard.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”object
Display name for the workflow.
object
object
object
object
Optional. Marks the workflow as emitted by an auto-workflow builder so the dashboard can surface the “Run benchmark” CTA.
Responses
Section titled “ Responses ”The created workflow.
object
object
object
object
object
object
Example
{ "status": "draft", "dag": { "nodes": [ { "type": "entry" } ], "edges": [ { "type": "default" } ] }, "smart": { "strategy": "success", "mode": "auto" }}Missing or invalid name or dag field, or the DAG failed structural validation. Body includes validationErrors when DAG validation failed.
object
object
Example generated
{ "error": "example", "validationErrors": [ {} ]}Missing or invalid authentication token
object
Example
{ "error": "Missing or invalid authentication token"}Insufficient permissions for this operation
object
Example
{ "error": "No organization. Complete onboarding first."}Unexpected server error. Logs and PostHog $exception capture
object
Example
{ "error": "Something went wrong"}