gmail.users.watch
Set up or update Gmail push notifications for a mailbox by registering a Pub/Sub topic with optional label filters through the Gmail API.
Instructions
Set up or update a push notification watch on the given user mailbox. For more information, see Configure push notifications in Gmail API [HTTP POST] — creates or triggers a change; refused under --readonly safety profiles. Returns the API's response resource as JSON — request body is a JSON WatchRequest object accepting labelFilterAction, labelFilterBehavior, labelIds, topicName; pass it via params or whole via body_file Siblings over the same resource: getProfile, stop.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Extra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe. | |
| params | No | Parameter map merged into the request; typed parameters win. | |
| userId | Yes | [URL path segment] The user's email address. The special value `me` can be used to indicate the authenticated user. | me |
| dry_run | No | Return the request that would be sent, without sending it. | |
| body_file | No | Read the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON WatchRequest object. | |
| request_body | No | Request body of type WatchRequest: pass it via `params` (merged into the built body) or whole via `body_file`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| historyId | No | ||
| expiration | No |