# Resolve message attachment

Resolves a message attachment.

```http
GET https://api.pozy.ai/v1/inbox/conversations/{conversationId}/messages/{messageId}/attachments/{index}
```

- Area: Inbox / Messages
- Auth: Authorization: Bearer pz_live_...

## Path parameters

- `conversationId` (string, required)
- `messageId` (string, required)
- `index` (integer, required)

## Query parameters

- `accountId` (string, required)
- `format` (string): one of redirect, json

## Example request

```bash
curl -X GET "https://api.pozy.ai/v1/inbox/conversations/6e525f3820fc636aa96d2ee9/messages/62d191e7089bc48b8ea56b35/attachments/1?accountId=696e0b682d0a31188e7a2ba9" \
  -H "Authorization: Bearer $POZY_API_KEY"
```

```ts
const res = await fetch("https://api.pozy.ai/v1/inbox/conversations/6e525f3820fc636aa96d2ee9/messages/62d191e7089bc48b8ea56b35/attachments/1?accountId=696e0b682d0a31188e7a2ba9", {
  headers: { Authorization: `Bearer ${process.env.POZY_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.get(
    "https://api.pozy.ai/v1/inbox/conversations/6e525f3820fc636aa96d2ee9/messages/62d191e7089bc48b8ea56b35/attachments/1",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    params={
        "accountId": "696e0b682d0a31188e7a2ba9",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `status`, string
- `url`, string
- `refreshed`, boolean

```json
{
  "status": "active",
  "url": "https://pozy.ai/media/example-1.jpg",
  "refreshed": true
}
```
