# Workflows and integrations API

Build, test, and run visual workflows, inspect connected support channels, and manage external integration installations via the dimmi REST API.

## Channels

- `GET /channels/{channel}/rooms` - List a Slack connection's channels: Lists the Slack channels a connection watches, removed ones included, with who counts as the customer in each and when a message becomes a conversation. Returns the channels with their mode, trigger, settings and status.
- `PATCH /channels/{channel}/rooms/{room}` - Change a Slack channel's handling: Changes who counts as the customer in one Slack channel, when a message there becomes a conversation, and how the agent answers. Only what is sent changes; a setting sent as null goes back to its default. Returns the channel as it now is.

## Integration installations

- `GET /integration-installations/{installation}/issues` - Search a tool's issues: Finds issues or incidents to link by words or key. Returns issues with key, URL, title and status.
- `GET /integration-installations/{installation}/issue-settings` - Get a tool's sync settings: Reads how a tool's statuses map to ticket states, its defaults and where it delivers. Returns the settings with webhook_url.
- `PATCH /integration-installations/{installation}/issue-settings` - Update a tool's sync settings: Maps a tool's status ids to ticket states and sets defaults, the deployment that proves a fix shipped and the signing secret of a key-connected tool. Returns the settings.

## Integration providers

- `GET /integration-providers` - List integration providers: Lists the tools this install can connect, whether each installs through its shared app, and the scopes each feature asks for. Installing one needs the person at a browser. Returns every provider with its features and their scopes.

## Integrations

- `GET /integrations` - List integrations: Lists the tools the workspace connected and the health of each. Returns every installation with its provider, status, scopes, what uses it and the person's own grant.
- `GET /integrations/{integration}` - Get an integration: Reads one connected tool: its health, scopes, the scopes features still miss and what uses it. Returns the installation with its features, channel_ids and last error.
- `DELETE /integrations/{integration}` - Disconnect an integration: Disconnects a tool: its tokens are given back and wiped, every teammate's grant on it is revoked, and the channels and destinations using it stop at once. Connecting it again needs the person at a browser. Returns nothing once it is disconnected.

## Workflows

- `GET /workflows` - List workflows: Lists the workflows in priority order: when several want the same conversation, the first wins. Each runs on a trigger, such as a first message or an SLA breach. Returns every workflow with its trigger, status, position and whether its draft differs from live.
- `GET /workflows/{workflow}/runs` - List a workflow's runs: Lists a workflow's recent runs with the steps each took, to see why it did what it did. Returns the runs, newest first, each with its trigger, status and step trace.
- `GET /workflows/{workflow}/failures` - List a workflow's failed runs: Lists the runs of a workflow where a step failed, newest first, each with its conversation. Returns the failed runs with the first failing step, and next_cursor for more.
- `GET /workflows/{workflow}/versions` - List a workflow's versions: Lists every published version of a workflow, newest first. Returns the versions with their number, note, who published them and their spec.
- `GET /workflows/{workflow}/simulations` - List a workflow's simulations: Lists the workflow's saved simulations and how each has gone lately. Returns the simulations with their messages, checks, last result and recent history.
- `GET /workflows/{workflow}/simulations/{simulation}/runs` - List a workflow simulation's past runs: Lists the latest runs of one simulation, newest first. Returns the runs with their verdict and when they ran.
- `POST /workflows` - Create a workflow: Creates a draft workflow at the end of the list, from a trigger or a whole definition. The trigger never changes later. Nothing runs until it is published. Returns the draft workflow.
- `POST /workflows/{workflow}/unarchive` - Unarchive a workflow: Brings an archived workflow back at the end of the list. One that was live comes back paused. Returns the workflow.
- `POST /workflows/{workflow}/simulations` - Save a workflow simulation: Saves a conversation the workflow must keep handling right: who the customer is, what they write, and the checks on the steps and paths it takes. Returns the saved simulation.
- `POST /workflows/{workflow}/publications` - Publish a workflow: Freezes the working copy as a new version and makes it live: new events run it for real customers, while conversations already running keep their version. Every error must be fixed first; warnings need the person's yes. Returns the workflow and the new version.
- `POST /workflows/{workflow}/simulations/run` - Run a workflow's simulations: Replays the workflow's saved simulations against its draft or live version, with nothing sent and no action run. A simulated customer taps buttons and answers questions, agent steps answer as the agent would, and a judge reads the result. Every run uses real models. Returns each simulation with its verdict, the trigger verdict and every step and path taken.
- `POST /workflows/{workflow}/simulations/from-conversation` - Save a conversation as a workflow simulation: Turns a real conversation into a simulation of the workflow. Returns the saved simulation.
- `GET /workflows/{workflow}` - Get a workflow: Reads one workflow with its working copy and the report of problems that would block publishing. Returns the workflow with its spec, report, lock_version and draft_hash.
- `GET /workflows/{workflow}/metrics` - Get a workflow's analytics: Reads a workflow's numbers over a range: runs started, completed, handed over and failed, its goal, each day, and each step's reached, waiting, failed and drop-off counts. Returns the workflow's numbers, with each step's by step id.
- `GET /workflows/{workflow}/simulations/{simulation}` - Get a workflow simulation: Reads one saved simulation of a workflow, with its last result step by step. Returns the simulation with its scenario, messages, checks and last result.
- `PATCH /workflows/{workflow}` - Change a workflow: Saves the working copy, which never changes what runs; or sets status live or paused; or restores a version, published at once with publish=true. Status and publish change what customers get immediately. Returns the workflow as it now is.
- `PATCH /workflows/{workflow}/simulations/{simulation}` - Edit a workflow simulation: Changes a saved simulation's name, scenario, messages, customer or checks. Returns the simulation as saved.
- `DELETE /workflows/{workflow}` - Archive a workflow: Archives a workflow: it stops matching at once and leaves the list. Its versions stay, and POST /workflows/{workflow}/unarchive brings it back.
- `DELETE /workflows/{workflow}/simulations/{simulation}` - Delete a workflow simulation: Deletes a saved simulation and its past runs. Returns nothing.
- `PATCH /workflows` - Reorder workflows: Sets the priority order of the workflows; the first wins when several want a conversation, so this changes what live workflows do. Returns the workflows in their new order.

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
