> ## Documentation Index
> Fetch the complete documentation index at: https://docs.photon.codes/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use Stable documentation by default. Honor an explicit Beta request or a URL under /docs/beta/. If the requested version conflicts with the installed CLI package or API origin, clarify the target before writing integration code.
> Pages under /docs/beta/ document Beta; other product pages document Stable. Keep the CLI package, commands, API origin, and credentials within the selected version. State the documentation version in your answer.
> For MCP search, always pass version: Stable or version: Beta. Unfiltered search mixes both versions. For filesystem reads, keep Beta queries under /beta/ and exclude /beta/ from Stable queries; discover paths before reading them.
> The public docs base is https://photon.codes/docs. Convert MCP page paths to public URLs under that base, preserving /beta/ when present. Read https://photon.codes/docs/skill.md for version selection and https://photon.codes/docs/llms.txt for the version indexes.

# Projects

> The Projects resource in the TypeScript, Python and Rust clients.

## Methods

<Tabs>
  <Tab title="TypeScript">
    **[List attachments](/docs/beta/api-client/sdk/projects/list-attachments)**

    ```typescript TypeScript theme={null}
    photon.projects.listAttachments(input: ListAttachmentsInput, options?: RequestOptions): Promise<ListAttachmentsOutput>
    ```

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

    **[List project API keys](/docs/beta/api-client/sdk/projects/list-project-api-keys)**

    ```typescript TypeScript theme={null}
    photon.projects.listProjectApiKeys(input: ListProjectApiKeysInput, options?: RequestOptions): Promise<ListProjectApiKeysOutput>
    ```

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

    **[List webhook API versions](/docs/beta/api-client/sdk/projects/list-webhook-api-versions)**

    ```typescript TypeScript theme={null}
    photon.projects.listWebhookApiVersions(input: ListWebhookApiVersionsInput, options?: RequestOptions): Promise<ListWebhookApiVersionsOutput>
    ```

    `GET /v1/projects/{projectId}/webhooks/api-versions`

    **[List webhook destinations](/docs/beta/api-client/sdk/projects/list-webhook-destinations)**

    ```typescript TypeScript theme={null}
    photon.projects.listWebhookDestinations(input: ListWebhookDestinationsInput, options?: RequestOptions): Promise<ListWebhookDestinationsOutput>
    ```

    `GET /v1/projects/{projectId}/webhooks/destinations`

    **[List webhook egress addresses](/docs/beta/api-client/sdk/projects/list-webhook-egress-addresses)**

    ```typescript TypeScript theme={null}
    photon.projects.listWebhookEgressAddresses(input: ListWebhookEgressAddressesInput, options?: RequestOptions): Promise<ListWebhookEgressAddressesOutput>
    ```

    `GET /v1/projects/{projectId}/webhooks/egress-addresses`

    **[List webhook event types](/docs/beta/api-client/sdk/projects/list-webhook-event-types)**

    ```typescript TypeScript theme={null}
    photon.projects.listWebhookEventTypes(input: ListWebhookEventTypesInput, options?: RequestOptions): Promise<ListWebhookEventTypesOutput>
    ```

    `GET /v1/projects/{projectId}/webhooks/event-types`

    **[Download attachment](/docs/beta/api-client/sdk/projects/download-attachment)**

    ```typescript TypeScript theme={null}
    photon.projects.downloadAttachment(input: DownloadAttachmentInput, options?: RequestOptions): Promise<DownloadAttachmentOutput>
    ```

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

    **[Get project](/docs/beta/api-client/sdk/projects/get)**

    ```typescript TypeScript theme={null}
    photon.projects.get(input: GetProjectInput, options?: RequestOptions): Promise<GetProjectOutput>
    ```

    `GET /v1/projects/{projectId}`

    **[Get attachment](/docs/beta/api-client/sdk/projects/get-attachment)**

    ```typescript TypeScript theme={null}
    photon.projects.getAttachment(input: GetAttachmentInput, options?: RequestOptions): Promise<GetAttachmentOutput>
    ```

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

    **[Get metrics backfill status](/docs/beta/api-client/sdk/projects/get-message-metrics-backfill)**

    ```typescript TypeScript theme={null}
    photon.projects.getMessageMetricsBackfill(input: GetMessageMetricsBackfillInput, options?: RequestOptions): Promise<GetMessageMetricsBackfillOutput>
    ```

    `GET /v1/projects/{projectId}/metrics/backfill`

    **[Get metrics SQL schema](/docs/beta/api-client/sdk/projects/get-message-metrics-sql-schema)**

    ```typescript TypeScript theme={null}
    photon.projects.getMessageMetricsSqlSchema(input: GetMessageMetricsSqlSchemaInput, options?: RequestOptions): Promise<GetMessageMetricsSqlSchemaOutput>
    ```

    `GET /v1/projects/{projectId}/metrics/query`

    **[Get webhook destination](/docs/beta/api-client/sdk/projects/get-webhook-destination)**

    ```typescript TypeScript theme={null}
    photon.projects.getWebhookDestination(input: GetWebhookDestinationInput, options?: RequestOptions): Promise<GetWebhookDestinationOutput>
    ```

    `GET /v1/projects/{projectId}/webhooks/destinations/{destinationId}`

    **[Get webhook event schema](/docs/beta/api-client/sdk/projects/get-webhook-event-schema)**

    ```typescript TypeScript theme={null}
    photon.projects.getWebhookEventSchema(input: GetWebhookEventSchemaInput, options?: RequestOptions): Promise<GetWebhookEventSchemaOutput>
    ```

    `GET /v1/projects/{projectId}/webhooks/event-types/{eventType}/schema`

    **[Create project API key](/docs/beta/api-client/sdk/projects/create-project-api-key)**

    ```typescript TypeScript theme={null}
    photon.projects.createProjectApiKey(input: CreateProjectApiKeyInput, options?: RequestOptions): Promise<CreateProjectApiKeyOutput>
    ```

    `POST /v1/projects/{projectId}/api-keys`

    **[Create webhook destination](/docs/beta/api-client/sdk/projects/create-webhook-destination)**

    ```typescript TypeScript theme={null}
    photon.projects.createWebhookDestination(input: CreateWebhookDestinationInput, options?: RequestOptions): Promise<CreateWebhookDestinationOutput>
    ```

    `POST /v1/projects/{projectId}/webhooks/destinations`

    **[Query metrics](/docs/beta/api-client/sdk/projects/query-message-metrics)**

    ```typescript TypeScript theme={null}
    photon.projects.queryMessageMetrics(input: QueryMessageMetricsInput, options?: RequestOptions): Promise<QueryMessageMetricsOutput>
    ```

    `POST /v1/projects/{projectId}/metrics/query`

    **[Retry webhook delivery](/docs/beta/api-client/sdk/projects/retry-webhook-delivery)**

    ```typescript TypeScript theme={null}
    photon.projects.retryWebhookDelivery(input: RetryWebhookDeliveryInput, options?: RequestOptions): Promise<RetryWebhookDeliveryOutput>
    ```

    `POST /v1/projects/{projectId}/webhooks/destinations/{destinationId}/retries`

    **[Rotate webhook signing secret](/docs/beta/api-client/sdk/projects/rotate-webhook-signing-secret)**

    ```typescript TypeScript theme={null}
    photon.projects.rotateWebhookSigningSecret(input: RotateWebhookSigningSecretInput, options?: RequestOptions): Promise<RotateWebhookSigningSecretOutput>
    ```

    `POST /v1/projects/{projectId}/webhooks/destinations/{destinationId}/secret-rotations`

    **[Upload attachment](/docs/beta/api-client/sdk/projects/upload-attachment)**

    ```typescript TypeScript theme={null}
    photon.projects.uploadAttachment(input: UploadAttachmentInput, options?: RequestOptions): Promise<UploadAttachmentOutput>
    ```

    `POST /v1/projects/{id}/attachments`

    **[Update project](/docs/beta/api-client/sdk/projects/update)**

    ```typescript TypeScript theme={null}
    photon.projects.update(input: UpdateProjectInput, options?: RequestOptions): Promise<UpdateProjectOutput>
    ```

    `PATCH /v1/projects/{projectId}`

    **[Update project API key permissions](/docs/beta/api-client/sdk/projects/update-project-api-key)**

    ```typescript TypeScript theme={null}
    photon.projects.updateProjectApiKey(input: UpdateProjectApiKeyInput, options?: RequestOptions): Promise<UpdateProjectApiKeyOutput>
    ```

    `PATCH /v1/projects/{projectId}/api-keys/{apiKeyId}`

    **[Update webhook destination](/docs/beta/api-client/sdk/projects/update-webhook-destination)**

    ```typescript TypeScript theme={null}
    photon.projects.updateWebhookDestination(input: UpdateWebhookDestinationInput, options?: RequestOptions): Promise<UpdateWebhookDestinationOutput>
    ```

    `PATCH /v1/projects/{projectId}/webhooks/destinations/{destinationId}`

    **[Delete project](/docs/beta/api-client/sdk/projects/delete)**

    ```typescript TypeScript theme={null}
    photon.projects.delete(input: DeleteProjectInput, options?: RequestOptions): Promise<DeleteProjectOutput>
    ```

    `DELETE /v1/projects/{projectId}`

    **[Delete webhook destination](/docs/beta/api-client/sdk/projects/delete-webhook-destination)**

    ```typescript TypeScript theme={null}
    photon.projects.deleteWebhookDestination(input: DeleteWebhookDestinationInput, options?: RequestOptions): Promise<DeleteWebhookDestinationOutput>
    ```

    `DELETE /v1/projects/{projectId}/webhooks/destinations/{destinationId}`

    **[Revoke project API key](/docs/beta/api-client/sdk/projects/revoke-project-api-key)**

    ```typescript TypeScript theme={null}
    photon.projects.revokeProjectApiKey(input: RevokeProjectApiKeyInput, options?: RequestOptions): Promise<RevokeProjectApiKeyOutput>
    ```

    `DELETE /v1/projects/{projectId}/api-keys/{apiKeyId}`
  </Tab>

  <Tab title="Python">
    **[List attachments](/docs/beta/api-client/sdk/projects/list-attachments)**

    ```python Python theme={null}
    photon.projects.list_attachments(input: ListAttachmentsInput) -> models.AttachmentPage
    ```

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

    **[List project API keys](/docs/beta/api-client/sdk/projects/list-project-api-keys)**

    ```python Python theme={null}
    photon.projects.list_project_api_keys(input: ListProjectApiKeysInput) -> models.ListProjectApiKeysResponse
    ```

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

    **[List webhook API versions](/docs/beta/api-client/sdk/projects/list-webhook-api-versions)**

    ```python Python theme={null}
    photon.projects.list_webhook_api_versions(input: ListWebhookApiVersionsInput) -> models.ListWebhookApiVersionsResponse | None
    ```

    `GET /v1/projects/{projectId}/webhooks/api-versions`

    **[List webhook destinations](/docs/beta/api-client/sdk/projects/list-webhook-destinations)**

    ```python Python theme={null}
    photon.projects.list_webhook_destinations(input: ListWebhookDestinationsInput) -> models.WebhookDestinationPage
    ```

    `GET /v1/projects/{projectId}/webhooks/destinations`

    **[List webhook egress addresses](/docs/beta/api-client/sdk/projects/list-webhook-egress-addresses)**

    ```python Python theme={null}
    photon.projects.list_webhook_egress_addresses(input: ListWebhookEgressAddressesInput) -> models.ListWebhookEgressAddressesResponse | None
    ```

    `GET /v1/projects/{projectId}/webhooks/egress-addresses`

    **[List webhook event types](/docs/beta/api-client/sdk/projects/list-webhook-event-types)**

    ```python Python theme={null}
    photon.projects.list_webhook_event_types(input: ListWebhookEventTypesInput) -> models.ListWebhookEventTypesResponse | None
    ```

    `GET /v1/projects/{projectId}/webhooks/event-types`

    **[Download attachment](/docs/beta/api-client/sdk/projects/download-attachment)**

    ```python Python theme={null}
    photon.projects.download_attachment(input: DownloadAttachmentInput) -> bytes
    ```

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

    **[Get project](/docs/beta/api-client/sdk/projects/get)**

    ```python Python theme={null}
    photon.projects.get(input: GetProjectInput) -> models.Project
    ```

    `GET /v1/projects/{projectId}`

    **[Get attachment](/docs/beta/api-client/sdk/projects/get-attachment)**

    ```python Python theme={null}
    photon.projects.get_attachment(input: GetAttachmentInput) -> models.Attachment
    ```

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

    **[Get metrics backfill status](/docs/beta/api-client/sdk/projects/get-message-metrics-backfill)**

    ```python Python theme={null}
    photon.projects.get_message_metrics_backfill(input: GetMessageMetricsBackfillInput) -> models.GetMessageMetricsBackfillResponse
    ```

    `GET /v1/projects/{projectId}/metrics/backfill`

    **[Get metrics SQL schema](/docs/beta/api-client/sdk/projects/get-message-metrics-sql-schema)**

    ```python Python theme={null}
    photon.projects.get_message_metrics_sql_schema(input: GetMessageMetricsSqlSchemaInput) -> models.GetMessageMetricsSqlSchemaResponse
    ```

    `GET /v1/projects/{projectId}/metrics/query`

    **[Get webhook destination](/docs/beta/api-client/sdk/projects/get-webhook-destination)**

    ```python Python theme={null}
    photon.projects.get_webhook_destination(input: GetWebhookDestinationInput) -> models.WebhookDestination
    ```

    `GET /v1/projects/{projectId}/webhooks/destinations/{destinationId}`

    **[Get webhook event schema](/docs/beta/api-client/sdk/projects/get-webhook-event-schema)**

    ```python Python theme={null}
    photon.projects.get_webhook_event_schema(input: GetWebhookEventSchemaInput) -> models.WebhookEventSchema | None
    ```

    `GET /v1/projects/{projectId}/webhooks/event-types/{eventType}/schema`

    **[Create project API key](/docs/beta/api-client/sdk/projects/create-project-api-key)**

    ```python Python theme={null}
    photon.projects.create_project_api_key(input: CreateProjectApiKeyInput) -> models.CreateProjectApiKeyResponse
    ```

    `POST /v1/projects/{projectId}/api-keys`

    **[Create webhook destination](/docs/beta/api-client/sdk/projects/create-webhook-destination)**

    ```python Python theme={null}
    photon.projects.create_webhook_destination(input: CreateWebhookDestinationInput) -> models.CreateWebhookDestinationResponse
    ```

    `POST /v1/projects/{projectId}/webhooks/destinations`

    **[Query metrics](/docs/beta/api-client/sdk/projects/query-message-metrics)**

    ```python Python theme={null}
    photon.projects.query_message_metrics(input: QueryMessageMetricsInput) -> models.QueryMessageMetricsResponse
    ```

    `POST /v1/projects/{projectId}/metrics/query`

    **[Retry webhook delivery](/docs/beta/api-client/sdk/projects/retry-webhook-delivery)**

    ```python Python theme={null}
    photon.projects.retry_webhook_delivery(input: RetryWebhookDeliveryInput) -> models.RetryWebhookDeliveryResponse
    ```

    `POST /v1/projects/{projectId}/webhooks/destinations/{destinationId}/retries`

    **[Rotate webhook signing secret](/docs/beta/api-client/sdk/projects/rotate-webhook-signing-secret)**

    ```python Python theme={null}
    photon.projects.rotate_webhook_signing_secret(input: RotateWebhookSigningSecretInput) -> models.RotateWebhookSigningSecretResponse
    ```

    `POST /v1/projects/{projectId}/webhooks/destinations/{destinationId}/secret-rotations`

    **[Upload attachment](/docs/beta/api-client/sdk/projects/upload-attachment)**

    ```python Python theme={null}
    photon.projects.upload_attachment(input: UploadAttachmentInput) -> models.Attachment
    ```

    `POST /v1/projects/{id}/attachments`

    **[Update project](/docs/beta/api-client/sdk/projects/update)**

    ```python Python theme={null}
    photon.projects.update(input: UpdateProjectInput) -> models.Project
    ```

    `PATCH /v1/projects/{projectId}`

    **[Update project API key permissions](/docs/beta/api-client/sdk/projects/update-project-api-key)**

    ```python Python theme={null}
    photon.projects.update_project_api_key(input: UpdateProjectApiKeyInput) -> models.ProjectApiKeyResponse
    ```

    `PATCH /v1/projects/{projectId}/api-keys/{apiKeyId}`

    **[Update webhook destination](/docs/beta/api-client/sdk/projects/update-webhook-destination)**

    ```python Python theme={null}
    photon.projects.update_webhook_destination(input: UpdateWebhookDestinationInput) -> models.WebhookDestination
    ```

    `PATCH /v1/projects/{projectId}/webhooks/destinations/{destinationId}`

    **[Delete project](/docs/beta/api-client/sdk/projects/delete)**

    ```python Python theme={null}
    photon.projects.delete(input: DeleteProjectInput) -> models.Project
    ```

    `DELETE /v1/projects/{projectId}`

    **[Delete webhook destination](/docs/beta/api-client/sdk/projects/delete-webhook-destination)**

    ```python Python theme={null}
    photon.projects.delete_webhook_destination(input: DeleteWebhookDestinationInput) -> models.WebhookDestination
    ```

    `DELETE /v1/projects/{projectId}/webhooks/destinations/{destinationId}`

    **[Revoke project API key](/docs/beta/api-client/sdk/projects/revoke-project-api-key)**

    ```python Python theme={null}
    photon.projects.revoke_project_api_key(input: RevokeProjectApiKeyInput) -> models.ProjectApiKeyResponse
    ```

    `DELETE /v1/projects/{projectId}/api-keys/{apiKeyId}`
  </Tab>

  <Tab title="Rust">
    **[List attachments](/docs/beta/api-client/sdk/projects/list-attachments)**

    ```rust Rust theme={null}
    client.list_attachments(id: String, params: Option<ListAttachmentsParams>).await -> Result<ResponseValue<types::AttachmentPage>, Error<ListAttachmentsError>>
    ```

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

    **[List project API keys](/docs/beta/api-client/sdk/projects/list-project-api-keys)**

    ```rust Rust theme={null}
    client.list_project_api_keys(project_id: String).await -> Result<ResponseValue<types::ListProjectApiKeysResponse>, Error<ListProjectApiKeysError>>
    ```

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

    **[List webhook API versions](/docs/beta/api-client/sdk/projects/list-webhook-api-versions)**

    ```rust Rust theme={null}
    client.list_webhook_api_versions(project_id: String).await -> Result<ResponseValue<ListWebhookApiVersionsResponse>, Error<ListWebhookApiVersionsError>>
    ```

    `GET /v1/projects/{projectId}/webhooks/api-versions`

    **[List webhook destinations](/docs/beta/api-client/sdk/projects/list-webhook-destinations)**

    ```rust Rust theme={null}
    client.list_webhook_destinations(project_id: String, params: Option<ListWebhookDestinationsParams>).await -> Result<ResponseValue<types::WebhookDestinationPage>, Error<ListWebhookDestinationsError>>
    ```

    `GET /v1/projects/{projectId}/webhooks/destinations`

    **[List webhook egress addresses](/docs/beta/api-client/sdk/projects/list-webhook-egress-addresses)**

    ```rust Rust theme={null}
    client.list_webhook_egress_addresses(project_id: String).await -> Result<ResponseValue<ListWebhookEgressAddressesResponse>, Error<ListWebhookEgressAddressesError>>
    ```

    `GET /v1/projects/{projectId}/webhooks/egress-addresses`

    **[List webhook event types](/docs/beta/api-client/sdk/projects/list-webhook-event-types)**

    ```rust Rust theme={null}
    client.list_webhook_event_types(project_id: String, api_version: Date).await -> Result<ResponseValue<ListWebhookEventTypesResponse>, Error<ListWebhookEventTypesError>>
    ```

    `GET /v1/projects/{projectId}/webhooks/event-types`

    **[Download attachment](/docs/beta/api-client/sdk/projects/download-attachment)**

    ```rust Rust theme={null}
    client.download_attachment(attachment_id: String, id: String).await -> Result<ResponseValue<bytes::Bytes>, Error<DownloadAttachmentError>>
    ```

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

    **[Get project](/docs/beta/api-client/sdk/projects/get)**

    ```rust Rust theme={null}
    client.get_project(project_id: String).await -> Result<ResponseValue<types::Project>, Error<GetProjectError>>
    ```

    `GET /v1/projects/{projectId}`

    **[Get attachment](/docs/beta/api-client/sdk/projects/get-attachment)**

    ```rust Rust theme={null}
    client.get_attachment(attachment_id: String, id: String).await -> Result<ResponseValue<types::Attachment>, Error<GetAttachmentError>>
    ```

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

    **[Get metrics backfill status](/docs/beta/api-client/sdk/projects/get-message-metrics-backfill)**

    ```rust Rust theme={null}
    client.get_message_metrics_backfill(project_id: String, params: Option<GetMessageMetricsBackfillParams>).await -> Result<ResponseValue<types::GetMessageMetricsBackfillResponse>, Error<GetMessageMetricsBackfillError>>
    ```

    `GET /v1/projects/{projectId}/metrics/backfill`

    **[Get metrics SQL schema](/docs/beta/api-client/sdk/projects/get-message-metrics-sql-schema)**

    ```rust Rust theme={null}
    client.get_message_metrics_sql_schema(project_id: String, params: Option<GetMessageMetricsSqlSchemaParams>).await -> Result<ResponseValue<types::GetMessageMetricsSqlSchemaResponse>, Error<GetMessageMetricsSqlSchemaError>>
    ```

    `GET /v1/projects/{projectId}/metrics/query`

    **[Get webhook destination](/docs/beta/api-client/sdk/projects/get-webhook-destination)**

    ```rust Rust theme={null}
    client.get_webhook_destination(destination_id: String, project_id: String).await -> Result<ResponseValue<types::WebhookDestination>, Error<GetWebhookDestinationError>>
    ```

    `GET /v1/projects/{projectId}/webhooks/destinations/{destinationId}`

    **[Get webhook event schema](/docs/beta/api-client/sdk/projects/get-webhook-event-schema)**

    ```rust Rust theme={null}
    client.get_webhook_event_schema(project_id: String, event_type: String, api_version: Date).await -> Result<ResponseValue<GetWebhookEventSchemaResponse>, Error<GetWebhookEventSchemaError>>
    ```

    `GET /v1/projects/{projectId}/webhooks/event-types/{eventType}/schema`

    **[Create project API key](/docs/beta/api-client/sdk/projects/create-project-api-key)**

    ```rust Rust theme={null}
    client.create_project_api_key(idempotency_key: String, project_id: String, body: &types::CreateProjectApiKeyRequest).await -> Result<ResponseValue<types::CreateProjectApiKeyResponse>, Error<CreateProjectApiKeyError>>
    ```

    `POST /v1/projects/{projectId}/api-keys`

    **[Create webhook destination](/docs/beta/api-client/sdk/projects/create-webhook-destination)**

    ```rust Rust theme={null}
    client.create_webhook_destination(idempotency_key: String, project_id: String, body: &types::CreateWebhookDestinationRequest).await -> Result<ResponseValue<types::CreateWebhookDestinationResponse>, Error<CreateWebhookDestinationError>>
    ```

    `POST /v1/projects/{projectId}/webhooks/destinations`

    **[Query metrics](/docs/beta/api-client/sdk/projects/query-message-metrics)**

    ```rust Rust theme={null}
    client.query_message_metrics(project_id: String, params: Option<QueryMessageMetricsParams>, body: &types::ClickHouseSqlQueryRequest).await -> Result<ResponseValue<types::QueryMessageMetricsResponse>, Error<QueryMessageMetricsError>>
    ```

    `POST /v1/projects/{projectId}/metrics/query`

    **[Retry webhook delivery](/docs/beta/api-client/sdk/projects/retry-webhook-delivery)**

    ```rust Rust theme={null}
    client.retry_webhook_delivery(idempotency_key: String, destination_id: String, project_id: String, body: &types::RetryWebhookDeliveryRequest).await -> Result<ResponseValue<types::RetryWebhookDeliveryResponse>, Error<RetryWebhookDeliveryError>>
    ```

    `POST /v1/projects/{projectId}/webhooks/destinations/{destinationId}/retries`

    **[Rotate webhook signing secret](/docs/beta/api-client/sdk/projects/rotate-webhook-signing-secret)**

    ```rust Rust theme={null}
    client.rotate_webhook_signing_secret(idempotency_key: String, destination_id: String, project_id: String, body: &types::RotateWebhookSigningSecretRequest).await -> Result<ResponseValue<types::RotateWebhookSigningSecretResponse>, Error<RotateWebhookSigningSecretError>>
    ```

    `POST /v1/projects/{projectId}/webhooks/destinations/{destinationId}/secret-rotations`

    **[Upload attachment](/docs/beta/api-client/sdk/projects/upload-attachment)**

    ```rust Rust theme={null}
    client.upload_attachment(id: String, content_length: String, content_type: String, idempotency_key: String, body: &bytes::Bytes).await -> Result<ResponseValue<UploadAttachmentResponse>, Error<UploadAttachmentError>>
    ```

    `POST /v1/projects/{id}/attachments`

    **[Update project](/docs/beta/api-client/sdk/projects/update)**

    ```rust Rust theme={null}
    client.update_project(idempotency_key: String, project_id: String, body: &types::UpdateProjectRequest).await -> Result<ResponseValue<types::Project>, Error<UpdateProjectError>>
    ```

    `PATCH /v1/projects/{projectId}`

    **[Update project API key permissions](/docs/beta/api-client/sdk/projects/update-project-api-key)**

    ```rust Rust theme={null}
    client.update_project_api_key(idempotency_key: String, api_key_id: String, project_id: String, body: &types::UpdateProjectApiKeyRequest).await -> Result<ResponseValue<types::ProjectApiKeyResponse>, Error<UpdateProjectApiKeyError>>
    ```

    `PATCH /v1/projects/{projectId}/api-keys/{apiKeyId}`

    **[Update webhook destination](/docs/beta/api-client/sdk/projects/update-webhook-destination)**

    ```rust Rust theme={null}
    client.update_webhook_destination(idempotency_key: String, destination_id: String, project_id: String, body: &types::UpdateWebhookDestinationRequest).await -> Result<ResponseValue<types::WebhookDestination>, Error<UpdateWebhookDestinationError>>
    ```

    `PATCH /v1/projects/{projectId}/webhooks/destinations/{destinationId}`

    **[Delete project](/docs/beta/api-client/sdk/projects/delete)**

    ```rust Rust theme={null}
    client.delete_project(idempotency_key: String, project_id: String).await -> Result<ResponseValue<types::Project>, Error<DeleteProjectError>>
    ```

    `DELETE /v1/projects/{projectId}`

    **[Delete webhook destination](/docs/beta/api-client/sdk/projects/delete-webhook-destination)**

    ```rust Rust theme={null}
    client.delete_webhook_destination(destination_id: String, project_id: String).await -> Result<ResponseValue<types::WebhookDestination>, Error<DeleteWebhookDestinationError>>
    ```

    `DELETE /v1/projects/{projectId}/webhooks/destinations/{destinationId}`

    **[Revoke project API key](/docs/beta/api-client/sdk/projects/revoke-project-api-key)**

    ```rust Rust theme={null}
    client.revoke_project_api_key(idempotency_key: String, api_key_id: String, project_id: String).await -> Result<ResponseValue<types::ProjectApiKeyResponse>, Error<RevokeProjectApiKeyError>>
    ```

    `DELETE /v1/projects/{projectId}/api-keys/{apiKeyId}`
  </Tab>
