# Link a ticket

```http
POST https://trydimmi.com/api/v1/tickets/{ticket}/links
```

## Authorization

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

## Path parameters

- `ticket` (string, required): Id of the ticket, starting with tkt_, such as tkt_01jx2m8k4t. Find it with GET /tickets.

## Body

- `conversation_id` (string): Id of the conversation the ticket is linked to, starting with conv_, such as conv_01jx2m8k4t. Find it with GET /conversations or GET /search. A tracker link needs it. Send this or ticket_id, never both.
- `kind` (string, required): What the link means: back_office (from a customer ticket to back-office work, needs ticket_id), tracker (from a tracker ticket to a conversation, needs conversation_id), follow_up or related (join any two tickets). Such as "related". One of: `back_office`, `tracker`, `follow_up`, `related`.
- `ticket_id` (string): Id of the other ticket the ticket is linked to, starting with tkt_, such as tkt_01jx2m8k4t. Find it with GET /tickets. A back_office link needs it. Send this or conversation_id, never both.

## Response 200 (OK)

- `data` (object, required)
  - `conversation_id` (string | null, required): Id of the conversation the link points to, such as conv_.... Null when the link points to another ticket instead.
  - `created_at` (string, required): When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
  - `from_ticket_id` (string, required): Id of the ticket the link starts from, such as tkt_....
  - `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): What the link means: back_office (work behind a customer ticket), tracker (a report of a tracked problem), follow_up or related.
  - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
  - `ticket` (object, required)
    - `assignee_id` (string | null, required): Id of the teammate the linked ticket is assigned to, starting with mem_. Null when nobody holds it.
    - `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): The linked ticket's kind: customer, back_office or tracker.
    - `reference` (string, required): The linked ticket's number as the team reads it, such as T-142.
    - `state` (object, required)
      - `customer_label` (string, required): What the customer sees when their ticket is in this state.
      - `group` (string, required): The fixed group that says what the state means: submitted, in_progress, waiting_customer, waiting_team or resolved.
      - `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 state's name as the team sees it.
    - `title` (string, required): The linked ticket's title.
    - `type_name` (string, required): Name of the linked ticket's type.
    - `updated_at` (string, required): When it last changed, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
  - `to_ticket_id` (string | null, required): Id of the ticket the link points to, such as tkt_.... Null when the link points to a conversation instead.

## 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/tickets/{ticket}/links' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "conversation_id": "<string>",
  "kind": "back_office",
  "ticket_id": "<string>"
}'
```

## Example response

```json
{
  "data": {
    "conversation_id": "<string>",
    "created_at": "2026-11-01T09:30:00Z",
    "from_ticket_id": "<string>",
    "id": "<string>",
    "kind": "<string>",
    "object": "<string>",
    "ticket": {
      "assignee_id": "<string>",
      "id": "<string>",
      "kind": "<string>",
      "reference": "<string>",
      "state": {
        "customer_label": "<string>",
        "group": "<string>",
        "id": "<string>",
        "name": "<string>"
      },
      "title": "<string>",
      "type_name": "<string>",
      "updated_at": "2026-11-01T09:30:00Z"
    },
    "to_ticket_id": "<string>"
  }
}
```

---

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