Skip to content

GET /v1/projects/{projectId}/api-keys

Lists the API keys on the selected project, ordered newest first. Revoked keys are not listed; expired keys stay listed until they are revoked. Entries contain key metadata and permissions, never secret values. Use the returned identifiers to manage an existing key; lost secrets cannot be recovered through this operation.

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

const photon = new Photon({
  headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.listProjectApiKeys({
  path: {
    projectId: "projectId",
  },
});
{
  "apiKeys": [
    {
      "apiKeyId": "string",
      "createdAt": "2026-01-01T00:00:00.000Z",
      "createdByAccountId": "string",
      "expiresAt": null,
      "name": "string",
      "permissions": [
        "string"
      ],
      "permissionsUpdatedAt": null,
      "projectId": "string",
      "revokedAt": null
    }
  ]
}

Parameters

Photon-VersionPhotonVersion

Selects the API contract date. Without it, the request is served as 2026-07-01.

projectIdstringrequired

Returns

200 The project's keys that have not been revoked, newest first. Never includes secrets. ListProjectApiKeysResponse

Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.

apiKeysarray of ApiKeyrequired

304 Not Modified. Sent only when If-None-Match matches the ETag of an earlier 200 response for the same representation; no body. No body.

Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.