AI-generated Key Takeaways
- 
          Creates a Google Workspace subscription using an HTTP POST request to a specified URL. 
- 
          Allows validation and preview of the request without creating a subscription using the validateOnlyquery parameter.
- 
          Requires providing a Subscription object in the request body and returns an Operation object in the response, containing the new subscription details. 
- 
          Requires specific authorization scopes, such as chat and meeting related scopes, for access control and permissions. 
- 
          Is currently available as part of the Google Workspace Developer Preview Program. 
Creates a Google Workspace subscription. To learn how to use this method, see Create a Google Workspace subscription.
For a subscription on a Chat target resource, you can create a subscription as:
- A Chat app by specifying an authorization scope that begins with - chat.appand getting one-time administrator approval (Developer Preview). To learn more, see Authorize as a Chat app with administrator approval.
- A user by specifying an authorization scope that doesn't include - appin its name. To learn more, see Authorize as a Chat user.
HTTP request
POST https://workspaceevents.googleapis.com/v1beta/subscriptions
The URL uses gRPC Transcoding syntax.
Query parameters
| Parameters | |
|---|---|
| validateOnly | 
 Optional. If set to  | 
Request body
The request body contains an instance of Subscription.
Response body
If successful, the response body contains a newly created instance of Operation.
- The metadatafield contains an empty array.
- The responsefield contains a new 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/chat.app.memberships
- https://www.googleapis.com/auth/chat.app.messages.readonly
- https://www.googleapis.com/auth/chat.app.spaces
- https://www.googleapis.com/auth/meetings.space.created
- https://www.googleapis.com/auth/meetings.space.readonly
- https://www.googleapis.com/auth/drive
- https://www.googleapis.com/auth/drive.file
- https://www.googleapis.com/auth/drive.metadata
- https://www.googleapis.com/auth/drive.metadata.readonly
- https://www.googleapis.com/auth/drive.readonly
For more information, see the Authorization guide.