---
title: "Get an attachment"
method: GET
path: "/attachments/{id}"
tags: ["Attachments"]
---

# Get an attachment

`GET /attachments/{id}`

## Request

- Base URL: `https://api.purplegrain.com/api/v1`
- URL: `https://api.purplegrain.com/api/v1/attachments/{id}`
- Auth: none declared

Returns the attachment's metadata, including the URL of the stored photo.
Requesting the bytes themselves needs an image extension or an image
Accept type on the HTTP request. An assistant's tool call cannot set
that, so use the URL. Ids are unguessable UUIDs.

## Path parameters

- `id` string, required

## Response `200`

Successful

- AttachmentsShowResponseAttributes
  - `data` AttachmentModelAttributes: Attachment in attributes-adapter shape (Accept application/json); fields at top level.
    - `id` string
    - `type` string
    - `url` string, nullable
    - `width` integer, nullable
    - `height` integer, nullable
    - `content_type` string, nullable
    - `created_at` string, date-time

## Other responses

- `404`: Not found

---

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