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"requiredThe event subscribed to.
targetUrlstringrequiredThe URL to send the webhook to. Must be a valid HTTPS URL.
metadataobjectAdditional 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.
albumIdstringrequiredobject
event"newAlbum"requiredThe event subscribed to.
targetUrlstringrequiredThe URL to send the webhook to. Must be a valid HTTPS URL.
metadataobjectAdditional 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"requiredThe event subscribed to.
targetUrlstringrequiredThe URL to send the webhook to. Must be a valid HTTPS URL.
metadataobjectAdditional 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.
albumIdstringrequiredlabelstringrequiredmin 1max 40The label to filter events by (max. 40 characters)
Response · 200 Webhook subscription created successfully
dataobjectrequiredwebhookIdstringrequiredThe unique identifier for the webhook subscription
configWebhookConfigNewPhoto | WebhookConfigNewAlbum | WebhookConfigPhotoLabelAddedrequiredThe configuration for the webhook subscription, which includes the event type, target URL, and any additional metadata.
object
event"newPhoto"requiredThe event subscribed to.
targetUrlstringrequiredThe URL to send the webhook to. Must be a valid HTTPS URL.
metadataWebhookMetadataAdditional 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.
albumIdAlbumIdrequiredobject
event"newAlbum"requiredThe event subscribed to.
targetUrlstringrequiredThe URL to send the webhook to. Must be a valid HTTPS URL.
metadataWebhookMetadataAdditional 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"requiredThe event subscribed to.
targetUrlstringrequiredThe URL to send the webhook to. Must be a valid HTTPS URL.
metadataWebhookMetadataAdditional 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.
albumIdAlbumIdrequiredlabelstringrequiredmin 1max 40The label to filter events by (max. 40 characters)
warningsArray<string>string