Method: spaces.create  |  Google Chat  |  Google for Developers (original) (raw)

Creates a space. Can be used to create a named space, or a group chat in Import mode. For an example, see Create a space.

Supports the following types of authentication:

When authenticating as an app, the space.customer field must be set in the request.

When authenticating as an app, the Chat app is added as a member of the space. However, unlike human authentication, the Chat app is not added as a space manager. By default, the Chat app can be removed from the space by all space members. To allow only space managers to remove the app from a space, set space.permission_settings.manage_apps to managersAllowed.

Space membership upon creation depends on whether the space is created in Import mode:

If you receive the error message ALREADY_EXISTS when creating a space, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

HTTP request

POST https://chat.googleapis.com/v1/spaces

The URL uses gRPC Transcoding syntax.

Query parameters

Parameters
requestId string Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error.

Request body

The request body contains an instance of [Space](/workspace/chat/api/reference/rest/v1/spaces#Space).

Response body

If successful, the response body contains a newly created instance of [Space](/workspace/chat/api/reference/rest/v1/spaces#Space).

Requires one of the following OAuth scopes:

For more information, see the Authorization guide.