---
title: "Get Attachment"
method: GET
path: "/attachments/{attachmentId}"
---

# Get Attachment

`GET /attachments/{attachmentId}`

Retrieves an attachment's metadata and a short-lived signed download URL for its content.

## Path parameters

- `attachmentId` string, uuid, required

## Response `200`

The attachment.

- Attachment — A file attached to a session. Bytes live in object storage; this describes the last committed content.
  - `id` string, uuid, required — The ID of the Attachment.
  - `sessionId` string, required — The session ID the attachment belongs to. Matches the `session.id` emitted on OTel spans, which is how attachments are joined to traces and records.
  - `filePath` string, required — The logical file path of the attachment (e.g. the path the agent wrote on disk). Together with the session ID it identifies the attachment: re-uploading the same path in the same session updates the existing attachment in place.
  - `filename` string, nullable, required — Display filename, if provided.
  - `contentType` string, nullable, required — MIME type of the last committed content. Null until the first commit.
  - `sizeBytes` integer, nullable, required — Size in bytes of the last committed content. Null until the first commit.
  - `sha256` string, nullable, required — SHA-256 of the last committed content. Null until the first commit.
  - `status` 'pending' | 'uploaded', required — `uploaded` once a commit has succeeded; `pending` while an initiated upload has not been committed yet.
  - `uploadedAt` string, nullable, required — ISO 8601 timestamp of the last successful commit. Null until the first commit.
  - `metadata` object, nullable, required — Arbitrary caller-supplied metadata.

## Other responses

- `401` — Error indicating that the request is not authenticated.
- `500` — An internal service error indicating an issue with the Scorecard service.

## Changes

- **2026-08-10** `121aaa257802` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/scorecard-ai/apis/scorecard-api/changes/attachments/:attachmentId/get.md)

---

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