Squarespace Developer Platform: APIs, Apps, and Docs
Commerce API

WebhookSubscriptions


List webhook subscriptions

GET
https://api.squarespace.com
/1.0/webhook_subscriptions

Retrieves information for all webhook subscriptions. The response contains up to 25 Webhook Subscriptions. Requires an OAuth access token; API keys are not supported.

List webhook subscriptions › Headers

Authorization
​string · required

API key or OAuth access token

Default: Bearer YOUR_API_KEY_OR_OAUTH_TOKEN
User-Agent
​string · required

User Agent

Default: YOUR_CUSTOM_APP_DESCRIPTION

List webhook subscriptions › Responses

OK

Array of Webhook Subscription resources. If the merchant site doesn't have any webhook subscriptions, this array is empty.


Create webhook subscription

POST
https://api.squarespace.com
/1.0/webhook_subscriptions

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.

Create webhook subscription › Headers

Authorization
​string · required

API key or OAuth access token

Default: Bearer YOUR_API_KEY_OR_OAUTH_TOKEN
User-Agent
​string · required

User Agent

Default: YOUR_CUSTOM_APP_DESCRIPTION

Create webhook subscription › Request Body

endpointUrl
​string · required

HTTPS URL to POST webhook notifications.

Example: https://example-extension.com/uninstall
topics
​string[]

List of event topics that trigger a webhook notification.

Enum values:
order.create
order.update
extension.uninstall
contact.create
contact.update
contact.delete
address.create
address.update

Create webhook subscription › Responses

The created webhook subscription.

clientId
​string · readOnly · required

Third-party client id.

Example: A125dfPqdKJDqPAcJQgLo3A5mwcKIq2G
createdOn
​string · date-time · readOnly · required

ISO 8601 UTC date and time string; represents when the webhook subscription was created.

Example: 2020-04-22T22:18:00Z
endpointUrl
​string · required

HTTPS URL to POST webhook notifications.

Example: https://example-extension.com/uninstall
id
​string · readOnly · required

Unique Webhook Subscription id.

Example: 7aff04bb-90e0-4002-96c2-69d8162c8dae
secret
​string · readOnly · required

Hexadecimal value used to generate a signature for a webhook notification; field is only returned when creating a new subscription or rotating a secret. Store the secret in a safe location to verify notifications from Squarespace. See the 'Verifying notifications' guide under Webhooks for details.

Example: F3F9B981C78E7A6187E42853F6CE2804177E98206164779423B02DEC981ACD6B
updatedOn
​string · date-time · readOnly · required

ISO 8601 UTC date and time string; represents when the webhook subscription was last modified.

Example: 2020-04-22T22:18:00Z
websiteId
​string · readOnly · required

Unique Webhook Subscription id.

Example: 7aff04bb-90e0-4002-96c2-69d8162c8dae
topics
​string[]

List of event topics that trigger a webhook notification.

Enum values:
order.create
order.update
extension.uninstall
contact.create
contact.update
contact.delete
address.create
address.update

Get webhook subscription

GET
https://api.squarespace.com
/1.0/webhook_subscriptions/{subscriptionId}

Retrieves information for a specific webhook subscription. Requires an OAuth access token; API keys are not supported.

Get webhook subscription › path Parameters

subscriptionId
​string · required

Specifies the Webhook Subscription to retrieve.

Get webhook subscription › Headers

Authorization
​string · required

API key or OAuth access token

Default: Bearer YOUR_API_KEY_OR_OAUTH_TOKEN
User-Agent
​string · required

User Agent

Default: YOUR_CUSTOM_APP_DESCRIPTION

Get webhook subscription › Responses

OK

clientId
​string

Third-party client id.

createdOn
​string

ISO 8601 UTC date and time string; represents when the webhook subscription was created.

endpointUrl
​string

HTTPS URL that receives webhook notifications.

id
​string

Unique Webhook Subscription id.

topics
​string[]

List of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update.

updatedOn
​string

