POST
/
workflows
/
{workflow_id}
/
run
/
{document_id}
JavaScript
import Morphik from 'morphik';

const client = new Morphik({
  apiKey: 'My API Key',
});

const workflowRun = await client.workflows.run('document_id', { workflow_id: 'workflow_id' });

console.log(workflowRun.document_id);
{
  "id": "<string>",
  "workflow_id": "<string>",
  "document_id": "<string>",
  "user_id": "<string>",
  "app_id": "<string>",
  "status": "queued",
  "started_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z",
  "results_per_step": [
    {}
  ],
  "final_output": {},
  "error": "<string>",
  "system_metadata": {}
}

Headers

authorization
string

Path Parameters

workflow_id
string
required
document_id
string
required

Response

200
application/json

Successful Response

Represents a concrete execution of a Workflow against a document.