Gmail Pub/Sub push webhook
Receives Gmail Pub/Sub push notifications. The relay decodes the base64 payload, looks up the matching EmailAccount by history id, and triggers an incremental sync. Public endpoint - auth is enforced by the Pub/Sub OIDC token, not bearer JWT.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
text/plain
application/json
curl -X POST "https://example.com/api/webhook/email/gmail" \ -H "Content-Type: application/json" \ -d '{ "message": { "data": "eyJlbWFpbEFkZHJlc3MiOiJvcHNAYWNtZS5leGFtcGxlIiwiaGlzdG9yeUlkIjoxMjM0NTZ9" } }'"OK"