---
title: "Get attachments by API attachment key"
method: GET
path: "/attachments/"
tags: ["Attachments"]
---

# Get attachments by API attachment key

`GET /attachments/`

Get attachments by API attachment key. Only returns attachments that have not been associated with content.

## Query parameters

- `key` string, required

## Response `200`

OK

- object
  - `attachments` Attachment[] — List of matching attachments.
    - `filename` string
    - `file_size` integer
    - `height` integer
    - `width` integer
    - `thumbnail_url` string
    - `retina_thumbnail_url` string
    - `direct_url` string
    - `is_video` boolean
    - `is_audio` boolean
    - `attachment_id` integer
    - `content_type` string
    - `content_id` integer
    - `attach_date` integer
    - `view_count` integer

## Other responses

- `default` — Error

## Changes

- **2026-03-18** `e271d0e41f6d` — 5 info
  - api operation id `get_attachments_` removed and replaced with `getAttachments`
  - the endpoint scheme security `XF-Api-Key` was added to the API
  - the endpoint scheme security `XF-OAuth2` was added to the API
  - added the new optional `header` request parameter `XF-Api-User` to all path's operations
  - …1 more
- **2026-02-03** `fc0a40f3b859` — 4 warning, 3 info
  - the optional response header `XF-Latest-Api-Version` removed for the status `200`
  - the optional response header `XF-Request-User` removed for the status `200`
  - the optional response header `XF-Request-User-Extras` removed for the status `200`
  - the optional response header `XF-Used-Api-Version` removed for the status `200`
  - …3 more

[Change history](https://skmtc.dev/xenforo-ltd/apis/xenforo-api/changes/attachments/get.md)

---

[API](https://skmtc.dev/xenforo-ltd/apis/xenforo-api.md) · [All operations](https://skmtc.dev/xenforo-ltd/apis/xenforo-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/xenforo-ltd/xenforo-api/revisions/b15eba33657a/schema)
