> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orbit.devotel.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Worked request and response samples

> Worked samples for the most-used inbox operations: create a ticket, add a comment, and read the ticket's activity history. Each sample shows the request, the success envelope, and the error envelope to expect.

## Worked request and response samples

Copy a request body as written, substitute your own ids, and compare the response envelope. Errors follow Devotel Orbit's `{ error, meta }` envelope, shown once below under **Error envelope**.

### Create a ticket

<Note>
  `POST /api/v1/inbox/tickets`
</Note>

**Request**

```json theme={null}
{
  "subject": "Refund request",
  "channel": "email",
  "contact_id": "contact_4d2f6a8c1e3b5d7f9a1c3e5b",
  "priority": "normal"
}
```

<ResponseExample>
  ```json 201 theme={null}
  {
    "data": {
      "id": "tick_9e8d7c6b5a4f3021e5d6c7b8",
      "subject": "Refund request",
      "status": "open"
    },
    "meta": {
      "request_id": "req_ticket",
      "timestamp": "2026-08-01T12:00:00.000Z"
    }
  }
  ```
</ResponseExample>

### Add a comment to a ticket

<Note>
  `POST /api/v1/inbox/tickets/{id}/comments`
</Note>

**Request**

```json theme={null}
{
  "body": "We'll refund the difference within 2 business days.",
  "kind": "public"
}
```

<ResponseExample>
  ```json 201 theme={null}
  {
    "data": {
      "id": "cmt_5d6c7e8f9a1b2c3d4e5f6a7b",
      "kind": "public",
      "body": "We'll refund the difference within 2 business days."
    },
    "meta": {
      "request_id": "req_comment",
      "timestamp": "2026-08-01T12:01:00.000Z"
    }
  }
  ```
</ResponseExample>

### List a ticket's related tickets

<Note>
  `GET /api/v1/inbox/tickets/{id}/links`
</Note>

<ParamField query="kind" type="string">
  Optional edge-kind filter, e.g. `related` or `duplicate`.
</ParamField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": [
      {
        "from": "tick_9e8d7c6b5a4f3021e5d6c7b8",
        "to": "tick_2b3c4d5e6f7081a2b3c4d5",
        "kind": "related"
      }
    ],
    "meta": {
      "request_id": "req_links",
      "timestamp": "2026-08-01T11:59:00.000Z"
    }
  }
  ```
</ResponseExample>

### Error envelope

```json 422 theme={null}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "status": 422,
    "message": "subject: Required"
  },
  "meta": {
    "request_id": "req_...",
    "timestamp": "2026-08-01T12:00:00.000Z"
  }
}
```
