- [HTTP request](https://developers.google.com/workspace/events/reference/rest/v1beta/subscriptions/create#body.HTTP_TEMPLATE)
- [Query parameters](https://developers.google.com/workspace/events/reference/rest/v1beta/subscriptions/create#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/workspace/events/reference/rest/v1beta/subscriptions/create#body.request_body)
- [Response body](https://developers.google.com/workspace/events/reference/rest/v1beta/subscriptions/create#body.response_body)
- [Authorization scopes](https://developers.google.com/workspace/events/reference/rest/v1beta/subscriptions/create#body.aspect)

> [!WARNING]
> **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features.

Creates a Google Workspace subscription. To learn how to use this method, see [Create a Google Workspace subscription](https://developers.google.com/workspace/events/guides/create-subscription).

For a subscription on a [Chat target resource](https://developers.google.com/workspace/events/guides/events-chat), you can create a subscription as:

- A Chat app subscribing to space events where the app is a member by specifying an authorization scope that begins with `chat.app` and getting one-time administrator approval. To learn more, see [Authorize as a Chat app with administrator approval](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).

- [Developer Preview](https://developers.google.com/workspace/preview): A Chat app subscribing to all events in a Google Workspace organization by specifying an authorization scope that begins with `chat.app.all` and obtaining one-time administrator approval. To learn more, see [Subscribe to all Google Chat events in a Workspace organization](https://developers.google.com/workspace/events/guides/create-subscription#customer-subscription).

- A user by specifying an authorization scope that doesn't include `app` in its name. To learn more, see [Authorize as a Chat user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

### HTTP request

`POST https://workspaceevents.googleapis.com/v1beta/subscriptions`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Query parameters

| Parameters ||
|---|---|
| `validateOnly` | `boolean` Optional. If set to `true`, validates and previews the request, but doesn't create the subscription. |

### Request body

The request body contains an instance of `https://developers.google.com/workspace/events/reference/rest/v1beta/subscriptions#Subscription`.

### Response body

If successful, the response body contains a newly created instance of `https://developers.google.com/workspace/events/reference/rest/v1beta/operations#Operation`.

- The `metadata` field contains an empty array.
- The `response` field contains a new instance of `https://developers.google.com/workspace/events/reference/rest/v1beta/subscriptions#Subscription`.

### 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.memberships.readonly`
- `
  https://www.googleapis.com/auth/chat.app.all.memberships.readonly`
- `
  https://www.googleapis.com/auth/chat.app.messages.readonly`
- `
  https://www.googleapis.com/auth/chat.app.all.messages.readonly`
- `
  https://www.googleapis.com/auth/chat.app.spaces`
- `
  https://www.googleapis.com/auth/chat.app.spaces.readonly`
- `
  https://www.googleapis.com/auth/chat.app.all.spaces.readonly`
- `
  https://www.googleapis.com/auth/chat.app.all.users.readstate.readonly`
- `
  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](https://developers.google.com/workspace/guides/configure-oauth-consent).