List event subscriptions
const url = 'https://api.getsitecontrol.com/v1/sites/1/event-subscriptions';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.getsitecontrol.com/v1/sites/1/event-subscriptions \ --header 'Authorization: Bearer <token>'Every event subscription of the site in one response, inactive ones included; a site holds at most 20. An event subscription sends an HTTP request to its url each time one of its events happens on the site. Each comes with its full configuration and the time of its last real success and failure, so call this first to check whether a receiver is failing. Event subscriptions the caller may not read are left out. Secret header values read ***; the signing secret is never shown. A widget’s own webhook and Zapier integrations are not listed here: they are in list_integrations. Rights follow the data an event subscription sends out: response.created needs the widgets and contacts sections, contact.created the contacts section. Reading needs view of each, changing edit.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”object
object
Your label for the event subscription
Event types it sends
object
Only responses of these widgets (ids from list_widgets), at most 100; empty means every widget. Only with response.created
Receiver URL; placeholders are filled for each event
HTTP method of the request
Json: an application/json body; form: an application/x-www-form-urlencoded body, the default payload flattened into keys when there is no template
object
Header name, e.g. Authorization. Host, Content-Length, Transfer-Encoding, Connection, User-Agent and webhook-* are set by the sender. A Content-Type replaces the one of format
Sent as is, no placeholders; at most 4096 characters, no line breaks. On update, *** in a secret header keeps its stored value
True for credentials: the value is stored encrypted, reads *** everywhere and is masked in the journal
Body template; null sends the default payload
Version of the payload sent: the GSC-Version of the request that created the event subscription; changes only with update_event_subscription
True: sends events; false: sends nothing, and deliveries still waiting are cancelled
Last real delivery accepted by the receiver; tests not counted
Last real delivery that failed for good; tests not counted. A failing receiver never disables the event subscription
Null when created with an API key or by Support
object
Null for Support or for a user who was deleted
Null when the user has no name
The user’s sign-in e-mail; null for Support
{ "items": [ { "method": "POST", "format": "json", "headers": [ { "is_secret": false } ] } ]}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
Authentication scheme: Bearer
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
Seconds until the bucket refills
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds