Skip to main content
Webhooks let your external systems react to activity in your Google workspace the moment it happens, without polling. When an event occurs — a record is created, a user is removed, an integration goes live — Google sends an HTTP POST request with a structured JSON payload to the URL you register. This makes it straightforward to build automation pipelines, audit logs, or live dashboards that stay in sync with your workspace in real time.

Available Events

The following events can trigger webhook deliveries to your registered endpoints.

Webhook Payload

Every webhook delivery is a POST request to your registered URL with a Content-Type: application/json header and a consistent JSON body structure. The data object reflects the resource that triggered the event.

Example Payload

Payload Fields

string
The event type that triggered this delivery (e.g., record.created).
string
ISO 8601 timestamp of when the event occurred in the workspace.
string
The unique identifier of the workspace where the event took place.
object
The resource object associated with the event. The shape of this object varies by event type — record events include record fields, user events include user fields, and so on.
Google expects your endpoint to respond with an HTTP 2xx status code within 5 seconds. If the delivery times out or receives a non-2xx response, it will be retried up to three times with exponential backoff.

Register Webhook

Register a new endpoint URL to start receiving event notifications for your workspace. POST https://api.google.com/v1/webhooks

Body Parameters

string
required
The publicly accessible HTTPS URL that Google should send event payloads to. Must begin with https://.
array
required
An array of event type strings to subscribe to. Use ["*"] to subscribe to all events. See the Available Events table for valid values.
string
An optional secret string used to generate an HMAC-SHA256 signature for each delivery. When provided, Google includes an X-Google-Signature header with every request so you can verify authenticity. See Verifying Webhook Signatures for implementation details.

Example Request

Example Response


List Webhooks

Retrieve all webhook registrations for your workspace. GET https://api.google.com/v1/webhooks

Example Request

Example Response


Delete Webhook

Remove a registered webhook. Google will immediately stop delivering events to the associated URL. DELETE https://api.google.com/v1/webhooks/:id

Path Parameters

string
required
The unique identifier of the webhook to delete (e.g., wh_abc123).

Example Request

A successful deletion returns HTTP 204 No Content with an empty body.

Verifying Webhook Signatures

When you register a webhook with a secret, Google includes an X-Google-Signature header with every request. The value is a SHA-256 HMAC of the raw request body, prefixed with sha256=. Verifying this signature ensures the payload genuinely came from Google and has not been tampered with.

Verification Example (Node.js)

Always compute the HMAC over the raw request body bytes — not a re-serialized JSON object. Parsing and re-stringifying the payload can change whitespace and key ordering, producing a different byte sequence and causing signature validation to fail. Use express.raw() (or equivalent) to capture the original bytes before any JSON parsing occurs.
While developing locally, use a tunneling tool like ngrok to expose your local server to the internet and receive live webhook deliveries. Run ngrok http 3000 to get a public HTTPS URL, then register that URL as your webhook endpoint. This lets you iterate on your handler without deploying to a staging environment.

Error Reference

The request body is missing required fields (url or events), the URL is not a valid HTTPS address, or the events array contains unrecognized event types.
Your API key is missing or invalid. Include a valid Bearer token in the Authorization header.
No webhook exists with the specified id. Use the List Webhooks endpoint to confirm the correct identifier.
The request is syntactically valid but the provided url is unreachable or returns non-2xx responses during validation.
You have exceeded the webhook registration limit for your plan. Review your existing webhooks and remove any that are no longer needed.