Skip to main content

Workflows

Workflows let you orchestrate actions and call flows for your organization.

Authentication & scope

  • Header: X-API-Key: YOUR_API_KEY
  • Read operations: workflows:read
  • Write operations: workflows:write
  • Use API Reference for Try-it on every workflow endpoint.

POST /v1/workflows

Creates a workflow. Body is DTO-accurate to CreateWorkflowDto.

Bash

curl -X POST "https://api.indigenius.ai/v1/workflows" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Lead follow-up",
    "callbackUrl": "https://client.example.com/hooks/workflow",
    "webhook": {
      "url": "https://client.example.com/hooks/workflow"
    },
    "endCall": {
      "phrases": ["goodbye", "end call"]
    }
  }'

Node

const response = await fetch('https://api.indigenius.ai/v1/workflows', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-API-Key': process.env.INDIGENIUS_API_KEY,
  },
  body: JSON.stringify({
    title: 'Lead follow-up',
    callbackUrl: 'https://client.example.com/hooks/workflow',
    webhook: { url: 'https://client.example.com/hooks/workflow' },
    endCall: { phrases: ['goodbye', 'end call'] },
  }),
});
console.log(await response.json());

Python

import requests
payload = {
    "title": "Lead follow-up",
    "callbackUrl": "https://client.example.com/hooks/workflow",
    "webhook": {"url": "https://client.example.com/hooks/workflow"},
    "endCall": {"phrases": ["goodbye", "end call"]},
}
response = requests.post(
    "https://api.indigenius.ai/v1/workflows",
    headers={"X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json=payload,
    timeout=30,
)
print(response.status_code)
print(response.json())

Common status codes

  • 201 created
  • 400 validation error
  • 403 missing workflows:write
  • 500 server error

POST /v1/workflows/{id}/run

Triggers immediate workflow execution.

Bash

curl -X POST "https://api.indigenius.ai/v1/workflows/WORKFLOW_ID/run" \
  -H "X-API-Key: YOUR_API_KEY"

Node

const workflowId = 'WORKFLOW_ID';
const response = await fetch(
  `https://api.indigenius.ai/v1/workflows/${workflowId}/run`,
  {
    method: 'POST',
    headers: { 'X-API-Key': process.env.INDIGENIUS_API_KEY },
  },
);
console.log(await response.json());

Python

import requests
workflow_id = "WORKFLOW_ID"
response = requests.post(
    f"https://api.indigenius.ai/v1/workflows/{workflow_id}/run",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=30,
)
print(response.status_code)
print(response.json())

201 Created

{
  "status": true,
  "message": "Workflow execution started",
  "jobId": "job_01hxyz"
}

Common status codes

  • 201 execution started
  • 403 missing workflows:write
  • 404 workflow not found
  • 500 server error

GET /v1/workflows/jobs/{jobId}

Returns scheduler job status.

Bash

curl -X GET "https://api.indigenius.ai/v1/workflows/jobs/job_01hxyz" \
  -H "X-API-Key: YOUR_API_KEY"

Node

const jobId = 'job_01hxyz';
const response = await fetch(
  `https://api.indigenius.ai/v1/workflows/jobs/${jobId}`,
  {
    headers: { 'X-API-Key': process.env.INDIGENIUS_API_KEY },
  },
);
console.log(await response.json());

Python

import requests
job_id = "job_01hxyz"
response = requests.get(
    f"https://api.indigenius.ai/v1/workflows/jobs/{job_id}",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=30,
)
print(response.status_code)
print(response.json())

Common status codes

  • 200 success
  • 403 missing workflows:read
  • 404 job not found
  • 500 server error

POST /v1/workflows/schedule

Schedules workflow execution. Body is DTO-accurate to ScheduleWorkflowDto.

Bash

curl -X POST "https://api.indigenius.ai/v1/workflows/schedule" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workFlowId": "665e4a34c65bb95f2f2d72e1",
    "scheduledDate": "2026-07-01T09:00:00.000Z",
    "timezone": "GMT_plus_1"
  }'

Node

const response = await fetch(
  'https://api.indigenius.ai/v1/workflows/schedule',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'X-API-Key': process.env.INDIGENIUS_API_KEY,
    },
    body: JSON.stringify({
      workFlowId: '665e4a34c65bb95f2f2d72e1',
      scheduledDate: '2026-07-01T09:00:00.000Z',
      timezone: 'GMT_plus_1',
    }),
  },
);
console.log(await response.json());

Python

import requests
payload = {
    "workFlowId": "665e4a34c65bb95f2f2d72e1",
    "scheduledDate": "2026-07-01T09:00:00.000Z",
    "timezone": "GMT_plus_1",
}
response = requests.post(
    "https://api.indigenius.ai/v1/workflows/schedule",
    headers={"X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json=payload,
    timeout=30,
)
print(response.status_code)
print(response.json())

Common status codes

  • 201 scheduled
  • 400 validation error
  • 403 missing workflows:write
  • 500 server error

Other workflow endpoints

  • GET /v1/workflows
  • GET /v1/workflows/{id}
  • PATCH /v1/workflows/{id}
  • DELETE /v1/workflows/{id}
  • POST /v1/workflows/{id}/cancel
  • GET /v1/workflows/{id}/jobs
  • GET /v1/workflows/{id}/summary
  • GET /v1/workflows/{id}/summary/timeline
  • GET /v1/workflows/{id}/summary/report
Use API Reference Try-it for these endpoints with the same X-API-Key auth flow.
  1. Create workflow.
  2. Run once to validate behavior.
  3. Schedule if needed.
  4. Monitor jobs and summary endpoints.