# Reply to the customer

```http
POST https://trydimmi.com/api/v1/conversations/{conversation}/replies
```

## Authorization

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

## Path parameters

- `conversation` (string, required): Id of the conversation, such as conv_01jx2m8k4t, or its number, such as 1042 for #1042. Find it with GET /conversations or GET /search.

## Body

- `attachment_ids` (string[] | null): Up to 10 ids (att_...) of files already uploaded.
- `author_id` (string): Import only: the teammate (mem_...) who wrote it; you by default.
- `body` (string, required): The reply in Markdown, written to the customer. Never include notes, secrets or other customers' details. A reply needs a body or at least one attachment.
- `client_message_id` (string): A unique string, so a retried call finds the first reply instead of sending twice.
- `created_at` (string): Import only (needs imports:manage): when the reply was written, RFC 3339, not before the conversation's latest entry. Nothing is sent and nothing reacts.
- `delay` (boolean): Ignored for agents: only replies sent from the dashboard wait for undo.
- `expected_last_message_id` (string): The newest message (msg_...) you read. The reply is refused if the customer wrote since, so you never answer a question that changed.
- `external_id` (string): Import only: the reply's id in the tool it comes from; sending it again returns the first copy.
- `snooze` (object)
  - `option` (string): The key of one of this conversation's snooze choices, from GET /snooze-options, at most 40 characters. With then=snooze send exactly one of until, preset or option.
  - `preset` (string): When the snooze ends, as a preset: later_today, tomorrow, next_week or one_week, such as "tomorrow". With then=snooze send exactly one of until, preset or option.
  - `until` (string): When the snooze ends, as an ISO 8601 time, such as 2026-12-01T09:00:00Z. With then=snooze send exactly one of until, preset or option.
- `then` (string): What the conversation does after sending: keep (default), open, close or snooze.

## Response 201 (Created)

