# Automation & webhooks

Automation rules and runs, outgoing webhook endpoints and inbound webhook endpoints.

0 operation(s) for tokens, 55 app-only. The full schemas are in [openapi.json](https://docs.youniton.com/openapi.json) (search the operation ID).

## Rules the caller may read — tenant rules (Admins) and project rules (members with the project in scope)

`GET /automation-rules`

- Operation ID: `listAutomationRules`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-01

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `filter[scope]` | query | string | no |  |
| `filter[projectKey]` | query | string | no |  |
| `filter[status]` | query | string | no |  |
| `filter[module]` | query | string | no | G-HD-13 (XM-1286; owner §230 add. 102): only the rules and flows whose trigger or any step needs the module (the help-desk area's flow list); the counts follow it. |
| `filter[templateKey]` | query | array of string | no |  |
| `q` | query | string | no |  |
| `page[cursor]` | query | string | no | The opaque cursor of the previous page's links.next (05-api §5). |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | One page of rules, 50 at most. | application/json | `object` |
| 400 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Create a rule (blank or from a template) as a draft owned by the caller

`POST /automation-rules`

- Operation ID: `createAutomationRule`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-01

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |

Request body (application/json, required): `AutomationRuleCreateInput`

| Status | Description | Content type | Type |
|---|---|---|---|
| 201 | The new draft rule. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Archive a rule — it stops at once, for good; versions and history stay

`DELETE /automation-rules/{ruleId}`

- Operation ID: `archiveAutomationRule`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-01

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `ruleId` | path | string (uuid) | yes |  |
| `If-Match` | header | string | yes | The resource version in quotes (05-api §7.1); missing answers 428, different answers 412. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 204 | Archived (or already archived). |  |  |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 412 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## A rule with its active definition and draft, projected through the reader's access

`GET /automation-rules/{ruleId}`

- Operation ID: `getAutomationRule`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-01

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `ruleId` | path | string (uuid) | yes |  |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The rule. | application/json | `object` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Rename a rule or change its description

`PATCH /automation-rules/{ruleId}`

- Operation ID: `changeAutomationRuleDetails`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-01

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `ruleId` | path | string (uuid) | yes |  |
| `If-Match` | header | string | yes | The resource version in quotes (05-api §7.1); missing answers 428, different answers 412. |

Request body (application/json, required): `object`

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | Changed. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 412 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Activate the draft as a new immutable version; binds the caller's access and makes the caller the owner

`POST /automation-rules/{ruleId}/activate`

- Operation ID: `activateAutomationRuleVersion`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-05

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `ruleId` | path | string (uuid) | yes |  |
| `If-Match` | header | string | yes | The resource version in quotes (05-api §7.1); missing answers 428, different answers 412. |
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | Activated. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 412 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Discard the rule's draft

`DELETE /automation-rules/{ruleId}/draft`

- Operation ID: `discardAutomationRuleDraft`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-02

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `ruleId` | path | string (uuid) | yes |  |
| `If-Match` | header | string | yes | The resource version in quotes (05-api §7.1); missing answers 428, different answers 412. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 204 | Discarded (or there was none). |  |  |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 412 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Save the rule's draft definition, validated against the editor's own access; answers validation sentences

`PUT /automation-rules/{ruleId}/draft`

- Operation ID: `saveAutomationRuleDraft`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-02

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `ruleId` | path | string (uuid) | yes |  |
| `If-Match` | header | string | yes | The resource version in quotes (05-api §7.1); missing answers 428, different answers 412. |

Request body (application/json, required): `AutomationRuleDefinition`

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | Saved; warnings may be present. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 412 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 428 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Simulate the draft or the active version on a sample; nothing is written, emitted, sent or started

`POST /automation-rules/{ruleId}/dry-run`

- Operation ID: `dryRunAutomationRule`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-06

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `ruleId` | path | string (uuid) | yes |  |

Request body (application/json, required): `AutomationDryRunRequest`

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The simulation result. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Enable a paused rule; binds the caller's access to the active version and makes the caller the owner

`POST /automation-rules/{ruleId}/enable`

- Operation ID: `enableAutomationRule`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-05

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `ruleId` | path | string (uuid) | yes |  |
| `If-Match` | header | string | yes | The resource version in quotes (05-api §7.1); missing answers 428, different answers 412. |
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | Enabled. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 412 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The rule as a flow, with its draft, validation and AI block states

`GET /automation-rules/{ruleId}/flow`

- Operation ID: `getAutomationFlow`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-13

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `ruleId` | path | string (uuid) | yes |  |
| `version` | query | integer | no | One version of the rule in place of the active one, with no draft, through the same projection — the run view paints the boxes of the version that the run used (F-AUT-24 §13; XM-1295, G-AUA-16). An unknown version is 404. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The flow. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Save the flow's draft, validated against the editor's own access; answers validation sentences

`PUT /automation-rules/{ruleId}/flow-draft`

- Operation ID: `saveAutomationFlowDraft`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-13

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `ruleId` | path | string (uuid) | yes |  |
| `If-Match` | header | string | yes | The resource version in quotes (05-api §7.1); missing answers 428, different answers 412. |

Request body (application/json, required): `AutomationFlowDefinition`

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | Saved; warnings may be present. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 412 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 428 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Walk a flow on a sample; nothing is written, emitted or sent; a test run may call the model

`POST /automation-rules/{ruleId}/flow-test`

- Operation ID: `testAutomationFlow`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-23

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `ruleId` | path | string (uuid) | yes |  |

Request body (application/json, required): `AutomationFlowTestRequest`

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The walk. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Designate a new owner (Admins); the rule pauses until that member enables it with their own access

`PUT /automation-rules/{ruleId}/owner`

- Operation ID: `transferAutomationRuleOwnership`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-05

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `ruleId` | path | string (uuid) | yes |  |
| `If-Match` | header | string | yes | The resource version in quotes (05-api §7.1); missing answers 428, different answers 412. |

Request body (application/json, required): `object`

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | Designated; the rule is paused waiting for its new owner. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 412 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Pause an enabled rule

`POST /automation-rules/{ruleId}/pause`

- Operation ID: `pauseAutomationRule`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-05

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `ruleId` | path | string (uuid) | yes |  |
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | Paused (or already paused). | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Relay one content-free signal on the rule's presence channel: which step of the flow the person edits (owner, 23 Nov 2026)

`POST /automation-rules/{ruleId}/presence`

- Operation ID: `relayAutomationFlowPresence`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-14

`{activity: editing, stepId}` or `{activity: idle}`. An internal reader of the rule; `editing` needs the right to change it (`manage_automation` on a project rule, `administer` on a tenant rule). One signal per person per rule in the platform's relay window (`429`, `limiter: presence-relay`); an `idle` that ends an activity is exempt. Nothing is stored. Receivers get `RealtimePresenceFlow` (the Pusher event `presence`, to the others).

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `ruleId` | path | string (uuid) | yes |  |
| `X-Socket-ID` | header | string | no |  |

Request body (application/json, required): `FlowPresenceSignal`

| Status | Description | Content type | Type |
|---|---|---|---|
| 204 | Relayed, or nothing to end. |  |  |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The rule's presence channel — who has the flow open (owner, 23 Nov 2026 — real-time; ADR-033)

`GET /automation-rules/{ruleId}/realtime`

- Operation ID: `getAutomationRulePresenceChannel`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-14

A project rule's `presence-tenant.{t}.project.{p}.flow.{r}.v{n}` (the project's team epoch) or a tenant rule's `presence-tenant.{t}.automation.{r}.v{n}` (the tenant's team epoch: the tenant channel's epoch plus the tenant's team epoch). The SPA reads it when it opens the flow editor and again on `channels.rotated`. Internal readers of the rule only; anyone else 404. Presence only: the member's id, name, initials and colour.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `ruleId` | path | string (uuid) | yes |  |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The channel to join. | application/json | `object` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Run a schedule rule now (a manual run of the active version; a schema 1 rule or a flow on the schedule trigger)

