Ga naar inhoud

Prudai Developer API: workflows

Workflow definitions and curated templates; personal tokens only, with the app workflow capability. Delete is reserved until soft delete exists.

Basis-URL https://api.prudai.com/v1. Inloggen staat in Inloggen, scopes in Scopes en rechten, fouten in Fouten. Overzicht.

MethodePadWat het doetStand
GET/v1/workflowsList workflow definitionsBinnenkort
POST/v1/workflowsCreate a workflow definitionBinnenkort
GET/v1/workflows/{id}Get a workflow definitionBinnenkort
PATCH/v1/workflows/{id}Update a workflow definitionBinnenkort
DELETE/v1/workflows/{id}Soft-delete a workflow definitionBinnenkort
POST/v1/workflows/{id}/restoreRestore a soft-deleted workflow definitionBinnenkort
GET/v1/workflows/catalogGet curated templates and office workflowsBinnenkort
POST/v1/workflows/templates/{id}/copyCopy a curated templateBinnenkort
POST/v1/workflows/templates/{id}/intake-prefillPre-fill template intake from owned contextBinnenkort

List workflow definitions

GET /v1/workflows

Lists the caller’s visible definitions with an exact filtered total. Soft-deleted definitions are not listed; restore one with POST /workflows/{id}/restore. Personal tokens and signed-in user tokens only; service keys are rejected. The same product, organisation, workflow capability and ownership rules as the app apply, including 403 workflows_upgrade_required for VERA without Pro.

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:workflows:read
  • Goedkeuring: none, geen extra stap.

Parameters

  • X-Product-Slug header · string verplicht
    Product context, checked against the current user and the workflow capability. Een van: leo, leo-fiscaal, zia, vera, bever, irma, maia
  • q query · string
    max. lengte 200
  • limit query · integer
    standaard: 20 · min. 1 · max. 100
  • cursor query · string
    max. lengte 200
  • sort query · string
    Een van: name, createdAt, updatedAt · standaard: "createdAt"
  • order query · string
    Een van: asc, desc · standaard: "desc"

Antwoorden

StatusBetekenis
200Requested data with completeness and follow-up actions.
400Malformed request or unsupported parameter (for example client-sent tools).
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
404Workflow, run or deliverable not found or inaccessible.
409State conflict, stale If-Match, or cancellation unavailable for the current run state.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Developer API or a required backing service is unavailable.
curl
curl -s "https://api.prudai.com/v1/workflows" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "X-Product-Slug: leo"
CLI (binnenkort)
prudai leo workflows list

Create a workflow definition

POST /v1/workflows

Creates an editable definition after the app graph validation. next points to startWorkflowRun. Personal tokens and signed-in user tokens only; service keys are rejected. The same product, organisation, workflow capability and ownership rules as the app apply, including 403 workflows_upgrade_required for VERA without Pro.

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:workflows:write
  • Goedkeuring: none, geen extra stap.
  • Dry run: ?dryRun=true laat zien wat er zou gebeuren en slaat niets op.
  • Idempotentie: stuur Idempotency-Key mee; dezelfde sleutel met dezelfde body voert de actie niet twee keer uit.

Parameters

  • X-Product-Slug header · string verplicht
    Product context, checked against the current user and the workflow capability. Een van: leo, leo-fiscaal, zia, vera, bever, irma, maia
  • dryRun query · string
    Validate and preview without changing definitions, enqueuing jobs or recording gate decisions. Een van: true, false
  • Idempotency-Key header · string verplicht
    Client-chosen key. Retry the same request safely; changed arguments with the same key are rejected. min. lengte 8 · max. lengte 255 · patroon ^[\x21-\x7E]+$

Body