ISO 8601 UTC date and time string; represents when the webhook subscription was last modified.

websiteId
​string

Unique website id.


Update webhook subscription

POST
https://api.squarespace.com
/1.0/webhook_subscriptions/{subscriptionId}

Updates information for a webhook subscription. A successful request returns the updated 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.

Update webhook subscription › path Parameters

subscriptionId
​string · required

Specifies the Webhook Subscription to update.

Update webhook subscription › Headers

Authorization
​string · required

API key or OAuth access token

Default: Bearer YOUR_API_KEY_OR_OAUTH_TOKEN
User-Agent
​string · required

User Agent

Default: YOUR_CUSTOM_APP_DESCRIPTION

Update webhook subscription › Request Body

​ChangeString

Optional; HTTPS URL to receive webhook notifications.

Optional; list of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update.

Update webhook subscription › Responses

OK

clientId
​string

Third-party client id.

createdOn
​string

ISO 8601 UTC date and time string; represents when the webhook subscription was created.

endpointUrl
​string

HTTPS URL that receives webhook notifications.

id
​string

Unique Webhook Subscription id.

topics
​string[]

List of event topics that trigger a webhook notification. Possible values include: extension.uninstall, order.create, order.update.

updatedOn
​string

ISO 8601 UTC date and time string; represents when the webhook subscription was last modified.

websiteId
​string

Unique website id.


Delete webhook subscription

DELETE
https://api.squarespace.com
/1.0/webhook_subscriptions/{subscriptionId}

Deletes a webhook subscription. Requires an OAuth access token; API keys are not supported.

Delete webhook subscription › path Parameters

subscriptionId
​string · required

Specifies the Webhook Subscription to delete.

Delete webhook subscription › Headers

Authorization
​string · required

API key or OAuth access token

Default: Bearer YOUR_API_KEY_OR_OAUTH_TOKEN
User-Agent
​string · required

User Agent

Default: YOUR_CUSTOM_APP_DESCRIPTION

Delete webhook subscription › Responses

No content. The webhook subscription was deleted successfully.

No data returned

Rotate webhook subscription secret

POST
https://api.squarespace.com
/1.0/webhook_subscriptions/{subscriptionId}/actions/rotateSecret

Rotates a webhook subscription's secret. The previous secret for a subscription is no longer valid after a new one is generated. Requires an OAuth access token; API keys are not supported.

Rotate webhook subscription secret › path Parameters

subscriptionId
​string · required

Specifies the Webhook Subscription to update.

Rotate webhook subscription secret › Headers

Authorization
​string · required

API key or OAuth access token

Default: Bearer YOUR_API_KEY_OR_OAUTH_TOKEN
User-Agent
​string · required

User Agent

Default: YOUR_CUSTOM_APP_DESCRIPTION

Rotate webhook subscription secret › Responses

OK

secret
​string

Hexadecimal value used to generate a signature for a webhook notification; field is only returned when creating a new subscription or rotating a secret. Store the secret in a safe location to verify notifications from Squarespace.


Send test notification

POST
https://api.squarespace.com
/1.0/webhook_subscriptions/{subscriptionId}/actions/sendTestNotification

Sends a notification to a subscribed webhook endpoint for testing purposes. This is a one-time notification, and will not be retried if it fails or times out. Requires an OAuth access token; API keys are not supported.

Send test notification › path Parameters

subscriptionId
​string · required

Specifies the Webhook Subscription to send a notification to.

Send test notification › Headers

Authorization
​string · required

API key or OAuth access token

Default: Bearer YOUR_API_KEY_OR_OAUTH_TOKEN
User-Agent
​string · required

User Agent

Default: YOUR_CUSTOM_APP_DESCRIPTION

Send test notification › Request Body

topic
​string · required

Required; Squarespace event topic that triggers a webhook notification. Possible values include: extension.uninstall, order.create, order.update.

Send test notification › Responses

OK

statusCode
​integer · int32

Status code returned by the subscribed webhook endpoint.