Skip to content

GET /v1/projects/{id}/attachments/{attachmentId}

Returns an Attachment's metadata. Use the content endpoint to download its bytes. If its metadata is unavailable after ten seconds, returns ATTACHMENT_NOT_READY with Retry-After: 5.

photon.projects.getAttachment(input: GetAttachmentInput, options?: RequestOptions): Promise<GetAttachmentOutput>
import { Photon } from "@photon-ai/api";

const photon = new Photon({
  headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.getAttachment({
  path: {
    attachmentId: "attachmentId",
    id: "id",
  },
});
{
  "contentType": "string",
  "createdAt": "2026-01-01T00:00:00Z",
  "filename": "string",
  "id": "string",
  "metadata": {},
  "projectId": "string",
  "sizeBytes": 1,
  "updatedAt": "2026-01-01T00:00:00Z"
}

Parameters

attachmentIdstringrequired
idstringrequired

Returns

200 The Attachment resource. Attachment

contentTypestringrequired
createdAtstring (date-time)required
filenamestring
idstringrequired
metadataobject
projectIdstringrequired
sizeBytesintegerrequired
updatedAtstring (date-time)required