JSON, verplicht.

  • name string verplicht
    max. lengte 200
  • description string
    max. lengte 2000 · kan null zijn
  • graph WorkflowGraph verplicht
  • graph.nodes array<object> verplicht
  • graph.nodes[].id string verplicht
    max. lengte 128
  • graph.nodes[].type string verplicht
    Een van: input, persona, output, condition, hitl
  • graph.nodes[].label string verplicht
    max. lengte 300
  • graph.nodes[].prompt string
    max. lengte 20000
  • graph.nodes[].artifact_ref WorkflowArtifactRef
    Exact immutable source version or expected current output version. Version zero denotes the historical empty baseline where supported.
  • graph.nodes[].condition object
  • graph.nodes[].hitl object
  • graph.nodes[].v1Execution string
    Een van: noop-passthrough
  • graph.nodes[].description string
    max. lengte 4000
  • graph.nodes[].presetId string
    max. lengte 100
  • graph.nodes[].style string
    Een van: onderzoekend, strategisch, adversarieel
  • graph.nodes[].modelTier string
    Een van: mini, standard, pro
  • graph.nodes[].runWhenIntake object
  • graph.nodes[].machineTranslation object
  • graph.nodes[].documentPipeline object
  • graph.nodes[].slots object
  • graph.nodes[].statuteCheck boolean
  • graph.nodes[].inputSections array<object>
  • graph.nodes[].dossierTools boolean
  • graph.nodes[].promptAxes object
  • graph.nodes[].sourceIds array<string>
  • graph.nodes[].delivery array<object>
  • graph.nodes[].position object verplicht
  • graph.edges array<object> verplicht
  • graph.edges[].id string verplicht
    max. lengte 256
  • graph.edges[].source string verplicht
    max. lengte 128
  • graph.edges[].target string verplicht
    max. lengte 128
  • graph.edges[].branch string
    Een van: ja, nee

Antwoorden

StatusBetekenis
200Idempotent replay or dry-run preview.
201Completed. With dryRun=true, returns a preview without side effects.
400Malformed request or unsupported parameter (for example client-sent tools).
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
404Workflow, run or deliverable not found or inaccessible.
409State conflict, stale If-Match, or cancellation unavailable for the current run state.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Developer API or a required backing service is unavailable.
curl
curl -s -X POST "https://api.prudai.com/v1/workflows" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "X-Product-Slug: leo" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ ... }'
CLI (binnenkort)
prudai leo workflows create

Get a workflow definition

GET /v1/workflows/{id}

Personal tokens and signed-in user tokens only; service keys are rejected. The same product, organisation, workflow capability and ownership rules as the app apply, including 403 workflows_upgrade_required for VERA without Pro.

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:workflows:read
  • Goedkeuring: none, geen extra stap.

Parameters

  • X-Product-Slug header · string verplicht
    Product context, checked against the current user and the workflow capability. Een van: leo, leo-fiscaal, zia, vera, bever, irma, maia
  • id path · string (uuid) verplicht

Antwoorden

StatusBetekenis
200Requested data with completeness and follow-up actions.
400Malformed request or unsupported parameter (for example client-sent tools).
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
404Workflow, run or deliverable not found or inaccessible.
409State conflict, stale If-Match, or cancellation unavailable for the current run state.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Developer API or a required backing service is unavailable.

