# Publish a workflow

```http
POST https://trydimmi.com/api/v1/workflows/{workflow}/publications
```

## Authorization

Send an API token as `Authorization: Bearer <token>`.
The token needs: `workflows:write`.

## Path parameters

- `workflow` (string, required): Id of the workflow, starting with wf_, such as wf_01jx2m8k4t. Find it with GET /workflows.

## Body

- `acknowledge_warnings` (boolean): true publishes despite warnings; set it only after showing them to the person.
- `draft_hash` (string): The draft_hash you reviewed, so a copy changed since is not published.
- `note` (string): What changed, for the history, up to 280 characters.

## Response 200 (OK)

- `data` (object, required)
  - `version` (object, required)
    - `created_at` (string, required): When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
    - `id` (string, required): The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
    - `kind` (string, required): Whether this version talks to the customer or works behind the scenes: customer_facing or background.
    - `note` (string | null, required): A note the publisher left about this version, up to 280 characters. Null when none was left.
    - `number` (integer, required): The version's number within its workflow, counting up from 1.
    - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
    - `published_by_member_id` (string | null, required): Id of the member who published this version, such as mem_.... Null when unknown or the member is gone.
    - `published_via` (string | null, required): How the version was published, such as session for a person signed in. Null when not recorded.
    - `restored_from_version_id` (string | null, required): Id of the older version this one was restored from, such as wfv_.... Null when it was not a restore.
    - `spec` (any, required): The frozen workflow definition this version holds, as an object. It never changes.
    - `workflow_id` (string, required): Id of the workflow this version belongs to, such as wf_....
  - `workflow` (object, required)
    - `archived` (boolean, required): True when the workflow has been archived (deleted).
    - `created_at` (string, required): When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
    - `description` (string | null, required): A note saying what the workflow is for, up to 500 characters. Null when none is set.
    - `draft_hash` (string, required): Fingerprint of the working copy; it changes whenever the working copy's definition changes.
    - `has_unpublished_changes` (boolean, required): True when the working copy differs from what is live, or nothing has been published yet.
    - `id` (string, required): The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
    - `kind` (string, required): Whether the workflow talks to the customer or works behind the scenes: customer_facing or background.
    - `live_version_id` (string | null, required): Id of the published version conversations run on, such as wfv_.... Null when nothing is published.
    - `lock_version` (integer, required): A number that goes up with each edit; it stops two editors from overwriting each other.
    - `name` (string, required): The workflow's name, 1 to 80 characters.
    - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
    - `paused_at` (string | null, required): When the workflow was paused. Null when it is not paused.
    - `position` (integer, required): The workflow's place in the list, which is also its priority when several workflows want the same conversation; lower first.
    - `published_at` (string | null, required): When the workflow was last published. Null when it never was.
    - `report` (object)
      - `errors` (object[] | null, required): Problems in the workflow's definition that stop it from being published, each with a code, a message and the step, path and field it is about.
        - `code` (string, required): Short code of the problem found in the workflow definition, such as http_raw_url.
        - `field` (string): The field of the step the problem is in. Left out when it is not about one field.
        - `message` (string, required): What is wrong, in words.
        - `path_id` (string): Id of the path inside the workflow the problem is on. Left out when it is not about one path.
        - `step_id` (string): Id of the step inside the workflow the problem is on. Left out when it is not about one step.
      - `warnings` (object[] | null, required): Issues that do not stop a publish but must be acknowledged by the publisher, each with a code, a message and the step it is about.
        - `code` (string, required): Short code of the problem found in the workflow definition, such as http_raw_url.
        - `field` (string): The field of the step the problem is in. Left out when it is not about one field.
        - `message` (string, required): What is wrong, in words.
        - `path_id` (string): Id of the path inside the workflow the problem is on. Left out when it is not about one path.
        - `step_id` (string): Id of the step inside the workflow the problem is on. Left out when it is not about one step.
    - `spec` (any): The workflow's working copy: its steps and settings as an object. Present only when one workflow is read, left out in lists.
    - `status` (string, required): Where the workflow stands: draft (never live), live (running on conversations) or paused.
    - `test_on_test_conversations` (boolean, required): The workflow's setting for running on test conversations, true or false.
    - `trigger` (string, required): The event that starts the workflow, fixed for its life, such as conversation.first_message, message.customer or ticket.created.
    - `updated_at` (string, required): When it last changed, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.

## Response default (Error)

- `code` (string, required): Stable code for programs to tell errors apart, such as validation_failed or internal_error.
- `errors` (object): Each rejected field mapped to its messages. Only present when the input was invalid.
- `message` (string, required): What went wrong, in words safe to show a person.

## Example request

```bash
curl --request POST \
  --url 'https://trydimmi.com/api/v1/workflows/{workflow}/publications' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "acknowledge_warnings": true,
  "draft_hash": "<string>",
  "note": "<string>"
}'
```

## Example response

```json
{
  "data": {
    "version": {
      "created_at": "2026-11-01T09:30:00Z",
      "id": "<string>",
      "kind": "<string>",
      "note": "<string>",
      "number": 123,
      "object": "<string>",
      "published_by_member_id": "<string>",
      "published_via": "<string>",
      "restored_from_version_id": "<string>",
      "spec": null,
      "workflow_id": "<string>"
    },
    "workflow": {
      "archived": true,
      "created_at": "2026-11-01T09:30:00Z",
      "description": "<string>",
      "draft_hash": "<string>",
      "has_unpublished_changes": true,
      "id": "<string>",
      "kind": "<string>",
      "live_version_id": "<string>",
      "lock_version": 123,
      "name": "<string>",
      "object": "<string>",
      "paused_at": "2026-11-01T09:30:00Z",
      "position": 123,
      "published_at": "2026-11-01T09:30:00Z",
      "report": {
        "errors": [
          {}
        ],
        "warnings": [
          {}
        ]
      },
      "spec": null,
      "status": "<string>",
      "test_on_test_conversations": true,
      "trigger": "<string>",
      "updated_at": "2026-11-01T09:30:00Z"
    }
  }
}
```

---

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