Skip to content

Workflows ​

All endpoints use an integration bearer token. There are two different IDs: a workflow template ID selects a workflow to assign, while an assignment ID identifies one employee's assigned workflow.

Workflow catalog ​

GET /api/v1/workflows

Returns HTTP 200 with { data: [...] }, containing the latest published, non-archived version per workflow template, sorted by name. Entries have id, name, version, status, and updated_at. Draft versions are excluded, so status is always published. The catalog is not paginated.

A workflow's ID stays valid when a new version is published. Any version's ID identifies the whole workflow, and without a pinned version it always uses the latest published, non-archived version. You can store the ID once and keep using it.

bash
curl -H 'Authorization: Bearer YOUR_INTEGRATION_TOKEN' \
  'https://YOUR-INSTANCE/api/v1/workflows'

Workflow requirements ​

GET /api/v1/workflows/{workflowId}

Use a template ID from the catalog. Add ?version=N to read a specific published version instead of the latest one. Returns HTTP 200 with:

  • workflow: catalog summary of the version used.
  • parameters: { key, label, type, required, defaultValue? } entries. Types are date, text, user, or enum.
  • roles: { roleId, roleKey, roleName, required, allowedTypes, default } entries. A role is required unless its default is a shared inbox. allowedTypes contains internalUser, and also externalEmail unless the role must be an internal user. Defaults are an internal user, an external email, a shared inbox ({ type: "pool", poolId, poolName }), or null. Leave a role with a shared inbox default out of assignees to send its tasks to the shared inbox, or name a user or email to override it.

startDate is always listed and required. offerDate is always listed, and required when the workflow uses an offer-accepted anchor. Custom workflow dates appear as dates.ANCHOR_KEY entries of type date. Other keys match workflow placeholders. An unknown, archived or draft-only template returns 404. A pinned version that does not exist, is not published or is archived returns 404 with Workflow version not found. A version that is not a positive integer returns 400.

bash
curl -H 'Authorization: Bearer YOUR_INTEGRATION_TOKEN' \
  'https://YOUR-INSTANCE/api/v1/workflows/WORKFLOW_TEMPLATE_ID'

Assign a workflow ​

POST /api/v1/employees/{employeeId}/workflows

Use an existing, non-archived employee ID and a published workflow template ID. The latest published version starts. To start a specific version, add workflowVersion (a positive integer); it must be published and not archived, or the request returns 404 with Workflow version not found. Send Content-Type: application/json:

json
{
  "workflowId": "WORKFLOW_TEMPLATE_ID",
  "parameters": {
    "startDate": "2026-11-02",
    "offerDate": "2026-10-20",
    "dates": {"EQUIPMENT_DELIVERY": "2026-10-28"}
  },
  "assignees": {
    "role_id:ROLE_ID": {"type": "internalUser", "userId": "USER_ID"}
  }
}
bash
curl -X POST -H 'Authorization: Bearer YOUR_INTEGRATION_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"workflowId":"WORKFLOW_TEMPLATE_ID","parameters":{"startDate":"2026-11-02"}}' \
  'https://YOUR-INSTANCE/api/v1/employees/EMPLOYEE_ID/workflows'

assignees is optional when organisation defaults satisfy every required role. Keys can be role_id:{roleId} or the returned roleKey. Values are { "type": "internalUser", "userId": "..." } or { "type": "externalEmail", "email": "..." }, subject to each role's allowedTypes. Internal user IDs must belong to the organisation.

Each role is resolved in this order: the assignee you send, then the organisation default for the role, then, for a role named Direct Manager, Hiring Manager or Manager, the employee's manager in WeekOne. If none of these gives a value, the request fails with Assignee required for role .... The requirements response still lists a manager role as required, because the fallback depends on the employee. A workflow needs every role that owns a step, signs a document or supplies a field on a signing step, or is referred to by a variable in a step's text, condition or configuration, so roles can list a role that owns no step.

An error starting User not found in organisation. on a role means the user ID for that role, whether sent or taken from the organisation default, is not an active user of the organisation. For a role that signs (allowedTypes is only internalUser) the message goes on to say so: such a role cannot use an email default, so send an internalUser for it, or set a user or shared inbox as the role's default in WeekOne.

Use calendar dates in YYYY-MM-DD form. offerDate cannot be after startDate. Put custom workflow dates in the parameters.dates object, keyed by the anchor key from the requirements response (dates.ANCHOR_KEY there); send required ones. START_DATE, OFFER_ACCEPTED and PREREQUISITES_COMPLETED cannot be sent in dates. Supply required placeholder values; unknown parameter keys, workflow dates and role keys are rejected.

Success is HTTP 201:

json
{"assignment":{"id":"ASSIGNMENT_ID","workflowId":"WORKFLOW_TEMPLATE_ID","workflowVersion":1,"employeeId":"EMPLOYEE_ID","status":"IN_PROGRESS"}}

The status is the stored assignment status; do not hard-code it from this illustrative example. Validation failures return HTTP 400:

json
{"error":"Validation failed.","code":"VALIDATION_FAILED","fields":{"parameters.startDate":["startDate is required."]}}

If the employee already has an assignment of any version of the same workflow that is not completed or archived, the request returns HTTP 409 with code: "DUPLICATE_ACTIVE_ASSIGNMENT". Missing employees or templates return 404. This endpoint does not support an idempotency key; inspect existing assignments before retrying an ambiguous submission.

Assigned workflows ​

GET /api/v1/employees/{employeeId}/workflows

Returns HTTP 200 with { data: [...] }, oldest assignment first. Each entry has workflowId (assignment ID), name, stepsCompleted, stepsTotal, status, offerAcceptedDate, startDate, progressPercent, workflowAssignees (roleName, assignee, email, type: user, email or pool; for a shared inbox (pool), assignee is the shared inbox name and email is null), steps, and isArchived. Workflow and step statuses are PLANNED, READY, IN_PROGRESS, BLOCKED, OVERDUE, or COMPLETED; steps can also be SKIPPED.

Steps contain title, assigneeRole, assignee, assigneePool (the shared inbox name, or null), status, assignedAt, completedAt, dueAt, and dayDelta. dayDelta is a string such as +2 days or -1 day, measured from the due date to completion or to today. Dates can be null; a step with no due date has dueAt: null and dayDelta: null. Skipped steps do not count toward progress.

bash
curl -H 'Authorization: Bearer YOUR_INTEGRATION_TOKEN' \
  'https://YOUR-INSTANCE/api/v1/employees/EMPLOYEE_ID/workflows?includeArchived=true'

Assigned workflow detail ​

GET /api/v1/employees/{employeeId}/workflows/{assignmentId}

Returns one assigned workflow object with the same fields as the list entries, without a data wrapper. Use an assignment ID returned by the list or assignment-creation response. Despite the route's historical workflowId parameter name, a template ID will not identify the employee's assignment. Accepts includeArchived=true; returns 404 when the assignment is unavailable for this employee.

bash
curl -H 'Authorization: Bearer YOUR_INTEGRATION_TOKEN' \
  'https://YOUR-INSTANCE/api/v1/employees/EMPLOYEE_ID/workflows/ASSIGNMENT_ID'