Velden in data (200)

  • id string
  • name string
  • description string
    kan null zijn
  • graph WorkflowGraph
  • graph.nodes array<object>
  • graph.nodes[].id string
    max. lengte 128
  • graph.nodes[].type string
    Een van: input, persona, output, condition, hitl
  • graph.nodes[].label string
    max. lengte 300
  • graph.nodes[].prompt string
    max. lengte 20000
  • graph.nodes[].artifact_ref WorkflowArtifactRef
    Exact immutable source version or expected current output version. Version zero denotes the historical empty baseline where supported.
  • graph.nodes[].condition object
  • graph.nodes[].hitl object
  • graph.nodes[].v1Execution string
    Een van: noop-passthrough
  • graph.nodes[].description string
    max. lengte 4000
  • graph.nodes[].presetId string
    max. lengte 100
  • graph.nodes[].style string
    Een van: onderzoekend, strategisch, adversarieel
  • graph.nodes[].modelTier string
    Een van: mini, standard, pro
  • graph.nodes[].runWhenIntake object
  • graph.nodes[].machineTranslation object
  • graph.nodes[].documentPipeline object
  • graph.nodes[].slots object
  • graph.nodes[].statuteCheck boolean
  • graph.nodes[].inputSections array<object>
  • graph.nodes[].dossierTools boolean
  • graph.nodes[].promptAxes object
  • graph.nodes[].sourceIds array<string>
  • graph.nodes[].delivery array<object>
  • graph.nodes[].position object
  • graph.edges array<object>
  • graph.edges[].id string
    max. lengte 256
  • graph.edges[].source string
    max. lengte 128
  • graph.edges[].target string
    max. lengte 128
  • graph.edges[].branch string
    Een van: ja, nee
  • organizationId string
    kan null zijn
  • createdBy string
  • productScope string
  • createdAt string
  • updatedAt string
curl
curl -s "https://api.prudai.com/v1/workflows/<id>" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "X-Product-Slug: leo"
CLI (binnenkort)
prudai leo workflows get

Update a workflow definition

PATCH /v1/workflows/{id}

Partial update. If-Match binds the previously read updatedAt: without it 428 precondition_required, a stale value 409 version_conflict. Personal tokens and signed-in user tokens only; service keys are rejected. The same product, organisation, workflow capability and ownership rules as the app apply, including 403 workflows_upgrade_required for VERA without Pro.

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:workflows:write
  • Goedkeuring: none, geen extra stap.
  • Dry run: ?dryRun=true laat zien wat er zou gebeuren en slaat niets op.
  • Gelijktijdig wijzigen: stuur If-Match mee met de versie die je las.

Parameters

  • X-Product-Slug header · string verplicht
    Product context, checked against the current user and the workflow capability. Een van: leo, leo-fiscaal, zia, vera, bever, irma, maia
  • id path · string (uuid) verplicht
  • dryRun query · string
    Validate and preview without changing definitions, enqueuing jobs or recording gate decisions. Een van: true, false
  • If-Match header · string verplicht
    The quoted updatedAt value from the last read. Missing returns 428 precondition_required; a stale value returns 409 version_conflict.

Body

JSON, verplicht.

  • name string
    max. lengte 200
  • description string
    max. lengte 2000 · kan null zijn
  • graph WorkflowGraph
  • graph.nodes array<object> verplicht
  • graph.nodes[].id string verplicht
    max. lengte 128
  • graph.nodes[].type string verplicht
    Een van: input, persona, output, condition, hitl
  • graph.nodes[].label string verplicht
    max. lengte 300
  • graph.nodes[].prompt string
    max. lengte 20000
  • graph.nodes[].artifact_ref WorkflowArtifactRef
    Exact immutable source version or expected current output version. Version zero denotes the historical empty baseline where supported.
  • graph.nodes[].condition object
  • graph.nodes[].hitl object
  • graph.nodes[].v1Execution string
    Een van: noop-passthrough
  • graph.nodes[].description string
    max. lengte 4000
  • graph.nodes[].presetId string
    max. lengte 100
  • graph.nodes[].style string
    Een van: onderzoekend, strategisch, adversarieel
  • graph.nodes[].modelTier string
    Een van: mini, standard, pro
  • graph.nodes[].runWhenIntake object
  • graph.nodes[].machineTranslation object
  • graph.nodes[].documentPipeline object
  • graph.nodes[].slots object
  • graph.nodes[].statuteCheck boolean
  • graph.nodes[].inputSections array<object>
  • graph.nodes[].dossierTools boolean
  • graph.nodes[].promptAxes object
  • graph.nodes[].sourceIds array<string>
  • graph.nodes[].delivery array<object>
  • graph.nodes[].position object verplicht
  • graph.edges array<object> verplicht
  • graph.edges[].id string verplicht
    max. lengte 256
  • graph.edges[].source string verplicht
    max. lengte 128
  • graph.edges[].target string verplicht
    max. lengte 128
  • graph.edges[].branch string
    Een van: ja, nee

