Create a reusable batch job
const url = 'https://api.justcrawl.io/api/v1/batch-jobs';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","workflowId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","input":{"kind":"tags","tags":["example"]},"discoveryPolicy":{"additionalTags":["example"],"inheritParentTags":true}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.justcrawl.io/api/v1/batch-jobs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "workflowId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "input": { "kind": "tags", "tags": [ "example" ] }, "discoveryPolicy": { "additionalTags": [ "example" ], "inheritParentTags": true } }'Requires jobs:submit; setting discovery tags or inheritance additionally requires urls:write. workflowId is required and may be null for automatic routing. A manifest input must already be sealed. The server derives creator and organization identity; authority fields are rejected. Public creates always produce a standard definition; kind, owner and version fields are rejected. Successful saves return the definition wrapper and fixed, nonblocking selector-growth warnings. A saved definition changes only future invocations; each accepted run freezes its configuration.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Frozen for each run. Setting additional tags or inheritance requires urls:write; generated provenance tag prefixes are reserved.
object
Responses
Section titled “Responses”Create a reusable batch job.
object
object
Frozen for each run. Setting additional tags or inheritance requires urls:write; generated provenance tag prefixes are reserved.
object
Immutable dataset owner identity. Output only; it remains protected after owner deletion.
Stored dataset workflow version, selected by provisioning. Null for other definition kinds.
Nonblocking successful-save warnings; show them alongside the saved configuration.
Example
{ "definition": { "input": { "kind": "tags" }, "kind": "standard" }, "warnings": [ "discovery_tags_overlap_selector" ]}Validation failed — request body or query is missing/invalid
object
Example
{ "error": "Missing or invalid \"url\" field"}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."}Resource not found
object
Example
{ "error": "Workflow not found"}Unexpected server error. Logs and PostHog $exception capture
object
Example
{ "error": "Something went wrong"}