- `data` (object, required)
  - `ai` (object, required)
    - `action_call` (object)
      - `action` (object)
        - `name` (string, required): The key of the action the agent ran.
        - `title` (string, required): The action's name as people read it.
      - `arguments` (object): The values the agent passed to the action. Shown to the team only; left out for customers.
      - `decided_by` (object)
        - `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.
        - `name` (string, required): Display name of the teammate who approved or declined the action call.
      - `decision_reason` (string): Why a teammate approved or declined the call, in their words. Shown to the team only; left out when none was given.
      - `expires_at` (string): When a call waiting for a decision lapses. Shown to the team only; left out when it does not expire.
      - `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.
      - `result_summary` (string): What the action came to, in words. Shown to the team only; left out until there is a result.
      - `state` (string, required): Where the call stands: awaiting_verification, awaiting_confirmation, pending_approval, approved, declined, expired, canceled, running, succeeded or failed.
      - `summary` (string, required): One line saying what the change is, written from its arguments.
    - `confirmation` (object)
      - `action_call_id` (string, required): Id of the action call waiting for the customer's yes, starting with aax_. Send it to confirm or cancel the change.
      - `details` (object[] | null, required): The lines of the confirmation card, each a label and a value; empty when there are none.
        - `label` (string, required): Name of one line on the confirmation card the customer is asked to approve, such as "Amount".
        - `value` (string, required): The value shown beside that line's label on the confirmation card.
      - `expires_at` (string | null, required): When the confirmation lapses if the customer does not answer. Null when it does not expire.
      - `status` (string, required): Where the call stood when the card was written, such as awaiting_confirmation, succeeded, canceled or expired.
      - `text` (string, required): The summary of the change the customer is asked to confirm, written from its arguments.
      - `title` (string, required): The card's title: the name of the change.
    - `generated` (boolean, required): True when the AI agent wrote this message.
    - `outcome` (string): How the agent's run ended, such as answered, handoff, unknown, greeted or refused. Left out when not recorded.
    - `run_id` (string): Id of the agent run that wrote the message, starting with air_. Shown to the team only; left out for customers.
    - `sources` (object[] | null, required): The sources the answer cites, each with a title and address; empty when it cites none.
      - `excerpt` (string): A line or two of what the cited source says: a help article's description, or the start of the passage the answer drew on. Left out for a source customers may not read.
      - `slug` (string): Slug of the published help article the source is, for opening it in a help center or the messenger. Left out when the source is not a public help article.
      - `title` (string, required): Title of a source the AI answer cites, such as a help article's title.
      - `url` (string, required): Web address of the cited source, for checking the answer against it.
  - `attachments` (object[] | null, required): Files sent with the entry. Empty when there are none or the entry was deleted.
    - `blocked` (boolean, required): True when the malware scan refused the file, so it cannot be downloaded.
    - `content_id` (string | null, required): The id an email's text uses to show this picture in place, written there as cid:<content id>. Null for an ordinary attachment.
    - `content_type` (string, required): The file's media type, such as image/png or application/pdf.
    - `filename` (string, required): The file's name, such as invoice.pdf.
    - `height` (integer | null, required): Height of an image in pixels. Null when it is not known or the file is not an image.
    - `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.
    - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
    - `scanned` (boolean, required): True when the malware scan found the file clean. A file with a url that is not scanned was never checked.
    - `size_bytes` (integer, required): The file's size in bytes.
    - `url` (string | null, required): A link that reads the file for a few minutes; fetch it again when it lapses. Null until the malware scan lets the file through.
    - `width` (integer | null, required): Width of an image in pixels. Null when it is not known or the file is not an image.
  - `author` (object, required)
    - `avatar_url` (string | null, required): Link to the author's picture. Null when they have none.
    - `id` (string | null, required): The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
    - `name` (string, required): The author's name as shown on the entry.
    - `type` (string, required): Who wrote the entry: contact, member, agent (the AI), system or integration.
  - `body` (string | null, required): The entry's text, read as body_format says. Null once the entry is deleted.
  - `body_format` (string, required): How to read body: markdown, or plain for text a customer typed in a mail client, which is never markup.
  - `broadcast` (object)
    - `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.
    - `name` (string, required): Name of the broadcast this message went out with.
  - `conversation_id` (string, required): Id of the conversation the entry belongs to, such as conv_....
  - `created_at` (string, required): When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
  - `deleted_at` (string | null, required): When the entry was deleted; it keeps its place with its text gone. Null when not deleted.
  - `deleted_by` (object, required)
    - `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.
    - `name` (string, required): Name of the teammate who deleted the entry.
  - `delivery_error` (string | null, required): Why sending the message to the customer failed. Null when it did not fail.
  - `delivery_status` (string | null, required): How far a message to the customer got: pending, sent, delivered, read or failed; not_applicable for entries that are not delivered anywhere.
  - `edited_at` (string | null, required): When the entry's text was last edited. Null when never edited.
  - `event` (any, required): For an entry of type event, an object saying what happened, such as an assignment. Null for messages and notes.
  - `has_original` (boolean, required): True when an email's whole text, quoted thread included, is kept and can be asked for beyond what body shows.
  - `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.
  - `mentions` (object[] | null, required): The teammates and teams a note names, with their names. Empty for anything but a note.
    - `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.
    - `name` (string, required): The mentioned teammate's or team's name as it was when the note was written.
    - `type` (string, required): What the note mentions: member or team.
  - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
  - `reactions` (object[] | null, required): A note's emoji reactions, each with who reacted. Empty for anything but a note.
    - `count` (integer, required): How many teammates reacted to the note with this emoji.
    - `emoji` (string, required): The emoji teammates reacted with, such as 👍.
    - `member_ids` (string[] | null, required): Ids of the teammates who reacted with it, in the order they did (each starts with mem_).
  - `read_at` (string | null, required): When the customer saw a teammate's or AI agent's reply. Null when not seen or when the channel does not report it; email never does.
  - `redactions` (object[] | null): The redaction rules that changed the text before it was stored, each with its rule and how many matches it replaced. Left out when none did.
    - `count` (integer, required): How many matches this redaction rule replaced.
    - `rule` (string, required): The key of the redaction rule that matched.
  - `scheduled_send_at` (string | null, required): When a reply still waiting to leave will be sent; its writer may undo it until then. Null otherwise.
  - `sent_at` (string | null, required): When the message was sent. Null when it has not been sent.
  - `source_deleted_at` (string | null, required): When the author deleted the message where they wrote it, such as in Slack; its text is kept. Null when they did not.
  - `substantive` (boolean, required): True for a real message exchanged with the customer; false for notes, events and automatic messages.
  - `truncated` (boolean, required): True when an email's body was cut at the size limit.
  - `type` (string, required): What the entry is: message (exchanged with the customer), note (internal, never shown to the customer) or event (something that happened, such as an assignment).
  - `updated_at` (string, required): When it last changed, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
- `meta` (object, required)
  - `conversation` (object, required)
    - `ai_handoff_reason` (string | null, required): Why the AI agent stepped aside, such as customer_requested, unknown, max_replies, frustration, safety or human_replied. Null when it has not handed off.
    - `ai_pending_approvals` (integer, required): How many of the AI agent's actions in this conversation are waiting for a teammate to approve them.
    - `ai_reply_count` (integer, required): How many replies the AI agent has sent in this conversation.
    - `ai_state` (string, required): Who may speak next: off (the AI agent is not in it), active (the agent answers) or handed_off (only humans from now on).
    - `assignee` (object, required)
      - `avatar_url` (string | null, required): Address of the teammate's picture, or null when they have none.
      - `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.
      - `name` (string, required): The teammate's name.
      - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
    - `assignment_wait` (object, required)
      - `reason` (string, required): Why the conversation waits for an assignee: no_available_member or all_at_capacity.
      - `since` (string, required): When the conversation started waiting for an assignee.
    - `channel` (object, required)
      - `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.
      - `name` (string, required): The name the team gave this channel connection.
      - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
      - `type` (string, required): The kind of channel: widget, email, api, slack, whatsapp, facebook or instagram.
    - `closed_at` (string | null, required): When the conversation was closed. Null when it has never been closed.
    - `contact` (object, required)
      - `avatar_url` (string | null, required): URL of the contact's picture. Null when they have none.
      - `email` (string | null, required): The contact's email address. Null when unknown.
      - `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): How well the contact is known: user when your app identified them, lead for anyone else.
      - `name` (string | null, required): The contact's name. Null when unknown.
      - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
      - `timezone` (string | null, required): The contact's IANA time zone, such as Europe/Berlin, for reading times in their local time. Null when unknown.
    - `created_at` (string, required): When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
    - `first_customer_message_at` (string | null, required): When the customer first wrote in this conversation. Null when they have not written yet.
    - `first_reply_at` (string | null, required): When the customer got their first reply. Null when nobody has replied 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.
    - `inbox` (object, required)
      - `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.
      - `name` (string, required): Display name of the inbox, team or member this short form stands for.
      - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
    - `last_activity_at` (string | null, required): When anything last happened in the conversation. Null when nothing has yet.
    - `last_message` (object, required)
      - `author` (object, required)
        - `avatar_url` (string | null, required): Link to the author's picture. Null when they have none.
        - `id` (string | null, required): The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
        - `name` (string, required): The author's name as shown on the entry.
        - `type` (string, required): Who wrote the entry: contact, member, agent (the AI), system or integration.
      - `created_at` (string, required): When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
      - `excerpt` (string, required): Start of the message as plain text, cut to 140 characters with a trailing … when longer. Empty when the message has no body.
      - `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.
      - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
      - `type` (string, required): Kind of timeline entry: message, note or event.
    - `last_message_at` (string | null, required): When the latest message was written. Null when there are no messages.
    - `message_count` (integer, required): How many messages the conversation holds.
    - `number` (integer, required): The human reference number, such as 1042 for #1042. Unique within the workspace and never reused.
    - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
    - `priority` (string, required): How urgent the conversation is: none, low, medium, high or urgent.
    - `snoozed_until` (string | null, required): When a snoozed conversation wakes and reopens. Null unless status is snoozed.
    - `spam` (boolean, required): True when the conversation is marked as spam. A flag beside status, so unmarking it restores where it stood.
    - `status` (string, required): Where the conversation stands: open (needs the team), snoozed (until snoozed_until) or closed.
    - `subject` (string | null, required): The conversation's subject line. Null when it has none.
    - `tags` (object[] | null, required): The tags on the conversation, each with its id and name. Empty when it has none.
      - `color` (string | null, required): The tag's color as a hex value, such as #ff5500, kept as the workspace wrote it; null when it has none.
      - `icon` (string | null, required): Name of the tag's icon; null when it has none.
      - `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.
      - `name` (string, required): The tag's name.
      - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
    - `team` (object, required)
      - `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.
      - `name` (string, required): Display name of the inbox, team or member this short form stands for.
      - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
    - `unread` (boolean, required): True when the conversation has something the calling member has not read. Judged for the caller, not for the whole team.
    - `updated_at` (string, required): When it last changed, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
    - `viewers` (object[]): The teammates looking at the conversation right now, each with id, name and avatar. Present only when the list asked for viewers.
      - `avatar_url` (string | null, required): Web address of the viewing teammate's picture. Null when not given.
      - `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.
      - `name` (string, required): Name of the teammate currently viewing the conversation.
    - `waiting_since` (string | null, required): Since when the customer has waited for an answer: their latest message is newer than the latest reply. Null when nobody waits or it is closed.

## 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/conversations/{conversation}/replies' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "attachment_ids": [
    "<string>"
  ],
  "author_id": "<string>",
  "body": "<string>",
  "client_message_id": "<string>",
  "created_at": "2026-11-01T09:30:00Z",
  "delay": true,
  "expected_last_message_id": "<string>",
  "external_id": "<string>",
  "snooze": {
    "option": "<string>",
    "preset": "<string>",
    "until": "2026-11-01T09:30:00Z"
  },
  "then": "<string>"
}'
```

