## Get an attachment's metadata

**get** `/v1/attachments/{att}`

Retrieves an attachment's stored metadata.

**Behavior**

- Reports the fields as stored: `mime` is `application/octet-stream` when
  the upload declared no `content-type`. The upload's own response
  reports the same stored values, so the two reads always agree.
- Serves ids this API minted and ids created for attachments a customer
  sent inbound; those arrive on the `message.received` payload's
  `attachments` entries, are readable here and at `/content`, and cannot
  be re-sent (`attachment_not_sendable`).
- Answers for any `status`, including one a send or download refuses;
  this is where you find out why.

**Limits**

- Inbound attachments are deleted 30 days after receipt. Copy the bytes
  if you need them longer.
- Scoped to your brand. Another brand's `att_id` returns HTTP 404
  `attachment_not_found`: the same response as an unknown id, so a
  response never confirms an id exists.

### Path Parameters

- `att: string`

### Returns

- `AttachmentDetail object { id, mime, size, 2 more }`

  One stored attachment's metadata, as stored.

  - `id: string`

    Attachment id (`att_…`).

  - `mime: string`

    The STORED MIME type; `application/octet-stream` when the upload declared none.

  - `size: number`

    Stored size in bytes.

  - `status: string`

    Whether this attachment's bytes are usable. `ready` is the only value a
    send, a template save or a download accepts; anything else is why one of
    those was refused. This read is never gated on it; it is where you look
    up the answer.

    Today's values are `ready`, `pending` (bytes not stored yet) and `failed`
    (they never will be). Everything `POST /v1/attachments` returns is `ready`
    the moment it responds: the bytes are in the request. The other two exist
    because an upload that mints an id BEFORE the bytes move cannot say that,
    and the field is here now so that shape is not a second breaking response
    change.

    Modelled as a string rather than a closed union **deliberately**: the
    set of values can grow (a content scanner adds a verdict of its own), and
    a closed enum would make that addition the breaking change this field
    exists to avoid. Branch on `ready` and treat every other value as
    unusable-with-a-name; do not try to list them all.

  - `name: optional string`

    Stored display name; absent when the upload sent no `x-filename`.

### Example

```http
curl https://messages.api.linqapp.com/v1/attachments/$ATT \
    -H "Authorization: Bearer $LINQ_AMB_API_KEY"
```

#### Response

```json
{
  "id": "att_1a3f77",
  "mime": "image/png",
  "name": "receipt.png",
  "size": 20481,
  "status": "ready"
}
```
