Skip to content

GET /v1/projects/{id}/attachments

Lists the Project's Attachment metadata, with optional time filters. An Attachment can be absent until its upload finishes, which advances its updatedAt; follow changes with updatedSince.

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

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

Parameters

idstringrequired
createdBeforestring (date-time)

Exclusive upper bound on createdAt, RFC 3339. Cannot combine with updatedAt bounds.

createdSincestring (date-time)

Inclusive lower bound on createdAt, RFC 3339. Cannot combine with updatedAt bounds.

orderSortOrder

Direction along orderBy; desc, the default, is newest first

orderByTimestampOrderBy

Sort timestamp; defaults to the filtered timestamp, otherwise created_at. Must match the time bounds.

pageSizeinteger

Items per page. A value above 100 returns at most 100 items.

pageTokenstring

Token from nextPageToken. Keep the same Project and query.

updatedBeforestring (date-time)

Exclusive upper bound on updatedAt, RFC 3339. Cannot combine with createdAt bounds.

updatedSincestring (date-time)

Inclusive lower bound on updatedAt, RFC 3339. Cannot combine with createdAt bounds.

Returns

200 A page of Project Attachments in the requested order. AttachmentPage

itemsarray of Attachmentrequired
nextPageTokenstring

Continue with this token, even if items is empty. Omitted when no more pages remain.