`POST /automation-rules/{ruleId}/run`

- Operation ID: `runAutomationRuleNow`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-07

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `ruleId` | path | string (uuid) | yes |  |
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 202 | The run is queued. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## A rule's run history, newest first

`GET /automation-rules/{ruleId}/runs`

- Operation ID: `listAutomationRuleRuns`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-07

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `ruleId` | path | string (uuid) | yes |  |
| `filter[status]` | query | array of string | no |  |
| `filter[ticketKey]` | query | string | no |  |
| `page[cursor]` | query | string | no | The opaque cursor of the previous page's links.next (05-api §5). |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | One page of runs. | application/json | `object` |
| 400 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The last 50 matching events of the last 30 days that the caller (and, for the active version, the owner) can see

`GET /automation-rules/{ruleId}/sample-events`

- Operation ID: `listAutomationRuleSampleEvents`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-06

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `ruleId` | path | string (uuid) | yes |  |
| `target` | query | string | no |  |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | Sample events, newest first. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## A schedule rule's zone, next five occurrences and the last 50 missed occurrences

`GET /automation-rules/{ruleId}/schedule`

- Operation ID: `getAutomationRuleSchedule`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-03

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `ruleId` | path | string (uuid) | yes |  |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The schedule view. | application/json | `object` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Start a flow that has a manual trigger, with typed inputs