</Tabs>

## Resources

* [Agent profile](/docs/beta/api-client/sdk/projects/agent-profile)
* [Billing](/docs/beta/api-client/sdk/projects/billing)
* [Platforms](/docs/beta/api-client/sdk/projects/platforms)

## Models

### AttachmentPage

<ResponseField name="items" type={"array of Attachment"} required />

<ResponseField name="nextPageToken" type={"string"}>
  Continue with this token, even if items is empty. Omitted when no more pages remain.
</ResponseField>

### ListProjectApiKeysResponse

<ResponseField name="apiKeys" type={"array of ApiKey"} required />

### ListWebhookApiVersionsResponse

<ResponseField name="apiVersions" type={"array of WebhookApiVersion"} required />

<ResponseField name="contractNamespace" type={"\"@photon-hq/contracts\""} required />

<ResponseField name="packageVersion" type={"string"} required />

### WebhookDestinationPage

<ResponseField name="destinations" type={"array of WebhookDestination"} required />

<ResponseField name="nextPageToken" type={"string"} />

### ListWebhookEgressAddressesResponse

<ResponseField name="ipAddresses" type={"array of string (ipv4)"} required>
  Every public IPv4 address webhook deliveries can originate from. Allow-list all of them; deliveries are spread across every address.
</ResponseField>