Antwoorden

StatusBetekenis
200Completed. With dryRun=true, returns a preview without side effects.
400Malformed request or unsupported parameter (for example client-sent tools).
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
404Workflow, run or deliverable not found or inaccessible.
409State conflict, stale If-Match, or cancellation unavailable for the current run state.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
428If-Match is missing (precondition_required).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Developer API or a required backing service is unavailable.
curl
curl -s -X PATCH "https://api.prudai.com/v1/workflows/<id>" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "X-Product-Slug: leo" \
-H 'If-Match: "<etag>"' \
-H "Content-Type: application/json" \
-d '{ ... }'
CLI (binnenkort)
prudai leo workflows update

Soft-delete a workflow definition

DELETE /v1/workflows/{id}

Moves the definition to the trash: it leaves every list and the app, and POST /workflows/{id}/restore brings it back unchanged. Runs keep their own snapshot, so past and running runs are not affected. Waits for a reviewer (an owner or administrator, with a reason). The app’s own delete takes the same soft path. Personal tokens and signed-in user tokens only; service keys are rejected. The same product, organisation, workflow capability and ownership rules as the app apply, including 403 workflows_upgrade_required for VERA without Pro.

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:workflows:delete
  • Goedkeuring: review, een tweede persoon of rol keurt goed.
  • Dry run: ?dryRun=true laat zien wat er zou gebeuren en slaat niets op.
  • Verwijderen is zacht; zie Conventies.

Parameters

  • X-Product-Slug header · string verplicht
    Product context, checked against the current user and the workflow capability. Een van: leo, leo-fiscaal, zia, vera, bever, irma, maia
  • id path · string (uuid) verplicht
  • dryRun query · string
    Validate and preview without changing definitions, enqueuing jobs or recording gate decisions. Een van: true, false
  • x-prudai-approval header · string
    Approved one-use request id. Repeat the exact method, path, query and body. The grant is consumed before execution; obtain a new approval after a failed execution. Idempotency-Key is excluded from the approval fingerprint. patroon ^apr_[A-Za-z0-9]{24}$

Antwoorden

StatusBetekenis
200Completed. With dryRun=true, returns a preview without side effects.
202Waiting for human approval. Replay the exact request with its one-use approval grant.
400Malformed request or unsupported parameter (for example client-sent tools).
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
404Workflow, run or deliverable not found or inaccessible.
409State conflict, stale If-Match, or cancellation unavailable for the current run state.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Developer API or a required backing service is unavailable.
curl
curl -s -X DELETE "https://api.prudai.com/v1/workflows/<id>" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "X-Product-Slug: leo"
CLI (binnenkort)
prudai leo workflows delete

Restore a soft-deleted workflow definition

POST /v1/workflows/{id}/restore

Brings a soft-deleted definition back exactly as it was, with a fresh updatedAt. next points to startWorkflowRun. Personal tokens and signed-in user tokens only; service keys are rejected. The same product, organisation, workflow capability and ownership rules as the app apply, including 403 workflows_upgrade_required for VERA without Pro.

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:workflows:write
  • Goedkeuring: confirm, de gebruiker bevestigt precies deze aanroep.
  • Dry run: ?dryRun=true laat zien wat er zou gebeuren en slaat niets op.

Parameters

  • X-Product-Slug header · string verplicht
    Product context, checked against the current user and the workflow capability. Een van: leo, leo-fiscaal, zia, vera, bever, irma, maia
  • id path · string (uuid) verplicht
  • dryRun query · string
    Validate and preview without changing definitions, enqueuing jobs or recording gate decisions. Een van: true, false
  • x-prudai-approval header · string
    Approved one-use request id. Repeat the exact method, path, query and body. The grant is consumed before execution; obtain a new approval after a failed execution. Idempotency-Key is excluded from the approval fingerprint. patroon ^apr_[A-Za-z0-9]{24}$

