> ## 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 messages for a device

> Retrieve encrypted envelopes targeted to one authorized device

Use this endpoint when a DID has multiple registered devices and your client wants messages for one device. The device identifier is included in both the path and signed access proof.

The Cache verifies that the device is allowed by the resolved recipient record.

## Signed proof

Use the same format as [Get cached messages](/api-reference/cache/get-messages), but populate `device_id`:

```text theme={null}
talaria:cache:retrieval-proof:v1
operation=pull
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=*
```

## Request

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

<ParamField path="deviceId" type="string" required>
  Authorized device identifier.
</ParamField>

Send `X-Service-Id`, `X-Cache-Endpoint`, `X-Key-Id`, `X-Timestamp`, `X-Nonce`, and `X-Signature` exactly as described by the recipient-wide retrieval endpoint.

<RequestExample>
  ```bash Request theme={null}
  curl --request GET \
    --url "https://cache.example.com/cache/messages/did%3Atalaria%3A1111111111111111111111/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

The response has `count` and `messages`, using the same message object as [Get cached messages](/api-reference/cache/get-messages).

## Straight to the point

```http theme={null}
GET /cache/messages/{did}/{deviceId}
```

* Proof operation: `pull`
* Proof subject: `*`
* Proof `device_id`: exact path device
* Unauthorized or tombstoned device: `403`