### ListWebhookEventTypesResponse

**One of: SelectableWebhookEventCatalog**

<ResponseField name="apiVersion" type={"string (date)"} required />

<ResponseField name="contractNamespace" type={"\"@photon-hq/contracts\""} required />

<ResponseField name="events" type={"array of WebhookEventType"} required />

<ResponseField name="packageVersion" type={"string"} required />

<ResponseField name="retirement" type={"WebhookApiVersionRetirement | null"} required />

<ResponseField name="selectable" type={"true"} required />

<ResponseField name="status" type={"SelectableWebhookApiVersionStatus"} required />

<ResponseField name="successor" type={"string (date) | null"} required />

**One of: DeprecatedWebhookEventCatalog**

<ResponseField name="apiVersion" type={"string (date)"} required />

<ResponseField name="contractNamespace" type={"\"@photon-hq/contracts\""} required />

<ResponseField name="events" type={"array of WebhookEventType"} required />

<ResponseField name="packageVersion" type={"string"} required />

<ResponseField name="retirement" type={"WebhookApiVersionRetirement"} required />

<ResponseField name="selectable" type={"false"} required />

<ResponseField name="status" type={"\"deprecated\""} required />

<ResponseField name="successor" type={"string (date) | null"} required />

### Project

<ResponseField name="agentProfile" type={"AgentProfile"} required />

