Method: subscriptions.patch

  • This method updates or renews a Google Workspace subscription using a PATCH request to the specified endpoint.

  • Developers can update subscription fields like expireTime, ttl, and eventTypes using the updateMask query parameter.

  • Request bodies should contain a Subscription object, while successful responses include an Operation object with the updated Subscription.

  • Authorization requires one of the listed OAuth scopes, such ashttps://www.googleapis.com/auth/chat.spaces or similar, granting specific permissions.

Updates or renews a Google Workspace subscription. To learn how to use this method, seeUpdate or renew a Google Workspace subscription.

HTTP request

PATCH https://workspaceevents.googleapis.com/v1/{subscription.name=subscriptions/*}

The URL usesgRPC Transcoding syntax.

Path parameters

Parameters
subscription.name

string

Identifier. Resource name of the subscription.

Format:subscriptions/{subscription}

Query parameters

Parameters
updateMask

string (FieldMask format)

Optional. The field to update. If omitted, updates any fields included in the request.

You can update one of the following fields in a subscription:

  • expireTime: The timestamp when the subscription expires.
  • ttl: The time-to-live (TTL) or duration of the subscription.
  • eventTypes: The list of event types to receive about the target resource.

When using the* wildcard (equivalent toPUT), omitted fields are set to empty values and rejected if they're invalid.

validateOnly

boolean

Optional. If set totrue, validates and previews the request, but doesn't update the subscription.

Request body

The request body contains an instance ofSubscription.

Response body

If successful, the response body contains an instance ofOperation.

  • Themetadata field contains an empty array.
  • Theresponse field contains an updated instance ofSubscription.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/chat.spaces
  • https://www.googleapis.com/auth/chat.spaces.readonly
  • https://www.googleapis.com/auth/chat.messages
  • https://www.googleapis.com/auth/chat.messages.readonly
  • https://www.googleapis.com/auth/chat.messages.reactions
  • https://www.googleapis.com/auth/chat.messages.reactions.readonly
  • https://www.googleapis.com/auth/chat.memberships
  • https://www.googleapis.com/auth/chat.memberships.readonly
  • https://www.googleapis.com/auth/meetings.space.created
  • https://www.googleapis.com/auth/meetings.space.readonly

For more information, see theAuthorization guide.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-10 UTC.