`POST /automation-rules/{ruleId}/start`

- Operation ID: `startAutomationFlow`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-15

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `ruleId` | path | string (uuid) | yes |  |
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |

Request body (application/json, required): `AutomationFlowStartInput`

| Status | Description | Content type | Type |
|---|---|---|---|
| 202 | The run exists and will run. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The rule's versions, newest first

`GET /automation-rules/{ruleId}/versions`

- Operation ID: `listAutomationRuleVersions`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-05

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `ruleId` | path | string (uuid) | yes |  |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | Versions (at most 100 per page, newest first). | application/json | `object` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## One version's definition, projected through the reader's access

`GET /automation-rules/{ruleId}/versions/{versionNumber}`

- Operation ID: `getAutomationRuleVersion`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-05

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `ruleId` | path | string (uuid) | yes |  |
| `versionNumber` | path | integer | yes |  |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The version. | application/json | `object` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## One run with its steps, effects and attempts

`GET /automation-runs/{runId}`

- Operation ID: `getAutomationRun`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-07

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `runId` | path | string (uuid) | yes |  |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The run. | application/json | `object` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## End a run that has not ended

`POST /automation-runs/{runId}/cancel`

- Operation ID: `cancelAutomationRun`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-24

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `runId` | path | string (uuid) | yes |  |
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The run ended. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Retry a failed, partially failed or refused admitted run — a new attempt of the same run; succeeded steps are never repeated

`POST /automation-runs/{runId}/retry`

- Operation ID: `retryAutomationRun`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-07

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `runId` | path | string (uuid) | yes |  |
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 202 | The attempt is queued. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The steps of a flow run, in order

`GET /automation-runs/{runId}/steps`

- Operation ID: `listAutomationRunSteps`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-24

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `runId` | path | string (uuid) | yes |  |
| `page[cursor]` | query | string | no | The opaque cursor of the previous page's links.next (05-api §5). |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | One page of the steps. | application/json | `object` |
| 400 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The approvals that name the caller as an eligible approver ("My approvals")

`GET /automation/approvals`

- Operation ID: `listAutomationApprovals`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-20

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `filter[state]` | query | string | no | XM-1293 (G-AUA-12): pending (default) = pending and stale, "Waiting for me"; decided = approved, rejected, expired and void. |
| `page[cursor]` | query | string | no | The opaque cursor of the previous page's links.next (05-api §5). |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The approvals, oldest first, with the counts of both segments. | application/json | `object` |
| 400 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | Not found (05-api §6.4; XM-787). The code is route.not_found (no route for the URL, a path value outside the route's pattern, or an audience outside the route's area), tenant.not_found (an unknown, foreign or inactive X-Kanso-Tenant) or <resource>.not_found (an unknown resource or a resource that the caller cannot see). A hidden resource and a missing resource get the same body: only instance and traceId change from call to call. | application/problem+json | `Problem` |

## One approval through the reader's projection

`GET /automation/approvals/{approvalId}`

- Operation ID: `getAutomationApproval`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-20

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `approvalId` | path | string (uuid) | yes |  |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The approval. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Approve or reject the exact proposal

`POST /automation/approvals/{approvalId}/decision`

- Operation ID: `decideAutomationApproval`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-20

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `approvalId` | path | string (uuid) | yes |  |
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |

Request body (application/json, required): `AutomationApprovalDecisionInput`

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The decision is recorded. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The block registry, triggers, actions and limits for a scope and the caller

`GET /automation/flow-schema`

- Operation ID: `getAutomationFlowSchema`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-13

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `projectKey` | query | string | no | Omitted for tenant flows. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The schema. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The flow templates by goal, with what each one needs

`GET /automation/flow-templates`

- Operation ID: `listAutomationFlowTemplates`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-25

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `projectKey` | query | string | no |  |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The templates. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | Not found (05-api §6.4; XM-787). The code is route.not_found (no route for the URL, a path value outside the route's pattern, or an audience outside the route's area), tenant.not_found (an unknown, foreign or inactive X-Kanso-Tenant) or <resource>.not_found (an unknown resource or a resource that the caller cannot see). A hidden resource and a missing resource get the same body: only instance and traceId change from call to call. | application/problem+json | `Problem` |

## The tenant's inbound endpoints

`GET /automation/inbound-endpoints`