<ResponseField name="billingInitialization" type={"ProjectBillingInitialization"} />

<ResponseField name="createdAt" type={"string (date-time)"} required />

<ResponseField name="createdByAccountId" type={"string | null"} required />

<ResponseField name="createdByActorId" type={"string | null"} required />

<ResponseField name="createdByActorKind" type={"ProjectCreatedByActorKind | null"} required />

<ResponseField name="deletedAt" type={"string (date-time) | null"} required />

<ResponseField name="name" type={"string"} required />

<ResponseField name="organizationId" type={"string"} required />

<ResponseField name="projectId" type={"string"} required />

<ResponseField name="slug" type={"string"} required />

<ResponseField name="updatedAt" type={"string (date-time)"} required />

### Attachment

<ResponseField name="contentType" type={"string"} required />

<ResponseField name="createdAt" type={"string (date-time)"} required />

<ResponseField name="filename" type={"string"} />

<ResponseField name="id" type={"string"} required />

<ResponseField name="metadata" type={"object"} />

<ResponseField name="projectId" type={"string"} required />

<ResponseField name="sizeBytes" type={"integer"} required />

<ResponseField name="updatedAt" type={"string (date-time)"} required />

### GetMessageMetricsBackfillResponse

<ResponseField name="failedWrites" type={"integer"} required />

