Template Docs Commerce APIs Webhooks
Get Started
Get Started

Retrieve a specific webhook subscription

GET /api.squarespace.com/{api-version}/webhook_subscriptions/{id}

Retrieves information for a specific webhook subscription.

The response contains a Webhook Subscription resource.

Parameters

{api-version} string
required

See the Webhook Subscriptions API Overview page for the current API version.


{id} string
required

Specifies the Webhook Subscription to retrieve.

Request example

Read the Overview to learn about specific API permissions. Every request should also abide by Squarespace rate limits.

curl "https://api.squarespace.com/1.0/webhook_subscriptions/123" \
  -i \
  -H "Authorization: Bearer YOUR_OAUTH_TOKEN" \
  -H "User-Agent: YOUR_CUSTOM_APP_DESCRIPTION"

Response example

A successful request generates a JSON response with the requested Webhook Subscription.

Note: For easier reference between response fields and descriptions, comments were added in the example, though this makes the JSON invalid.

{
  // Unique Webhook Subscription id.
  "id": "7aff04bb-90e0-4002-96c2-69d8162c8dae",
  // HTTPS URL that receives webhook notifications.
  "endpointUrl": "https://example-extension.com/uninstall",
  // List of event topics that trigger a webhook notification.
  // Possible values include: `extension.uninstall`, `order.create`, `order.update`.
  "topics": ["extension.uninstall"],
  // ISO 8601 UTC date and time string; represents when the webhook subscription was created. 
  "createdOn": "2020-04-22T22:18+00:00",
  // ISO 8601 UTC date and time string; represents when the webhook subscription was last modified.
  "updatedOn": "2020-04-22T22:18+00:00"
}

Status codes and error conditions

200 OK

The request was successful. The message body contains data in the format specified above.


404 NOT FOUND

Type: INVALID_REQUEST_ERROR

Subtype: INVALID_ARGUMENT
The requested Webhook Subscription was not found.