Skip to main content

Methods

List attachments
TypeScript
GET /v1/projects/{id}/attachmentsList Messages
TypeScript
GET /v1/projects/{id}/messagesList project API keys
TypeScript
GET /v1/projects/{projectId}/api-keysList Spaces
TypeScript
GET /v1/projects/{id}/spacesList Users
TypeScript
GET /v1/projects/{id}/usersList webhook API versions
TypeScript
GET /v1/projects/{projectId}/webhooks/api-versionsList webhook destinations
TypeScript
GET /v1/projects/{projectId}/webhooks/destinationsList webhook egress addresses
TypeScript
GET /v1/projects/{projectId}/webhooks/egress-addressesList webhook event types
TypeScript
GET /v1/projects/{projectId}/webhooks/event-typesCount Messages
TypeScript
GET /v1/projects/{id}/messages/countCount Spaces
TypeScript
GET /v1/projects/{id}/spaces/countCount Users
TypeScript
GET /v1/projects/{id}/users/countDownload attachment
TypeScript
GET /v1/projects/{id}/attachments/{attachmentId}/contentGet project
TypeScript
GET /v1/projects/{projectId}Get attachment
TypeScript
GET /v1/projects/{id}/attachments/{attachmentId}Get a Message
TypeScript
GET /v1/projects/{id}/messages/{messageId}Get metrics backfill status
TypeScript
GET /v1/projects/{projectId}/metrics/backfillGet metrics SQL schema
TypeScript
GET /v1/projects/{projectId}/metrics/queryGet a Space
TypeScript
GET /v1/projects/{id}/spaces/{spaceId}Get an User
TypeScript
GET /v1/projects/{id}/users/{userId}Get webhook destination
TypeScript
GET /v1/projects/{projectId}/webhooks/destinations/{destinationId}Get webhook event schema
TypeScript
GET /v1/projects/{projectId}/webhooks/event-types/{eventType}/schemaCreate or get a Space
TypeScript
POST /v1/projects/{id}/spacesCreate or get a User
TypeScript
POST /v1/projects/{id}/usersCreate project API key
TypeScript
POST /v1/projects/{projectId}/api-keysCreate webhook destination
TypeScript
POST /v1/projects/{projectId}/webhooks/destinationsMark a Message as read
TypeScript
POST /v1/projects/{id}/messages/{messageId}/readQuery metrics
TypeScript
POST /v1/projects/{projectId}/metrics/queryRetry webhook delivery
TypeScript
POST /v1/projects/{projectId}/webhooks/destinations/{destinationId}/retriesRotate webhook signing secret
TypeScript
POST /v1/projects/{projectId}/webhooks/destinations/{destinationId}/secret-rotationsSend a Message
TypeScript
POST /v1/projects/{id}/messagesSet typing in a Space
TypeScript
POST /v1/projects/{id}/spaces/{spaceId}/typingUpload attachment
TypeScript
POST /v1/projects/{id}/attachmentsUpdate project
TypeScript
PATCH /v1/projects/{projectId}Update project API key permissions
TypeScript
PATCH /v1/projects/{projectId}/api-keys/{apiKeyId}Update webhook destination
TypeScript
PATCH /v1/projects/{projectId}/webhooks/destinations/{destinationId}Delete project
TypeScript
DELETE /v1/projects/{projectId}Delete webhook destination
TypeScript
DELETE /v1/projects/{projectId}/webhooks/destinations/{destinationId}Revoke project API key
TypeScript
DELETE /v1/projects/{projectId}/api-keys/{apiKeyId}

Resources

Models

AttachmentPage

array of Attachment
required
string
Continue with this token, even if items is empty. Omitted when no more pages remain.

MessagePage

array of PlatformMessage
required
Unsupported platforms and records with unsupported data are omitted.
string
Continue with this token, even if items is empty. Omitted when no more pages remain.

ListProjectApiKeysResponse

array of ApiKey
required

SpacePage

array of PlatformSpace
required
Unsupported platforms and records with unsupported data are omitted.
string
Continue with this token, even if items is empty. Omitted when no more pages remain.

UserPage

array of PlatformUser
required
Unsupported platforms and records with unsupported data are omitted.
string
Continue with this token, even if items is empty. Omitted when no more pages remain.

ListWebhookApiVersionsResponse

array of WebhookApiVersion
required
"@photon-hq/contracts"
required
string
required

WebhookDestinationPage

array of WebhookDestination
required
string

ListWebhookEgressAddressesResponse

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.

ListWebhookEventTypesResponse