## Example response

```json
{
  "data": {
    "ai": {
      "action_call": {
        "action": {
          "name": "<string>",
          "title": "<string>"
        },
        "arguments": {
          "<key>": null
        },
        "decided_by": {
          "id": "<string>",
          "name": "<string>"
        },
        "decision_reason": "<string>",
        "expires_at": "2026-11-01T09:30:00Z",
        "id": "<string>",
        "result_summary": "<string>",
        "state": "<string>",
        "summary": "<string>"
      },
      "confirmation": {
        "action_call_id": "<string>",
        "details": [
          {}
        ],
        "expires_at": "2026-11-01T09:30:00Z",
        "status": "<string>",
        "text": "<string>",
        "title": "<string>"
      },
      "generated": true,
      "outcome": "<string>",
      "run_id": "<string>",
      "sources": [
        {
          "excerpt": "<string>",
          "slug": "<string>",
          "title": "<string>",
          "url": "<string>"
        }
      ]
    },
    "attachments": [
      {
        "blocked": true,
        "content_id": "<string>",
        "content_type": "<string>",
        "filename": "<string>",
        "height": 123,
        "id": "<string>",
        "object": "<string>",
        "scanned": true,
        "size_bytes": 123,
        "url": "<string>",
        "width": 123
      }
    ],
    "author": {
      "avatar_url": "<string>",
      "id": "<string>",
      "name": "<string>",
      "type": "<string>"
    },
    "body": "<string>",
    "body_format": "<string>",
    "broadcast": {
      "id": "<string>",
      "name": "<string>"
    },
    "conversation_id": "<string>",
    "created_at": "2026-11-01T09:30:00Z",
    "deleted_at": "2026-11-01T09:30:00Z",
    "deleted_by": {
      "id": "<string>",
      "name": "<string>"
    },
    "delivery_error": "<string>",
    "delivery_status": "<string>",
    "edited_at": "2026-11-01T09:30:00Z",
    "event": null,
    "has_original": true,
    "id": "<string>",
    "mentions": [
      {
        "id": "<string>",
        "name": "<string>",
        "type": "<string>"
      }
    ],
    "object": "<string>",
    "reactions": [
      {
        "count": 123,
        "emoji": "<string>",
        "member_ids": [
          "<string>"
        ]
      }
    ],
    "read_at": "2026-11-01T09:30:00Z",
    "redactions": [
      {
        "count": 123,
        "rule": "<string>"
      }
    ],
    "scheduled_send_at": "2026-11-01T09:30:00Z",
    "sent_at": "2026-11-01T09:30:00Z",
    "source_deleted_at": "2026-11-01T09:30:00Z",
    "substantive": true,
    "truncated": true,
    "type": "<string>",
    "updated_at": "2026-11-01T09:30:00Z"
  },
  "meta": {
    "conversation": {
      "ai_handoff_reason": "<string>",
      "ai_pending_approvals": 123,
      "ai_reply_count": 123,
      "ai_state": "<string>",
      "assignee": {
        "avatar_url": "<string>",
        "id": "<string>",
        "name": "<string>",
        "object": "<string>"
      },
      "assignment_wait": {
        "reason": "<string>",
        "since": "2026-11-01T09:30:00Z"
      },
      "channel": {
        "id": "<string>",
        "name": "<string>",
        "object": "<string>",
        "type": "<string>"
      },
      "closed_at": "2026-11-01T09:30:00Z",
      "contact": {
        "avatar_url": "<string>",
        "email": "<string>",
        "id": "<string>",
        "kind": "<string>",
        "name": "<string>",
        "object": "<string>",
        "timezone": "<string>"
      },
      "created_at": "2026-11-01T09:30:00Z",
      "first_customer_message_at": "2026-11-01T09:30:00Z",
      "first_reply_at": "2026-11-01T09:30:00Z",
      "id": "<string>",
      "inbox": {
        "id": "<string>",
        "name": "<string>",
        "object": "<string>"
      },
      "last_activity_at": "2026-11-01T09:30:00Z",
      "last_message": {
        "author": {
          "avatar_url": "<string>",
          "id": "<string>",
          "name": "<string>",
          "type": "<string>"
        },
        "created_at": "2026-11-01T09:30:00Z",
        "excerpt": "<string>",
        "id": "<string>",
        "object": "<string>",
        "type": "<string>"
      },
      "last_message_at": "2026-11-01T09:30:00Z",
      "message_count": 123,
      "number": 123,
      "object": "<string>",
      "priority": "<string>",
      "snoozed_until": "2026-11-01T09:30:00Z",
      "spam": true,
      "status": "<string>",
      "subject": "<string>",
      "tags": [
        {
          "color": "<string>",
          "icon": "<string>",
          "id": "<string>",
          "name": "<string>",
          "object": "<string>"
        }
      ],
      "team": {
        "id": "<string>",
        "name": "<string>",
        "object": "<string>"
      },
      "unread": true,
      "updated_at": "2026-11-01T09:30:00Z",
      "viewers": [
        {
          "avatar_url": "<string>",
          "id": "<string>",
          "name": "<string>"
        }
      ],
      "waiting_since": "2026-11-01T09:30:00Z"
    }
  }
}
```

---

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