swshswshPublic API
Download OpenAPIView raw

Subscribe to a webhook

POST/webhook/createSubscription

Authentication

Include your API key in the x-api-key header on every request.

Request body

WebhookConfigNewPhoto | WebhookConfigNewAlbum | WebhookConfigPhotoLabelAdded
The configuration for the webhook subscription.
object
event"newPhoto"required
The event subscribed to.
targetUrlstringrequired
The URL to send the webhook to. Must be a valid HTTPS URL.
metadataobject
Additional metadata included in the webhook request. This can be used to pass custom data to the webhook handler. Valid value types are string, number, and boolean.
albumIdstringrequired
object
event"newAlbum"required
The event subscribed to.
targetUrlstringrequired
The URL to send the webhook to. Must be a valid HTTPS URL.
metadataobject
Additional metadata included in the webhook request. This can be used to pass custom data to the webhook handler. Valid value types are string, number, and boolean.
object
event"photoLabelAdded"required
The event subscribed to.
targetUrlstringrequired
The URL to send the webhook to. Must be a valid HTTPS URL.
metadataobject
Additional metadata included in the webhook request. This can be used to pass custom data to the webhook handler. Valid value types are string, number, and boolean.
albumIdstringrequired
labelstringrequiredmin 1max 40
The label to filter events by (max. 40 characters)

Response · 200 Webhook subscription created successfully

dataobjectrequired
webhookIdstringrequired
The unique identifier for the webhook subscription
configWebhookConfigNewPhoto | WebhookConfigNewAlbum | WebhookConfigPhotoLabelAddedrequired
The configuration for the webhook subscription, which includes the event type, target URL, and any additional metadata.
object
event"newPhoto"required
The event subscribed to.
targetUrlstringrequired
The URL to send the webhook to. Must be a valid HTTPS URL.
metadataWebhookMetadata
Additional metadata included in the webhook request. This can be used to pass custom data to the webhook handler. Valid value types are string, number, and boolean.
albumIdAlbumIdrequired
object
event"newAlbum"required
The event subscribed to.
targetUrlstringrequired
The URL to send the webhook to. Must be a valid HTTPS URL.
metadataWebhookMetadata
Additional metadata included in the webhook request. This can be used to pass custom data to the webhook handler. Valid value types are string, number, and boolean.
object
event"photoLabelAdded"required
The event subscribed to.
targetUrlstringrequired
The URL to send the webhook to. Must be a valid HTTPS URL.
metadataWebhookMetadata
Additional metadata included in the webhook request. This can be used to pass custom data to the webhook handler. Valid value types are string, number, and boolean.
albumIdAlbumIdrequired
labelstringrequiredmin 1max 40
The label to filter events by (max. 40 characters)
warningsArray<string>
string

Errors

400Invalid request. The request was malformed or missing required parameters.
403Forbidden. The caller does not have permission to perform this action.