WebhookSubscriptions
Create webhook subscription
Creates a webhook subscription. A successful request returns the created Webhook Subscription resource. Requires an OAuth access token; API keys are not supported. The OAuth token must hold scopes appropriate for each subscribed event topic: order.create and order.update require website.orders or website.orders.read; contact.create, contact.update, contact.delete, address.create, address.update, and address.delete require website.contacts; extension.uninstall requires no event-specific scope.
post/1.0/webhook_subscriptions
Request
- Base URLhttps://api.squarespace.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
Authorizationstring required
API key or OAuth access token
User-Agentstring required
User Agent
Request body
Example request
{
"endpointUrl": "https://example-extension.com/uninstall",
"topics": [
"extension.uninstall"
]
}Response
The created webhook subscription.
Example response
{
"clientId": "A125dfPqdKJDqPAcJQgLo3A5mwcKIq2G",
"createdOn": "2020-04-22T22:18:00Z",
"endpointUrl": "https://example-extension.com/uninstall",
"id": "7aff04bb-90e0-4002-96c2-69d8162c8dae",
"secret": "F3F9B981C78E7A6187E42853F6CE2804177E98206164779423B02DEC981ACD6B",
"topics": [
"extension.uninstall"
],
"updatedOn": "2020-04-22T22:18:00Z",
"websiteId": "7aff04bb-90e0-4002-96c2-69d8162c8dae"
}Changes
No recorded changes to this operation across all 1 revision of this API.