Antwoorden

StatusBetekenis
200Completed. With dryRun=true, returns a preview without side effects.
202Waiting for human approval. Replay the exact request with its one-use approval grant.
400Malformed request or unsupported parameter (for example client-sent tools).
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
404Workflow, run or deliverable not found or inaccessible.
409State conflict, stale If-Match, or cancellation unavailable for the current run state.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Developer API or a required backing service is unavailable.
curl
curl -s -X POST "https://api.prudai.com/v1/workflows/<id>/restore" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "X-Product-Slug: leo"
CLI (binnenkort)
prudai leo workflows restore

Get curated templates and office workflows

GET /v1/workflows/catalog

Personal tokens and signed-in user tokens only; service keys are rejected. The same product, organisation, workflow capability and ownership rules as the app apply, including 403 workflows_upgrade_required for VERA without Pro.

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:workflows:read
  • Goedkeuring: none, geen extra stap.

Parameters

  • X-Product-Slug header · string verplicht
    Product context, checked against the current user and the workflow capability. Een van: leo, leo-fiscaal, zia, vera, bever, irma, maia

Antwoorden

StatusBetekenis
200Requested data with completeness and follow-up actions.
400Malformed request or unsupported parameter (for example client-sent tools).
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
404Workflow, run or deliverable not found or inaccessible.
409State conflict, stale If-Match, or cancellation unavailable for the current run state.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Developer API or a required backing service is unavailable.

Velden in data (200)

  • recommended array<object>
  • recommended[].id string
  • recommended[].engine string
    Een van: workflow, research
  • recommended[].nameKey string
  • recommended[].promiseKey string
  • recommended[].practiceAreas array<string>
  • recommended[].personaMiniGraph object
  • recommended[].personaMiniGraph.nodes array<object>
  • recommended[].personaMiniGraph.edges array<object>
  • recommended[].outputBadges array<string>
    Een van: memo-docx, tabel-matrix, chronologie, conceptbrief
  • recommended[].sourceStripIds array<string>
  • recommended[].optionalSourceIds array<string>
  • recommended[].durationCostClass string
    Een van: kort, middel, lang
  • recommended[].intake object
  • recommended[].intake.fields array<object>
  • all array<object>
  • all[].id string
  • all[].engine string
    Een van: workflow, research
  • all[].nameKey string
  • all[].promiseKey string
  • all[].practiceAreas array<string>
  • all[].personaMiniGraph object
  • all[].personaMiniGraph.nodes array<object>
  • all[].personaMiniGraph.edges array<object>
  • all[].outputBadges array<string>
    Een van: memo-docx, tabel-matrix, chronologie, conceptbrief
  • all[].sourceStripIds array<string>
  • all[].optionalSourceIds array<string>
  • all[].durationCostClass string
    Een van: kort, middel, lang
  • all[].intake object
  • all[].intake.fields array<object>
  • kantoor array<object>
  • kantoor[].id string
  • kantoor[].name string
  • kantoor[].description string
    kan null zijn
  • kantoor[].personaMiniGraph object
  • kantoor[].personaMiniGraph.nodes array<object>
  • kantoor[].personaMiniGraph.edges array<object>
  • kantoor[].organizationId string
    kan null zijn
  • kantoor[].updatedAt string
curl
curl -s "https://api.prudai.com/v1/workflows/catalog" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "X-Product-Slug: leo"
CLI (binnenkort)
prudai leo workflows catalog

Copy a curated template

POST /v1/workflows/templates/{id}/copy