- Operation ID: `listInboundEndpoints`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-22

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The endpoints. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | Not found (05-api §6.4; XM-787). The code is route.not_found (no route for the URL, a path value outside the route's pattern, or an audience outside the route's area), tenant.not_found (an unknown, foreign or inactive X-Kanso-Tenant) or <resource>.not_found (an unknown resource or a resource that the caller cannot see). A hidden resource and a missing resource get the same body: only instance and traceId change from call to call. | application/problem+json | `Problem` |

## Register an endpoint; the answer holds the secret, once

`POST /automation/inbound-endpoints`

- Operation ID: `createInboundEndpoint`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-22

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |

Request body (application/json, required): `InboundEndpointInput`

| Status | Description | Content type | Type |
|---|---|---|---|
| 201 | Created. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | Not found (05-api §6.4; XM-787). The code is route.not_found (no route for the URL, a path value outside the route's pattern, or an audience outside the route's area), tenant.not_found (an unknown, foreign or inactive X-Kanso-Tenant) or <resource>.not_found (an unknown resource or a resource that the caller cannot see). A hidden resource and a missing resource get the same body: only instance and traceId change from call to call. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Delete an endpoint that no enabled or paused flow names

`DELETE /automation/inbound-endpoints/{endpointId}`

- Operation ID: `deleteInboundEndpoint`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-22

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `endpointId` | path | string (uuid) | yes |  |
| `If-Match` | header | string | yes | The resource version in quotes (05-api §7.1); missing answers 428, different answers 412. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 204 | Deleted. |  |  |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 412 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 428 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## One endpoint, without its secret

`GET /automation/inbound-endpoints/{endpointId}`

- Operation ID: `getInboundEndpoint`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-22

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `endpointId` | path | string (uuid) | yes |  |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The endpoint. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Change the name, availability, address ranges or status

`PATCH /automation/inbound-endpoints/{endpointId}`

- Operation ID: `changeInboundEndpoint`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-22

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `endpointId` | path | string (uuid) | yes |  |
| `If-Match` | header | string | yes | The resource version in quotes (05-api §7.1); missing answers 428, different answers 412. |

Request body (application/json, required): `InboundEndpointInput`

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | Changed. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 412 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 428 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The call log of an endpoint

`GET /automation/inbound-endpoints/{endpointId}/calls`

- Operation ID: `listInboundCalls`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-22

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `endpointId` | path | string (uuid) | yes |  |
| `page[cursor]` | query | string | no | The opaque cursor of the previous page's links.next (05-api §5). |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The calls, newest first. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Issue a new secret, shown once; the previous one stays valid for 24 hours

`POST /automation/inbound-endpoints/{endpointId}/rotate-secret`

- Operation ID: `rotateInboundSecret`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-22

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `endpointId` | path | string (uuid) | yes |  |
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | Rotated. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The registries for the builder — triggers, attributes, operators, actions, placeholders — for a scope and the caller

`GET /automation/schema`

- Operation ID: `getAutomationSchema`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-02

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `projectKey` | query | string | no | Omitted for tenant rules. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The schema. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The open tasks of the caller

`GET /automation/tasks`

- Operation ID: `listAutomationTasks`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-20

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `page[cursor]` | query | string | no | The opaque cursor of the previous page's links.next (05-api §5). |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The tasks, by due time. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | Not found (05-api §6.4; XM-787). The code is route.not_found (no route for the URL, a path value outside the route's pattern, or an audience outside the route's area), tenant.not_found (an unknown, foreign or inactive X-Kanso-Tenant) or <resource>.not_found (an unknown resource or a resource that the caller cannot see). A hidden resource and a missing resource get the same body: only instance and traceId change from call to call. | application/problem+json | `Problem` |

## One task through the reader's projection

`GET /automation/tasks/{taskId}`

- Operation ID: `getAutomationTask`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-20

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `taskId` | path | string (uuid) | yes |  |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The task. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Complete a task with its typed values

`POST /automation/tasks/{taskId}/complete`

- Operation ID: `completeAutomationTask`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-20

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `taskId` | path | string (uuid) | yes |  |
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |

Request body (application/json, required): `AutomationHumanTaskInput`

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The task is done. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The template gallery — code-versioned rule definitions with their default instantiation

`GET /automation/templates`

- Operation ID: `listAutomationTemplates`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-09

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `projectKey` | query | string | no |  |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The templates. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The tenant's automation usage against its plan limits — enabled rules, runs today, webhook endpoints

`GET /automation/usage`

- Operation ID: `getAutomationUsage`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-12

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | Usage lines. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | Not found (05-api §6.4; XM-787). The code is route.not_found (no route for the URL, a path value outside the route's pattern, or an audience outside the route's area), tenant.not_found (an unknown, foreign or inactive X-Kanso-Tenant) or <resource>.not_found (an unknown resource or a resource that the caller cannot see). A hidden resource and a missing resource get the same body: only instance and traceId change from call to call. | application/problem+json | `Problem` |