<ResponseField name="lastVerifiedAt" type={"string (date-time) | null"} required />

<ResponseField name="processedWrites" type={"integer"} required />

<ResponseField name="state" type={"MessageMetricsBackfillState"} required />

<ResponseField name="version" type={"string (date)"} required />

### GetMessageMetricsSqlSchemaResponse

<ResponseField name="capabilities" type={"MessageMetricsSqlCapabilities"} required />

<ResponseField name="dialect" type={"string"} required />

<ResponseField name="limits" type={"MessageMetricsSqlLimits"} required />

<ResponseField name="projectScoped" type={"true"} required />

<ResponseField name="tables" type={"array of MessageMetricsSqlTable"} required />

<ResponseField name="version" type={"string (date)"} required />

### WebhookDestination

<ResponseField name="apiVersion" type={"string (date)"} required />

<ResponseField name="createdAt" type={"string (date-time)"} required />

<ResponseField name="deletedAt" type={"string (date-time) | null"} required />

<ResponseField name="description" type={"string | null"} required />

<ResponseField name="destinationId" type={"string"} required />

<ResponseField name="enabledEvents" type={"WebhookEventSelection"} required />

<ResponseField name="name" type={"string"} required />

<ResponseField name="projectId" type={"string"} required />

<ResponseField name="status" type={"WebhookDestinationStatus"} required />

<ResponseField name="updatedAt" type={"string (date-time)"} required />

<ResponseField name="url" type={"string (uri)"} required />

### CreateProjectApiKeyResponse

<ResponseField name="apiKey" type={"ApiKey"} required />

<ResponseField name="secret" type={"string"} required />

### CreateWebhookDestinationResponse

<ResponseField name="destination" type={"WebhookDestination"} required />

<ResponseField name="signingSecret" type={"string"} required />

### QueryMessageMetricsResponse

<ResponseField name="columns" type={"array of MessageMetricsQueryColumn"} required />

<ResponseField name="rows" type={"array of array of object"} required />

<ResponseField name="statistics" type={"MessageMetricsQueryStatistics"} required />

### RetryWebhookDeliveryResponse

<ResponseField name="status" type={"\"accepted\""} required />

### RotateWebhookSigningSecretResponse

<ResponseField name="previousSecretExpiresAt" type={"string (date-time) | null"} required />

<ResponseField name="signingSecret" type={"string"} required />

### ProjectApiKeyResponse

<ResponseField name="apiKey" type={"ApiKey"} required />


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.