---
title: "Resolve message attachment"
method: GET
path: "/v1/inbox/conversations/{conversationId}/messages/{messageId}/attachments/{index}"
tags: ["Messages"]
---

# Resolve message attachment

`GET /v1/inbox/conversations/{conversationId}/messages/{messageId}/attachments/{index}`

## Request

- Base URL: `https://zernio.com/api`
- URL: `https://zernio.com/api/v1/inbox/conversations/{conversationId}/messages/{messageId}/attachments/{index}`
- Auth: HTTP bearer

Resolve one attachment on a message to a media url that works right now.

Instagram and Facebook sign DM media urls per request and expire them, so
the `url` on a message is a snapshot: it works when you read the message
and stops working later. This endpoint checks the stored url and, when it
has gone stale, re-mints the message's media from Meta and persists it
before answering. The message id never expires, so this URL is the one to
store. It is returned ready-made on each attachment as `refreshUrl` when
you read a message over REST.

**Webhook payloads do not carry `refreshUrl`**, so a webhook-driven
integration builds this URL itself. Every piece is in the event:
`message.conversationId`, `message.platformMessageId`, the attachment's
zero-based position, and `account.accountId`. **`accountId` is a
required query parameter**; omitting it returns `400`
`missing_required_field`, which is the same requirement
`GET /v1/whatsapp/media/{mediaId}` has.

By default it responds `302` to the live media url, so it can be used
directly as an `<img src>` on a browser session. API-key integrators
should pass `?format=json` and read `url` off the body, since a browser
cannot attach an Authorization header to an image request.

Only Instagram and Facebook media can be re-minted. On other platforms
the stored url is returned as-is when it still resolves, and `404`
otherwise.

## Path parameters

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

## Query parameters

- `accountId` string, required
- `format` 'redirect' | 'json'

## Response `200`

Resolved url (only when format=json)

- object
  - `status` string
  - `url` string: Live media url. Short-lived; re-request this endpoint rather than storing it.
  - `refreshed` boolean: True when the stored url had expired and was re-minted from the platform.

## Other responses

- `302`: Redirect to the live media url
- `400`: Invalid request
- `401`: Missing or invalid API key. `code` is `missing_credentials` when no Authorization header was sent and `invalid_credentials` when the key is unknown, revoked or expired.
- `403`: Inbox addon required
- `404`: Account, conversation, message or attachment not found, or the platform no longer serves the media

## Changes

- **2026-10-06** `f8c8f34fb41a`: 2 warning
  - added the new `account` enum value to the `details/budgetScope` response property for the response status `400`
  - added the new `account` enum value to the `details/budgetScope` response property for the response status `401`
- **2026-10-02** `d556591af3f6`: 8 info
  - added the optional property `code` to the response with the `401` status
  - added the optional property `details` to the response with the `401` status
  - added the optional property `docUrl` to the response with the `400` status
  - added the optional property `docUrl` to the response with the `401` status
  - …4 more
- **2026-09-30** `16a7b9d5373e`: 1 info
  - removed the `platform` enum value from the `details/budgetScope` response property for the response status `400`
- **2026-09-25** `2c04683ce694`: 4 info
  - added the optional property `details/adAccountId` to the response with the `400` status
  - added the optional property `details/createdObjects` to the response with the `400` status
  - added the optional property `details/stage` to the response with the `400` status
  - added the optional property `details/unconfirmedWrite` to the response with the `400` status
- **2026-09-16** `3e6ddf2a99ea`: 1 info
  - added the optional property `details/budgetScope` to the response with the `400` status

[Operation history](https://skmtc.dev/zernio/apis/zernio-api/changes/v1/inbox/conversations/:conversationId/messages/:messageId/attachments/:index/get.md)

---

[API](https://skmtc.dev/zernio/apis/zernio-api.md) · [All operations](https://skmtc.dev/zernio/apis/zernio-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zernio/apis/zernio-api/revisions/4e74db179e73?raw)