## The runs that wait, oldest first; tenant-wide for an Admin, one flow for its manager

`GET /automation/waiting-runs`

- Operation ID: `listWaitingAutomationRuns`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-24

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `page[cursor]` | query | string | no | The opaque cursor of the previous page's links.next (05-api §5). |
| `ruleId` | query | string (uuid) | no |  |
| `kind` | query | string | no |  |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | One page of runs. | application/json | `object` |
| 400 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | Not found (05-api §6.4; XM-787). The code is route.not_found (no route for the URL, a path value outside the route's pattern, or an audience outside the route's area), tenant.not_found (an unknown, foreign or inactive X-Kanso-Tenant) or <resource>.not_found (an unknown resource or a resource that the caller cannot see). A hidden resource and a missing resource get the same body: only instance and traceId change from call to call. | application/problem+json | `Problem` |

## Re-send a failed or suppressed delivery's stored bytes under its original webhook-id, if still allowed

`POST /outbound-deliveries/{deliveryId}/redeliver`

- Operation ID: `redeliverOutboundDelivery`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-10

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `deliveryId` | path | string (uuid) | yes |  |
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 202 | Queued for sending. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The tenant's webhook endpoints (never their secrets)

`GET /webhook-endpoints`

- Operation ID: `listWebhookEndpoints`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-10

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | Endpoints. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | Not found (05-api §6.4; XM-787). The code is route.not_found (no route for the URL, a path value outside the route's pattern, or an audience outside the route's area), tenant.not_found (an unknown, foreign or inactive X-Kanso-Tenant) or <resource>.not_found (an unknown resource or a resource that the caller cannot see). A hidden resource and a missing resource get the same body: only instance and traceId change from call to call. | application/problem+json | `Problem` |

## Register an HTTPS endpoint; the answer carries its secret once

`POST /webhook-endpoints`

- Operation ID: `createWebhookEndpoint`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-10

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |

Request body (application/json, required): `WebhookEndpointInput`

| Status | Description | Content type | Type |
|---|---|---|---|
| 201 | Created; the secret is shown once. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | Not found (05-api §6.4; XM-787). The code is route.not_found (no route for the URL, a path value outside the route's pattern, or an audience outside the route's area), tenant.not_found (an unknown, foreign or inactive X-Kanso-Tenant) or <resource>.not_found (an unknown resource or a resource that the caller cannot see). A hidden resource and a missing resource get the same body: only instance and traceId change from call to call. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Delete an endpoint no rule names; pending deliveries are suppressed

`DELETE /webhook-endpoints/{endpointId}`

- Operation ID: `deleteWebhookEndpoint`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-10

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `endpointId` | path | string (uuid) | yes |  |
| `If-Match` | header | string | yes | The resource version in quotes (05-api §7.1); missing answers 428, different answers 412. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 204 | Deleted (or already deleted). |  |  |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 412 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Rename, repoint, open or close to project rules, pause, resume or disable an endpoint

`PATCH /webhook-endpoints/{endpointId}`

- Operation ID: `changeWebhookEndpoint`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-10

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `endpointId` | path | string (uuid) | yes |  |
| `If-Match` | header | string | yes | The resource version in quotes (05-api §7.1); missing answers 428, different answers 412. |

Request body (application/json, required): `WebhookEndpointInput`

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | Changed. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 412 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The endpoint's delivery log, newest first

`GET /webhook-endpoints/{endpointId}/deliveries`

- Operation ID: `listWebhookEndpointDeliveries`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-10

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `endpointId` | path | string (uuid) | yes |  |
| `filter[status]` | query | string | no |  |
| `filter[source]` | query | string | no | Keeps the deliveries of one kind of source (CFL-534). |
| `page[cursor]` | query | string | no | The opaque cursor of the previous page's links.next (05-api §5). |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | One page of deliveries (50). | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Rotate the secret; the previous one keeps signing for 24 hours; the new one is shown once

`POST /webhook-endpoints/{endpointId}/rotate-secret`

- Operation ID: `rotateWebhookEndpointSecret`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-10

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `endpointId` | path | string (uuid) | yes |  |
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | Rotated. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Send a signed test event now (never retried)

`POST /webhook-endpoints/{endpointId}/test`

- Operation ID: `sendWebhookEndpointTest`
- Call with: Session of the Youniton apps (app only)
- Feature: F-AUT-10

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `endpointId` | path | string (uuid) | yes |  |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The test outcome. | application/json | `object` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
