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

# Get message chunks

> Retrieve the encrypted chunks belonging to one message group

Large encrypted messages can be divided into chunks. Each chunk has its own `message_id`, while every chunk in the set shares one UUID `message_group_id`.

This endpoint returns the currently cached chunks for one recipient and group. Your client is responsible for validating ordering, detecting missing chunks, and reassembling the encrypted content.

## Signed proof

Use operation `chunks` and set `subject` to the exact `messageGroupId`:

```text theme={null}
talaria:cache:retrieval-proof:v1
operation=chunks
did=did:talaria:1111111111111111111111
device_id=mobile-01
service_id=did:talaria:1111111111111111111111#cache
cache_endpoint=https://cache.example.com
key_id=did:talaria:1111111111111111111111#signing
timestamp=2026-07-24T16:30:00Z
nonce=<unique-random-nonce>
subject=e93e6c49-d280-4078-81bd-16f09be99e7e
```

## Request

<ParamField path="did" type="string" required>
  Recipient DID.
</ParamField>

<ParamField path="messageGroupId" type="string" required>
  UUID shared by the requested chunks.
</ParamField>

<ParamField header="X-Device-Id" type="string">
  Device to bind into the proof, when retrieving for one device.
</ParamField>

Also send the standard Cache proof headers.

<RequestExample>
  ```bash Request theme={null}
  curl --request GET \
    --url "https://cache.example.com/cache/chunks/did%3Atalaria%3A1111111111111111111111/e93e6c49-d280-4078-81bd-16f09be99e7e" \
    --header "X-Device-Id: mobile-01" \
    --header "X-Service-Id: did:talaria:1111111111111111111111#cache" \
    --header "X-Cache-Endpoint: https://cache.example.com" \
    --header "X-Key-Id: did:talaria:1111111111111111111111#signing" \
    --header "X-Timestamp: 2026-07-24T16:30:00Z" \
    --header "X-Nonce: <unique-random-nonce>" \
    --header "X-Signature: <base64-signature>"
  ```
</RequestExample>

## Response

```json 200 Response theme={null}
{
  "count": 2,
  "chunks": [
    {
      "message_id": "<chunk-message-uuid>",
      "recipient": "did:talaria:1111111111111111111111",
      "chunked": true,
      "chunk": {
        "message_group_id": "e93e6c49-d280-4078-81bd-16f09be99e7e",
        "sequence_number": 0,
        "total_chunks": 2
      },
      "envelope": {},
      "proof": {}
    }
  ]
}
```

## Straight to the point

```http theme={null}
GET /cache/chunks/{did}/{messageGroupId}
```

* Proof operation: `chunks`
* Proof subject: exact group UUID
* Sort returned chunks by `sequence_number`
* Do not assume every chunk has arrived
