openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 164 kB
JSON
{"openapi":"3.0.0","servers":[{"url":"https://chat.googleapis.com/"}],"info":{"contact":{"name":"Google","url":"https://google.com","x-twitter":"youtube"},"description":"The Google Chat API lets you build Chat apps to integrate your services with Google Chat and manage Chat resources such as spaces, members, and messages.","license":{"name":"Creative Commons Attribution 3.0","url":"http://creativecommons.org/licenses/by/3.0/"},"termsOfService":"https://developers.google.com/terms/","title":"Google Chat API","version":"v1","x-apiClientRegistration":{"url":"https://console.developers.google.com"},"x-apisguru-categories":["analytics","media"],"x-logo":{"url":"https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},"x-origin":[{"converter":{"url":"https://github.com/mermade/oas-kit","version":"7.0.4"},"format":"google","url":"https://chat.googleapis.com/$discovery/rest?version=v1","version":"v1"}],"x-providerName":"googleapis.com","x-serviceName":"chat"},"externalDocs":{"url":"https://developers.google.com/hangouts/chat"},"tags":[{"name":"media"},{"name":"spaces"}],"paths":{"/v1/media/{resourceName}":{"get":{"description":"Downloads media. Download is supported on the URI `/v1/media/{+name}?alt=media`.","operationId":"chat.media.download","parameters":[{"description":"Name of the media that is being downloaded. See ReadRequest.resource_name.","in":"path","name":"resourceName","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Media"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/chat.bot"],"Oauth2c":["https://www.googleapis.com/auth/chat.bot"]},{"Oauth2":["https://www.googleapis.com/auth/chat.messages"],"Oauth2c":["https://www.googleapis.com/auth/chat.messages"]},{"Oauth2":["https://www.googleapis.com/auth/chat.messages.readonly"],"Oauth2c":["https://www.googleapis.com/auth/chat.messages.readonly"]}],"tags":["media"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}]},"/v1/spaces":{"get":{"description":"Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see [List spaces](https://developers.google.com/chat/api/guides/v1/spaces/list). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Supports [app authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). Lists spaces visible to the caller or authenticated user. Group chats and DMs aren't listed until the first message is sent.","operationId":"chat.spaces.list","parameters":[{"description":"Optional. A query filter. You can filter spaces by the space type ([`space_type`](https://developers.google.com/chat/api/reference/rest/v1/spaces#spacetype)). To filter by space type, you must specify valid enum value, such as `SPACE` or `GROUP_CHAT` (the `space_type` can't be `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR` operator. For example, the following queries are valid: ``` space_type = \"SPACE\" spaceType = \"GROUP_CHAT\" OR spaceType = \"DIRECT_MESSAGE\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.","in":"query","name":"filter","schema":{"type":"string"}},{"description":"Optional. The maximum number of spaces to return. The service might return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1,000. If you use a value more than 1,000, it's automatically changed to 1,000. Negative values return an `INVALID_ARGUMENT` error.","in":"query","name":"pageSize","schema":{"type":"integer"}},{"description":"Optional. A page token, received from a previous list spaces call. Provide this parameter to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value may lead to unexpected results.","in":"query","name":"pageToken","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSpacesResponse"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/chat.bot"],"Oauth2c":["https://www.googleapis.com/auth/chat.bot"]},{"Oauth2":["https://www.googleapis.com/auth/chat.spaces"],"Oauth2c":["https://www.googleapis.com/auth/chat.spaces"]},{"Oauth2":["https://www.googleapis.com/auth/chat.spaces.readonly"],"Oauth2c":["https://www.googleapis.com/auth/chat.spaces.readonly"]}],"tags":["spaces"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}],"post":{"description":"Creates a named space. Spaces grouped by topics aren't supported. For an example, see [Create a space](https://developers.google.com/chat/api/guides/v1/spaces/create). 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. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).","operationId":"chat.spaces.create","parameters":[{"description":"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.","in":"query","name":"requestId","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/chat.import"],"Oauth2c":["https://www.googleapis.com/auth/chat.import"]},{"Oauth2":["https://www.googleapis.com/auth/chat.spaces"],"Oauth2c":["https://www.googleapis.com/auth/chat.spaces"]},{"Oauth2":["https://www.googleapis.com/auth/chat.spaces.create"],"Oauth2c":["https://www.googleapis.com/auth/chat.spaces.create"]}],"tags":["spaces"]}},"/v1/spaces:findDirectMessage":{"get":{"description":"Returns the existing direct message with the specified user. If no direct message space is found, returns a `404 NOT_FOUND` error. For an example, see [Find a direct message](/chat/api/guides/v1/spaces/find-direct-message). With [user authentication](https://developers.google.com/chat/api/guides/auth/users), returns the direct message space between the specified user and the authenticated user. With [app authentication](https://developers.google.com/chat/api/guides/auth/service-accounts), returns the direct message space between the specified user and the calling Chat app. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) or [app authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).","operationId":"chat.spaces.findDirectMessage","parameters":[{"description":"Required. Resource name of the user to find direct message with. Format: `users/{user}`, where `{user}` is either the `id` for the [person](https://developers.google.com/people/api/rest/v1/people) from the People API, or the `id` for the [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Directory API. For example, if the People API profile ID is `123456789`, you can find a direct message with that person by using `users/123456789` as the `name`. When [authenticated as a user](https://developers.google.com/chat/api/guides/auth/users), you can use the email as an alias for `{user}`. For example, `users/example@gmail.com` where `example@gmail.com` is the email of the Google Chat user.","in":"query","name":"name","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/chat.bot"],"Oauth2c":["https://www.googleapis.com/auth/chat.bot"]},{"Oauth2":["https://www.googleapis.com/auth/chat.spaces"],"Oauth2c":["https://www.googleapis.com/auth/chat.spaces"]},{"Oauth2":["https://www.googleapis.com/auth/chat.spaces.readonly"],"Oauth2c":["https://www.googleapis.com/auth/chat.spaces.readonly"]}],"tags":["spaces"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}]},"/v1/spaces:setup":{"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}],"post":{"description":"Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see [Set up a space](https://developers.google.com/chat/api/guides/v1/spaces/set-up). To specify the human members to add, add memberships with the appropriate `member.name` in the `SetUpSpaceRequest`. To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `id` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person profile ID for `user@example.com` is `123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`. For a space or group chat, if the caller blocks or is blocked by some members, then those members aren't added to the created space. To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. To create a DM between the calling user and the calling app, set `Space.singleUserBotDm` to `true` and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a member of a space or an existing DM between two human users, see [create a membership](https://developers.google.com/chat/api/guides/v1/members/create). If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned. Spaces with threaded replies aren't supported. If you receive the error message `ALREADY_EXISTS` when setting up a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).","operationId":"chat.spaces.setup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetUpSpaceRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/chat.spaces"],"Oauth2c":["https://www.googleapis.com/auth/chat.spaces"]},{"Oauth2":["https://www.googleapis.com/auth/chat.spaces.create"],"Oauth2c":["https://www.googleapis.com/auth/chat.spaces.create"]}],"tags":["spaces"]}},"/v1/{name}":{"delete":{"description":"Deletes a reaction to a message. For an example, see [Delete a reaction](https://developers.google.com/chat/api/guides/v1/reactions/delete). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).","operationId":"chat.spaces.messages.reactions.delete","parameters":[{"description":"Required. Name of the reaction to delete. Format: `spaces/{space}/messages/{message}/reactions/{reaction}`","in":"path","name":"name","required":true,"schema":{"type":"string"}},{"description":"When `true`, deleting a message also deletes its threaded replies. When `false`, if a message has threaded replies, deletion fails. Only applies when [authenticating as a user](https://developers.google.com/chat/api/guides/auth/users). Has no effect when [authenticating as a Chat app] (https://developers.google.com/chat/api/guides/auth/service-accounts).","in":"query","name":"force","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Empty"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/chat.import"],"Oauth2c":["https://www.googleapis.com/auth/chat.import"]},{"Oauth2":["https://www.googleapis.com/auth/chat.messages"],"Oauth2c":["https://www.googleapis.com/auth/chat.messages"]},{"Oauth2":["https://www.googleapis.com/auth/chat.messages.reactions"],"Oauth2c":["https://www.googleapis.com/auth/chat.messages.reactions"]}],"tags":["spaces"]},"get":{"description":"Gets the metadata of a message attachment. The attachment data is fetched using the [media API](https://developers.google.com/chat/api/reference/rest/v1/media/download). For an example, see [Get a message attachment](https://developers.google.com/chat/api/guides/v1/media-and-attachments/get). Requires [app authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).","operationId":"chat.spaces.messages.attachments.get","parameters":[{"description":"Required. Resource name of the attachment, in the form `spaces/*/messages/*/attachments/*`.","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attachment"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/chat.bot"],"Oauth2c":["https://www.googleapis.com/auth/chat.bot"]},{"Oauth2":["https://www.googleapis.com/auth/chat.messages"],"Oauth2c":["https://www.googleapis.com/auth/chat.messages"]},{"Oauth2":["https://www.googleapis.com/auth/chat.messages.readonly"],"Oauth2c":["https://www.googleapis.com/auth/chat.messages.readonly"]}],"tags":["spaces"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}],"patch":{"description":"Updates a message. There's a difference between the `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For an example, see [Update a message](https://developers.google.com/chat/api/guides/v1/messages/update). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Supports [app authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). When using app authentication, requests can only update messages created by the calling Chat app.","operationId":"chat.spaces.messages.patch","parameters":[{"description":"Resource name of the message. Format: `spaces/{space}/messages/{message}` Where `{space}` is the ID of the space where the message is posted and `{message}` is a system-assigned ID for the message. For example, `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. If you set a custom ID when you create a message, you can use this ID to specify the message in a request by replacing `{message}` with the value from the `clientAssignedMessageId` field. For example, `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name a message](https://developers.google.com/chat/api/guides/v1/messages/create#name_a_created_message).","in":"path","name":"name","required":true,"schema":{"type":"string"}},{"description":"Optional. If `true` and the message isn't found, a new message is created and `updateMask` is ignored. The specified message ID must be [client-assigned](https://developers.google.com/chat/api/guides/v1/messages/create#name_a_created_message) or the request fails.","in":"query","name":"allowMissing","schema":{"type":"boolean"}},{"description":"Required. The field paths to update. Separate multiple values with commas or use `*` to update all field paths. Currently supported field paths: - `text` - `attachment` - `cards` (Requires [app authentication](/chat/api/guides/auth/service-accounts).) - `cards_v2` (Requires [app authentication](/chat/api/guides/auth/service-accounts).) - Developer Preview: `accessory_widgets` (Requires [app authentication](/chat/api/guides/auth/service-accounts).)","in":"query","name":"updateMask","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/chat.bot"],"Oauth2c":["https://www.googleapis.com/auth/chat.bot"]},{"Oauth2":["https://www.googleapis.com/auth/chat.import"],"Oauth2c":["https://www.googleapis.com/auth/chat.import"]},{"Oauth2":["https://www.googleapis.com/auth/chat.messages"],"Oauth2c":["https://www.googleapis.com/auth/chat.messages"]}],"tags":["spaces"]},"put":{"description":"Updates a message. There's a difference between the `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For an example, see [Update a message](https://developers.google.com/chat/api/guides/v1/messages/update). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Supports [app authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). When using app authentication, requests can only update messages created by the calling Chat app.","operationId":"chat.spaces.messages.update","parameters":[{"description":"Resource name of the message. Format: `spaces/{space}/messages/{message}` Where `{space}` is the ID of the space where the message is posted and `{message}` is a system-assigned ID for the message. For example, `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. If you set a custom ID when you create a message, you can use this ID to specify the message in a request by replacing `{message}` with the value from the `clientAssignedMessageId` field. For example, `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name a message](https://developers.google.com/chat/api/guides/v1/messages/create#name_a_created_message).","in":"path","name":"name","required":true,"schema":{"type":"string"}},{"description":"Optional. If `true` and the message isn't found, a new message is created and `updateMask` is ignored. The specified message ID must be [client-assigned](https://developers.google.com/chat/api/guides/v1/messages/create#name_a_created_message) or the request fails.","in":"query","name":"allowMissing","schema":{"type":"boolean"}},{"description":"Required. The field paths to update. Separate multiple values with commas or use `*` to update all field paths. Currently supported field paths: - `text` - `attachment` - `cards` (Requires [app authentication](/chat/api/guides/auth/service-accounts).) - `cards_v2` (Requires [app authentication](/chat/api/guides/auth/service-accounts).) - Developer Preview: `accessory_widgets` (Requires [app authentication](/chat/api/guides/auth/service-accounts).)","in":"query","name":"updateMask","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/chat.bot"],"Oauth2c":["https://www.googleapis.com/auth/chat.bot"]},{"Oauth2":["https://www.googleapis.com/auth/chat.import"],"Oauth2c":["https://www.googleapis.com/auth/chat.import"]},{"Oauth2":["https://www.googleapis.com/auth/chat.messages"],"Oauth2c":["https://www.googleapis.com/auth/chat.messages"]}],"tags":["spaces"]}},"/v1/{name}:completeImport":{"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}],"post":{"description":"Completes the [import process](https://developers.google.com/chat/api/guides/import-data) for the specified space and makes it visible to users. Requires app authentication and domain-wide delegation. For more information, see [Authorize Google Chat apps to import data](https://developers.google.com/chat/api/guides/authorize-import).","operationId":"chat.spaces.completeImport","parameters":[{"description":"Required. Resource name of the import mode space. Format: `spaces/{space}`","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteImportSpaceRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteImportSpaceResponse"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/chat.import"],"Oauth2c":["https://www.googleapis.com/auth/chat.import"]}],"tags":["spaces"]}},"/v1/{parent}/attachments:upload":{"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}],"post":{"description":"Uploads an attachment. For an example, see [Upload media as a file attachment](https://developers.google.com/chat/api/guides/v1/media-and-attachments/upload). Requires user [authentication](https://developers.google.com/chat/api/guides/auth/users). You can upload attachments up to 200 MB. Certain file types aren't supported. For details, see [File types blocked by Google Chat](https://support.google.com/chat/answer/7651457?&co=GENIE.Platform%3DDesktop#File%20types%20blocked%20in%20Google%20Chat).","operationId":"chat.media.upload","parameters":[{"description":"Required. Resource name of the Chat space in which the attachment is uploaded. Format \"spaces/{space}\".","in":"path","name":"parent","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/UploadAttachmentRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadAttachmentResponse"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/chat.import"],"Oauth2c":["https://www.googleapis.com/auth/chat.import"]},{"Oauth2":["https://www.googleapis.com/auth/chat.messages"],"Oauth2c":["https://www.googleapis.com/auth/chat.messages"]},{"Oauth2":["https://www.googleapis.com/auth/chat.messages.create"],"Oauth2c":["https://www.googleapis.com/auth/chat.messages.create"]}],"tags":["media"]}},"/v1/{parent}/members":{"get":{"description":"Lists memberships in a space. For an example, see [List memberships](https://developers.google.com/chat/api/guides/v1/members/list). Listing memberships with [app authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) lists memberships in spaces that the Chat app has access to, but excludes Chat app memberships, including its own. Listing memberships with [User authentication](https://developers.google.com/chat/api/guides/auth/users) lists memberships in spaces that the authenticated user has access to. Requires [authentication](https://developers.google.com/chat/api/guides/auth). Supports [app authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users).","operationId":"chat.spaces.members.list","parameters":[{"description":"Required. The resource name of the space for which to fetch a membership list. Format: spaces/{space}","in":"path","name":"parent","required":true,"schema":{"type":"string"}},{"description":"Optional. A query filter. You can filter memberships by a member's role ([`role`](https://developers.google.com/chat/api/reference/rest/v1/spaces.members#membershiprole)) and type ([`member.type`](https://developers.google.com/chat/api/reference/rest/v1/User#type)). To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. To filter by type, set `member.type` to `HUMAN` or `BOT`. To filter by both role and type, use the `AND` operator. To filter by either role or type, use the `OR` operator. For example, the following queries are valid: ``` role = \"ROLE_MANAGER\" OR role = \"ROLE_MEMBER\" member.type = \"HUMAN\" AND role = \"ROLE_MANAGER\" ``` The following queries are invalid: ``` member.type = \"HUMAN\" AND member.type = \"BOT\" role = \"ROLE_MANAGER\" AND role = \"ROLE_MEMBER\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.","in":"query","name":"filter","schema":{"type":"string"}},{"description":"Optional. The maximum number of memberships to return. The service might return fewer than this value. If unspecified, at most 100 memberships are returned. The maximum value is 1,000. If you use a value more than 1,000, it's automatically changed to 1,000. Negative values return an `INVALID_ARGUMENT` error.","in":"query","name":"pageSize","schema":{"type":"integer"}},{"description":"Optional. A page token, received from a previous call to list memberships. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.","in":"query","name":"pageToken","schema":{"type":"string"}},{"description":"Optional. When `true`, also returns memberships associated with a Google Group, in addition to other types of memberships. If a filter is set, Google Group memberships that don't match the filter criteria aren't returned.","in":"query","name":"showGroups","schema":{"type":"boolean"}},{"description":"Optional. When `true`, also returns memberships associated with invited members, in addition to other types of memberships. If a filter is set, invited memberships that don't match the filter criteria aren't returned. Currently requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).","in":"query","name":"showInvited","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMembershipsResponse"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/chat.bot"],"Oauth2c":["https://www.googleapis.com/auth/chat.bot"]},{"Oauth2":["https://www.googleapis.com/auth/chat.import"],"Oauth2c":["https://www.googleapis.com/auth/chat.import"]},{"Oauth2":["https://www.googleapis.com/auth/chat.memberships"],"Oauth2c":["https://www.googleapis.com/auth/chat.memberships"]},{"Oauth2":["https://www.googleapis.com/auth/chat.memberships.readonly"],"Oauth2c":["https://www.googleapis.com/auth/chat.memberships.readonly"]}],"tags":["spaces"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}],"post":{"description":"Creates a human membership or app membership for the calling app. Creating memberships for other apps isn't supported. For an example, see [ Create a membership](https://developers.google.com/chat/api/guides/v1/members/create). When creating a membership, if the specified member has their auto-accept policy turned off, then they're invited, and must accept the space invitation before joining. Otherwise, creating a membership adds the member directly to the specified space. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users). To specify the member to add, set the `membership.member.name` in the `CreateMembershipRequest`: - To add the calling app to a space or a direct message between two human users, use `users/app`. Unable to add other apps to the space. - To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `id` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person profile ID for `user@example.com` is `123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`.","operationId":"chat.spaces.members.create","parameters":[{"description":"Required. The resource name of the space for which to create the membership. Format: spaces/{space}","in":"path","name":"parent","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Membership"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Membership"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/chat.import"],"Oauth2c":["https://www.googleapis.com/auth/chat.import"]},{"Oauth2":["https://www.googleapis.com/auth/chat.memberships"],"Oauth2c":["https://www.googleapis.com/auth/chat.memberships"]},{"Oauth2":["https://www.googleapis.com/auth/chat.memberships.app"],"Oauth2c":["https://www.googleapis.com/auth/chat.memberships.app"]}],"tags":["spaces"]}},"/v1/{parent}/messages":{"get":{"description":"Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. For an example, see [List messages](/chat/api/guides/v1/messages/list). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).","operationId":"chat.spaces.messages.list","parameters":[{"description":"Required. The resource name of the space to list messages from. Format: `spaces/{space}`","in":"path","name":"parent","required":true,"schema":{"type":"string"}},{"description":"A query filter. You can filter messages by date (`create_time`) and thread (`thread.name`). To filter messages by the date they were created, specify the `create_time` with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and double quotation marks. For example, `\"2023-04-21T11:30:00-04:00\"`. You can use the greater than operator `>` to list messages that were created after a timestamp, or the less than operator `<` to list messages that were created before a timestamp. To filter messages within a time interval, use the `AND` operator between two timestamps. To filter by thread, specify the `thread.name`, formatted as `spaces/{space}/threads/{thread}`. You can only specify one `thread.name` per query. To filter by both thread and date, use the `AND` operator in your query. For example, the following queries are valid: ``` create_time > \"2012-04-21T11:30:00-04:00\" create_time > \"2012-04-21T11:30:00-04:00\" AND thread.name = spaces/AAAAAAAAAAA/threads/123 create_time > \"2012-04-21T11:30:00+00:00\" AND create_time < \"2013-01-01T00:00:00+00:00\" AND thread.name = spaces/AAAAAAAAAAA/threads/123 thread.name = spaces/AAAAAAAAAAA/threads/123 ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.","in":"query","name":"filter","schema":{"type":"string"}},{"description":"Optional, if resuming from a previous query. How the list of messages is ordered. Specify a value to order by an ordering operation. Valid ordering operation values are as follows: - `ASC` for ascending. - `DESC` for descending. The default ordering is `create_time ASC`.","in":"query","name":"orderBy","schema":{"type":"string"}},{"description":"The maximum number of messages returned. The service might return fewer messages than this value. If unspecified, at most 25 are returned. The maximum value is 1,000. If you use a value more than 1,000, it's automatically changed to 1,000. Negative values return an `INVALID_ARGUMENT` error.","in":"query","name":"pageSize","schema":{"type":"integer"}},{"description":"Optional, if resuming from a previous query. A page token received from a previous list messages call. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.","in":"query","name":"pageToken","schema":{"type":"string"}},{"description":"Whether to include deleted messages. Deleted messages include deleted time and metadata about their deletion, but message content is unavailable.","in":"query","name":"showDeleted","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMessagesResponse"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/chat.import"],"Oauth2c":["https://www.googleapis.com/auth/chat.import"]},{"Oauth2":["https://www.googleapis.com/auth/chat.messages"],"Oauth2c":["https://www.googleapis.com/auth/chat.messages"]},{"Oauth2":["https://www.googleapis.com/auth/chat.messages.readonly"],"Oauth2c":["https://www.googleapis.com/auth/chat.messages.readonly"]}],"tags":["spaces"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}],"post":{"description":"Creates a message in a Google Chat space. For an example, see [Create a message](https://developers.google.com/chat/api/guides/v1/messages/create). Calling this method requires [authentication](https://developers.google.com/chat/api/guides/auth) and supports the following authentication types: - For text messages, user authentication or app authentication are supported. - For card messages, only app authentication is supported. (Only Chat apps can create card messages.)","operationId":"chat.spaces.messages.create","parameters":[{"description":"Required. The resource name of the space in which to create a message. Format: `spaces/{space}`","in":"path","name":"parent","required":true,"schema":{"type":"string"}},{"description":"Optional. A custom ID for a message. Lets Chat apps get, update, or delete a message without needing to store the system-assigned ID in the message's resource name (represented in the message `name` field). The value for this field must meet the following requirements: * Begins with `client-`. For example, `client-custom-name` is a valid custom ID, but `custom-name` is not. * Contains up to 63 characters and only lowercase letters, numbers, and hyphens. * Is unique within a space. A Chat app can't use the same custom ID for different messages. For details, see [Name a message](https://developers.google.com/chat/api/guides/v1/messages/create#name_a_created_message).","in":"query","name":"messageId","schema":{"type":"string"}},{"description":"Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.","in":"query","name":"messageReplyOption","schema":{"enum":["MESSAGE_REPLY_OPTION_UNSPECIFIED","REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD","REPLY_MESSAGE_OR_FAIL"],"type":"string"}},{"description":"Optional. A unique request ID for this message. Specifying an existing request ID returns the message created with that ID instead of creating a new message.","in":"query","name":"requestId","schema":{"type":"string"}},{"description":"Optional. Deprecated: Use thread.thread_key instead. ID for the thread. Supports up to 4000 characters. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](https://developers.google.com/chat/api/guides/v1/messages/create#create-message-thread).","in":"query","name":"threadKey","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/chat.bot"],"Oauth2c":["https://www.googleapis.com/auth/chat.bot"]},{"Oauth2":["https://www.googleapis.com/auth/chat.import"],"Oauth2c":["https://www.googleapis.com/auth/chat.import"]},{"Oauth2":["https://www.googleapis.com/auth/chat.messages"],"Oauth2c":["https://www.googleapis.com/auth/chat.messages"]},{"Oauth2":["https://www.googleapis.com/auth/chat.messages.create"],"Oauth2c":["https://www.googleapis.com/auth/chat.messages.create"]}],"tags":["spaces"]}},"/v1/{parent}/reactions":{"get":{"description":"Lists reactions to a message. For an example, see [List reactions](https://developers.google.com/chat/api/guides/v1/reactions/list). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).","operationId":"chat.spaces.messages.reactions.list","parameters":[{"description":"Required. The message users reacted to. Format: `spaces/{space}/messages/{message}`","in":"path","name":"parent","required":true,"schema":{"type":"string"}},{"description":"Optional. A query filter. You can filter reactions by [emoji](https://developers.google.com/chat/api/reference/rest/v1/Emoji) (either `emoji.unicode` or `emoji.custom_emoji.uid`) and [user](https://developers.google.com/chat/api/reference/rest/v1/User) (`user.name`). To filter reactions for multiple emojis or users, join similar fields with the `OR` operator, such as `emoji.unicode = \"🙂\" OR emoji.unicode = \"👍\"` and `user.name = \"users/AAAAAA\" OR user.name = \"users/BBBBBB\"`. To filter reactions by emoji and user, use the `AND` operator, such as `emoji.unicode = \"🙂\" AND user.name = \"users/AAAAAA\"`. If your query uses both `AND` and `OR`, group them with parentheses. For example, the following queries are valid: ``` user.name = \"users/{user}\" emoji.unicode = \"🙂\" emoji.custom_emoji.uid = \"{uid}\" emoji.unicode = \"🙂\" OR emoji.unicode = \"👍\" emoji.unicode = \"🙂\" OR emoji.custom_emoji.uid = \"{uid}\" emoji.unicode = \"🙂\" AND user.name = \"users/{user}\" (emoji.unicode = \"🙂\" OR emoji.custom_emoji.uid = \"{uid}\") AND user.name = \"users/{user}\" ``` The following queries are invalid: ``` emoji.unicode = \"🙂\" AND emoji.unicode = \"👍\" emoji.unicode = \"🙂\" AND emoji.custom_emoji.uid = \"{uid}\" emoji.unicode = \"🙂\" OR user.name = \"users/{user}\" emoji.unicode = \"🙂\" OR emoji.custom_emoji.uid = \"{uid}\" OR user.name = \"users/{user}\" emoji.unicode = \"🙂\" OR emoji.custom_emoji.uid = \"{uid}\" AND user.name = \"users/{user}\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.","in":"query","name":"filter","schema":{"type":"string"}},{"description":"Optional. The maximum number of reactions returned. The service can return fewer reactions than this value. If unspecified, the default value is 25. The maximum value is 200; values above 200 are changed to 200.","in":"query","name":"pageSize","schema":{"type":"integer"}},{"description":"Optional. (If resuming from a previous query.) A page token received from a previous list reactions call. Provide this to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value might lead to unexpected results.","in":"query","name":"pageToken","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListReactionsResponse"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/chat.messages"],"Oauth2c":["https://www.googleapis.com/auth/chat.messages"]},{"Oauth2":["https://www.googleapis.com/auth/chat.messages.reactions"],"Oauth2c":["https://www.googleapis.com/auth/chat.messages.reactions"]},{"Oauth2":["https://www.googleapis.com/auth/chat.messages.reactions.readonly"],"Oauth2c":["https://www.googleapis.com/auth/chat.messages.reactions.readonly"]},{"Oauth2":["https://www.googleapis.com/auth/chat.messages.readonly"],"Oauth2c":["https://www.googleapis.com/auth/chat.messages.readonly"]}],"tags":["spaces"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}],"post":{"description":"Creates a reaction and adds it to a message. For an example, see [Create a reaction](https://developers.google.com/chat/api/guides/v1/reactions/create). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users). Only unicode emoji are supported.","operationId":"chat.spaces.messages.reactions.create","parameters":[{"description":"Required. The message where the reaction is created. Format: `spaces/{space}/messages/{message}`","in":"path","name":"parent","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reaction"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reaction"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/chat.import"],"Oauth2c":["https://www.googleapis.com/auth/chat.import"]},{"Oauth2":["https://www.googleapis.com/auth/chat.messages"],"Oauth2c":["https://www.googleapis.com/auth/chat.messages"]},{"Oauth2":["https://www.googleapis.com/auth/chat.messages.reactions"],"Oauth2c":["https://www.googleapis.com/auth/chat.messages.reactions"]},{"Oauth2":["https://www.googleapis.com/auth/chat.messages.reactions.create"],"Oauth2c":["https://www.googleapis.com/auth/chat.messages.reactions.create"]}],"tags":["spaces"]}}},"components":{"parameters":{"_.xgafv":{"description":"V1 error format.","in":"query","name":"$.xgafv","schema":{"enum":["1","2"],"type":"string"}},"access_token":{"description":"OAuth access token.","in":"query","name":"access_token","schema":{"type":"string"}},"alt":{"description":"Data format for response.","in":"query","name":"alt","schema":{"enum":["json","media","proto"],"type":"string"}},"callback":{"description":"JSONP","in":"query","name":"callback","schema":{"type":"string"}},"fields":{"description":"Selector specifying which fields to include in a partial response.","in":"query","name":"fields","schema":{"type":"string"}},"key":{"description":"API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.","in":"query","name":"key","schema":{"type":"string"}},"oauth_token":{"description":"OAuth 2.0 token for the current user.","in":"query","name":"oauth_token","schema":{"type":"string"}},"prettyPrint":{"description":"Returns response with indentations and line breaks.","in":"query","name":"prettyPrint","schema":{"type":"boolean"}},"quotaUser":{"description":"Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.","in":"query","name":"quotaUser","schema":{"type":"string"}},"uploadType":{"description":"Legacy upload protocol for media (e.g. \"media\", \"multipart\").","in":"query","name":"uploadType","schema":{"type":"string"}},"upload_protocol":{"description":"Upload protocol for media (e.g. \"raw\", \"multipart\").","in":"query","name":"upload_protocol","schema":{"type":"string"}}},"schemas":{"ActionParameter":{"description":"List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters.","properties":{"key":{"description":"The name of the parameter for the action script.","type":"string"},"value":{"description":"The value of the parameter.","type":"string"}},"type":"object"},"ActionResponse":{"description":"Parameters that a Chat app can use to configure how its response is posted.","properties":{"dialogAction":{"$ref":"#/components/schemas/DialogAction","description":"Input only. A response to an interaction event related to a [dialog](https://developers.google.com/chat/how-tos/dialogs). Must be accompanied by `ResponseType.Dialog`."},"type":{"description":"Input only. The type of Chat app response.","enum":["TYPE_UNSPECIFIED","NEW_MESSAGE","UPDATE_MESSAGE","UPDATE_USER_MESSAGE_CARDS","REQUEST_CONFIG","DIALOG","UPDATE_WIDGET"],"type":"string"},"updatedWidget":{"$ref":"#/components/schemas/UpdatedWidget","description":"Input only. The response of the updated widget."},"url":{"description":"Input only. URL for users to authenticate or configure. (Only for `REQUEST_CONFIG` response types.)","type":"string"}},"type":"object"},"ActionStatus":{"description":"Represents the status for a request to either invoke or submit a [dialog](https://developers.google.com/chat/how-tos/dialogs).","properties":{"statusCode":{"description":"The status code.","enum":["OK","CANCELLED","UNKNOWN","INVALID_ARGUMENT","DEADLINE_EXCEEDED","NOT_FOUND","ALREADY_EXISTS","PERMISSION_DENIED","UNAUTHENTICATED","RESOURCE_EXHAUSTED","FAILED_PRECONDITION","ABORTED","OUT_OF_RANGE","UNIMPLEMENTED","INTERNAL","UNAVAILABLE","DATA_LOSS"],"type":"string"},"userFacingMessage":{"description":"The message to send users about the status of their request. If unset, a generic message based on the `status_code` is sent.","type":"string"}},"type":"object"},"Annotation":{"description":"Output only. Annotations associated with the plain-text body of the message. To add basic formatting to a text message, see [Format text messages](https://developers.google.com/chat/format-messages). Example plain-text message body: ``` Hello @FooBot how are you!\" ``` The corresponding annotations metadata: ``` \"annotations\":[{ \"type\":\"USER_MENTION\", \"startIndex\":6, \"length\":7, \"userMention\": { \"user\": { \"name\":\"users/{user}\", \"displayName\":\"FooBot\", \"avatarUrl\":\"https://goo.gl/aeDtrS\", \"type\":\"BOT\" }, \"type\"