One of: SelectableWebhookEventCatalog
string (date)
required
"@photon-hq/contracts"
required
array of WebhookEventType
required
string
required
WebhookApiVersionRetirement | null
required
true
required
SelectableWebhookApiVersionStatus
required
string (date) | null
required
One of: DeprecatedWebhookEventCatalog
string (date)
required
"@photon-hq/contracts"
required
array of WebhookEventType
required
string
required
WebhookApiVersionRetirement
required
false
required
"deprecated"
required
string (date) | null
required

CountMessagesResponse

One of: MessageCount
integer
required
array of MessageStatusCount
required
One of: DailyMessageCount
array of MessageCountBucket
required
integer
required
array of MessageStatusCount
required
"day"
required
string
required

SpaceCount

integer
required

UserCount

integer
required

Project

AgentProfile
required
ProjectBillingInitialization
string (date-time)
required
string | null
required
string | null
required
ProjectCreatedByActorKind | null
required
string (date-time) | null
required
string
required
string
required
string
required
string
required
string (date-time)
required

Attachment

string
required
string (date-time)
required
string
string
required
object
string
required
integer
required
string (date-time)
required

PlatformMessage

object
required
UserSnapshot
TelegramMessageContent
required
string (date-time)
required
When Photon first persisted this resource.
MessageFailure
required
string
required
ResourceMetadata
required
string
Platform
required
string
required
UserSnapshot
UserSnapshot
required
SpaceSnapshot
required
"failed"
required
object
FailedMessageTimestamps
required
string (date-time)
required
When Photon last persisted a change to this resource’s public state.

GetMessageMetricsBackfillResponse

integer
required
string (date-time) | null
required
integer
required
MessageMetricsBackfillState
required
string (date)
required

GetMessageMetricsSqlSchemaResponse

MessageMetricsSqlCapabilities
required
string
required
MessageMetricsSqlLimits
required
true
required
array of MessageMetricsSqlTable
required
string (date)
required

PlatformSpace

string (date-time)
required
When Photon first persisted this resource.
TelegramSpaceDetails
required
string
required
string
required
ResourceMetadata
required
array of string
required
Platform
required
string
required
string (date-time)
required
When Photon last persisted a change to this resource’s public state.

PlatformUser

string (date-time)
required
When Photon first persisted this resource.
TelegramUserDetails
required
string
required
string
required
string
required
ResourceMetadata
required
Platform
required
string
required
string (date-time)
required
When Photon last persisted a change to this resource’s public state.

WebhookDestination

string (date)
required
string (date-time)
required
string (date-time) | null
required
string | null
required
string
required
WebhookEventSelection
required
string
required
string
required
WebhookDestinationStatus
required
string (date-time)
required
string (uri)
required

CreateProjectApiKeyResponse

ApiKey
required
string
required

CreateWebhookDestinationResponse

WebhookDestination
required
string
required

MarkMessageReadResponse

object
required
UserSnapshot
TelegramMessageContent
required
string (date-time)
required
When Photon first persisted this resource.
MessageFailure
required
string
required
ResourceMetadata
required
string
Platform
required
string
required
UserSnapshot
UserSnapshot
required
SpaceSnapshot
required
SentMessageStatus
required
object
FailedMessageTimestamps
required
string (date-time)
required
When Photon last persisted a change to this resource’s public state.

QueryMessageMetricsResponse

array of MessageMetricsQueryColumn
required
array of array of object
required
MessageMetricsQueryStatistics
required

RetryWebhookDeliveryResponse

"accepted"
required

RotateWebhookSigningSecretResponse

string (date-time) | null
required
string
required

SentMessage

object
required
UserSnapshot
TelegramMessageContent
required
string (date-time)
required
When Photon first persisted this resource.
MessageFailure
required
string
required
ResourceMetadata
required
string
Platform
required
string
required
UserSnapshot
UserSnapshot
required
SpaceSnapshot
required
SentMessageStatus
required
object
FailedMessageTimestamps
required
string (date-time)
required
When Photon last persisted a change to this resource’s public state.

SetSpaceTypingResponse

object
required
UserSnapshot
SetSpaceTypingContent
required
string (date-time)
required
When Photon first persisted this resource.
MessageFailure
required
string
required
ResourceMetadata
required
string
"telegram"
required
string
required
UserSnapshot
UserSnapshot
required
SpaceSnapshot
required
"dispatched"
required
object
FailedMessageTimestamps
required
string (date-time)
required
When Photon last persisted a change to this resource’s public state.

ProjectApiKeyResponse

ApiKey
required