Copies a curated template into an editable definition and reports anything omitted. next points to startWorkflowRun. Personal tokens and signed-in user tokens only; service keys are rejected. The same product, organisation, workflow capability and ownership rules as the app apply, including 403 workflows_upgrade_required for VERA without Pro.

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:workflows:write
  • Goedkeuring: none, geen extra stap.
  • Dry run: ?dryRun=true laat zien wat er zou gebeuren en slaat niets op.
  • Idempotentie: stuur Idempotency-Key mee; dezelfde sleutel met dezelfde body voert de actie niet twee keer uit.

Parameters

  • X-Product-Slug header · string verplicht
    Product context, checked against the current user and the workflow capability. Een van: leo, leo-fiscaal, zia, vera, bever, irma, maia
  • id path · string verplicht
    max. lengte 120 · patroon ^[a-z0-9]+(?:-[a-z0-9]+)*$
  • dryRun query · string
    Validate and preview without changing definitions, enqueuing jobs or recording gate decisions. Een van: true, false
  • Idempotency-Key header · string verplicht
    Client-chosen key. Retry the same request safely; changed arguments with the same key are rejected. min. lengte 8 · max. lengte 255 · patroon ^[\x21-\x7E]+$

Body

JSON, verplicht.

  • name string
    max. lengte 200
  • includeKernprompts boolean

Antwoorden

StatusBetekenis
200Idempotent replay or dry-run preview.
201Completed. With dryRun=true, returns a preview without side effects.
400Malformed request or unsupported parameter (for example client-sent tools).
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
404Workflow, run or deliverable not found or inaccessible.
409State conflict, stale If-Match, or cancellation unavailable for the current run state.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Developer API or a required backing service is unavailable.
curl
curl -s -X POST "https://api.prudai.com/v1/workflows/templates/<id>/copy" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "X-Product-Slug: leo" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"includeKernprompts": false
}'
CLI (binnenkort)
prudai leo workflows-templates copy

Pre-fill template intake from owned context

POST /v1/workflows/templates/{id}/intake-prefill

Uses only caller-authorised draft, conversation and dossier context. Missing or uncertain answers remain open. It runs directly, like the app; it may spend a small amount of credits on the pre-fill itself, while starting the run stays behind approval. Personal tokens and signed-in user tokens only; service keys are rejected. The same product, organisation, workflow capability and ownership rules as the app apply, including 403 workflows_upgrade_required for VERA without Pro.

  • Stand: binnenkort, nog niet op productie.
  • Scope: prudai:workflows:write
  • Goedkeuring: none, geen extra stap.
  • Dry run: ?dryRun=true laat zien wat er zou gebeuren en slaat niets op.

Parameters

  • X-Product-Slug header · string verplicht
    Product context, checked against the current user and the workflow capability. Een van: leo, leo-fiscaal, zia, vera, bever, irma, maia
  • id path · string verplicht
    max. lengte 120 · patroon ^[a-z0-9]+(?:-[a-z0-9]+)*$
  • dryRun query · string
    Validate and preview without changing definitions, enqueuing jobs or recording gate decisions. Een van: true, false

Body

JSON, verplicht.

  • draft string
    max. lengte 100000
  • conversationId string (uuid)
  • projectId string (uuid)
  • templateName string
    max. lengte 200

Antwoorden

StatusBetekenis
200Completed. With dryRun=true, returns a preview without side effects.
400Malformed request or unsupported parameter (for example client-sent tools).
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution).
404Workflow, run or deliverable not found or inaccessible.
409State conflict, stale If-Match, or cancellation unavailable for the current run state.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Developer API or a required backing service is unavailable.
curl
curl -s -X POST "https://api.prudai.com/v1/workflows/templates/<id>/intake-prefill" \
-H "Authorization: Bearer $PRUDAI_TOKEN" \
-H "X-Product-Slug: leo" \
-H "Content-Type: application/json" \
-d '{
"draft": "string",
"conversationId": "00000000-0000-4000-8000-000000000000",
"projectId": "00000000-0000-4000-8000-000000000000",
"templateName": "string"
}'
CLI (binnenkort)
prudai leo workflows-templates intake-prefill