> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.adid.dev/llms.txt.
> For full documentation content, see https://docs.adid.dev/llms-full.txt.

# Messages & Threads

Threads are identified by `thid` (thread id) and parent threads by `pthid`. Use `GET /api/v1/didcomm/messages` to inspect history.

```bash
curl -H "Authorization: Bearer $JWT" \
  "https://adid.dev/api/v1/didcomm/messages?direction=received&thread_id=urn:uuid:thread-1&limit=50&offset=0"
```

| Query param | Type   | Default | Description                         |
| ----------- | ------ | ------- | ----------------------------------- |
| `direction` | string | *none*  | `sent` or `received`; omit for both |
| `thread_id` | string | *none*  | Filter to a specific `thid`         |
| `limit`     | int    | 50      | Max items                           |
| `offset`    | int    | 0       | Starting index                      |

Response is `model.PaginatedResponse` with each item containing `id`, `type`, `direction`, `from`, `to`, `thid`, `body`, `created_at`, and a `connectionId` link.