Google Chat API
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.
Communication#openapi#analytics#media
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
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.
Endpoints 34
customEmojis
- GETLists custom emojis visible to the authenticated user
/v1/customEmojis?filter=string&pageSize=0&pageToken=stringLists custom emojis visible to the authenticated user. Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom… - POSTCreates a custom emoji
/v1/customEmojisCreates a custom emoji. Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization.…
users.spaces.threads
- GETReturns details about a user's read state within a thread, used to identify read and unread messages
/v1/:nameReturns details about a user's read state within a thread, used to identify read and unread messages. For an example, see Get details about a user's thread… - PATCHUpdates a user's read state within a thread, used to identify read and unread messages
/v1/:name?updateMask=stringUpdates a user's read state within a thread, used to identify read and unread messages. For an example, see Update a user's thread read state. Requires user…
spaces.messages
- PUTUpdates a message
/v1/:name?allowMissing=true&updateMask=stringUpdates 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… - GETLists messages in a space that the caller is a member of, including messages from blocked members and spaces
/v1/:parent/messages?filter=string&markupSyntax=MARKUP_SYNTAX_UNSPECIFIED&orderBy=string&pageSize=0&pageToken=string&showDeleted=trueLists messages in a space that the caller is a member of, including messages from blocked members and spaces. System messages, like those announcing new space… - POSTCreates a message in a Google Chat space
/v1/:parent/messages?createMessageNotificationOptions.notificationType=NOTIFICATION_TYPE_NONE&messageId=string&messageReplyOption=MESSAGE_REPLY_OPTION_UNSPECIFIED&requestId=string&threadKey=stringCreates a message in a Google Chat space. For an example, see Send a message. Supports the following types of authentication: - App authentication with the… - POSTReplaces the cards included in a message
/v1/:name:replaceCardsReplaces the cards included in a message. A Chat app can only replace cards on a human-created message if the message already contains cards, and the cards… - POSTSearches for messages in Google Chat that the calling user has access to
/v1/:parent/messages:searchSearches for messages in Google Chat that the calling user has access to. Returns a list of messages matching the search criteria. To search across all spaces…
users.sections
- DELETEDeletes a section of type `CUSTOM_SECTION`
/v1/:nameDeletes a section of type CUSTOM_SECTION. If the section contains items, such as spaces, the items are moved to Google Chat's default sections and are not… - GETLists sections available to the Chat user
/v1/:parent/sections?pageSize=0&pageToken=stringLists sections available to the Chat user. Sections help users group their conversations and customize the list of spaces displayed in Chat navigation panel.… - POSTCreates a section in Google Chat
/v1/:parent/sectionsCreates a section in Google Chat. Sections help users group conversations and customize the list of spaces displayed in Chat navigation panel. Only sections… - POSTChanges the sort order of a section
/v1/:name:positionChanges the sort order of a section. For details, see Create and organize sections in Google Chat. Requires user authentication with the authorization scope:…
media
- GETDownloads media
/v1/media/:resourceNameDownloads media. Download is supported on the URI /v1/media/{+name}?alt=media. - POSTUploads an attachment
/v1/:parent/attachments:uploadUploads an attachment. For an example, see Upload media as a file attachment. Requires user authentication with one of the following authorization scopes: -…
spaces
- POSTCompletes the [import process](https://developers.google.com/workspace/chat/import-data) for the specified space and…
/v1/:name:completeImportCompletes the import process for the specified space and makes it visible to users. Requires user authentication and domain-wide delegation with the… - GETLists spaces the caller is a member of
/v1/spaces?filter=string&pageSize=0&pageToken=stringLists 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. Supports the… - POSTCreates a space
/v1/spaces?requestId=stringCreates 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… - GETReturns the existing direct message with the specified user
/v1/spaces:findDirectMessage?name=stringReturns 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… - GETReturns all spaces with `spaceType == GROUP_CHAT`, whose human memberships contain exactly the calling user, and the…
/v1/spaces:findGroupChats?pageSize=0&pageToken=string&spaceView=SPACE_VIEW_UNSPECIFIED&users=stringReturns all spaces with spaceType == GROUP_CHAT, whose human memberships contain exactly the calling user, and the users specified in… - GETReturns a list of spaces in a Google Workspace organization
/v1/spaces:search?orderBy=string&pageSize=0&pageToken=string&query=string&useAdminAccess=trueReturns a list of spaces in a Google Workspace organization. For an example, see Search for and manage spaces. When use_admin_access is set to false, the… - POSTCreates a space and adds specified users to it
/v1/spaces:setupCreates 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…
spaces.members
- GETLists memberships in a space
/v1/:parent/members?filter=string&pageSize=0&pageToken=string&showGroups=true&showInvited=true&useAdminAccess=trueLists memberships in a space. For an example, see List users and Google Chat apps in a space. Listing memberships with app authentication lists memberships in… - POSTCreates a membership for the calling Chat app, a user, or a Google Group
/v1/:parent/members?useAdminAccess=trueCreates a membership for the calling Chat app, a user, or a Google Group. Creating memberships for other Chat apps isn't supported. When creating a…
spaces.messagePins
- GETLists message pins in a space
/v1/:parent/messagePins?pageSize=0&pageToken=stringLists message pins in a space. Users can pin important messages in spaces for easy access. For more information, see Pin or unpin a conversation in Google… - POSTCreates a message pin
/v1/:parent/messagePinsCreates a message pin. Requires user authentication with one of the following authorization scopes: - https://www.googleapis.com/auth/chat.spaces.pins -…
spaces.messages.reactions
- GETLists reactions to a message
/v1/:parent/reactions?filter=string&pageSize=0&pageToken=stringLists reactions to a message. For an example, see List reactions for a message. Requires user authentication with one of the following authorization scopes: -… - POSTCreates a reaction and adds it to a message
/v1/:parent/reactionsCreates a reaction and adds it to a message. For an example, see Add a reaction to a message. Requires user authentication with one of the following…
spaces.spaceEvents
- GETLists events from a Google Chat space
/v1/:parent/spaceEvents?filter=string&pageSize=0&pageToken=stringLists events from a Google Chat space. For each event, the payload contains the most recent version of the Chat resource. For example, if you list events…
users.availability
- POSTMarks user as `ACTIVE` in Google Chat
/v1/:name:markAsActiveMarks user as ACTIVE in Google Chat. Sets the user's availability state to ACTIVE. The ACTIVE state lasts until the specified expiration, at which point the… - POSTMarks user as `AWAY` in Google Chat
/v1/:name:markAsAwayMarks user as AWAY in Google Chat. Sets the user's state to away and is not affected by the user's activity. This method only updates the authenticated user's… - POSTMarks user as `DO_NOT_DISTURB` in Google Chat
/v1/:name:markAsDoNotDisturbMarks user as DO_NOT_DISTURB in Google Chat. Sets a user's availability state to DO_NOT_DISTURB until a specified expiration time. When in DO_NOT_DISTURB,…
users.sections.items
- GETLists items in a section
/v1/:parent/items?filter=string&pageSize=0&pageToken=stringLists items in a section. Only spaces can be section items. For details, see Create and organize sections in Google Chat. Requires user authentication with… - POSTMoves an item from one section to another
/v1/:name:moveMoves an item from one section to another. For example, if a section contains spaces, this method can be used to move a space to a different section. For…
API details
- Base URL
https://chat.googleapis.com- Authentication
- OAuth 2.0 (authorization code flow) with 41 scopes
An API key in the key query parameter - Operations
- 34 operations on 24 pathsPOST 17GET 14PUT 1PATCH 1DELETE 1
- Main resources
- spaces 7spaces.messages 5users.sections 4users.availability 3customEmojis 2media 2spaces.members 2spaces.messagePins 2spaces.messages.reactions 2users.sections.items 2
- Response formats
application/json- Description format
- Google API Discovery, API version
v1 - Links
- Documentation · OpenAPI document
- Listed from
- Google API Discovery document (googleapis/discovery-artifact-manager) (Apache-2.0)
How to test the Google Chat API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Google Chat API collection, without the publisher's secrets.
- Add your credentialsThis API uses OAuth 2.0 (authorization code flow) with 41 scopes. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Lists custom emojis visible to the authenticated user” (GET /v1/customEmojis?filter=string&pageSize=0&pageToken=string), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Google Chat API?
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. It is listed under Communication and has 34 endpoints.
Who publishes the Google Chat API?
It is listed from Google's public API description (an OpenAPI document), not published by Google on Swastik Codes. Anyone who controls googleapis.com can claim the profile by adding a DNS TXT record.
What is the base URL of the Google Chat API?
Requests go to https://chat.googleapis.com. Endpoint paths are added to this base URL.
How do I authenticate with the Google Chat API?
It accepts 2 methods: OAuth 2.0 (authorization code flow) with 41 scopes; an API key in the key query parameter.
How many endpoints does the Google Chat API have?
34 operations on 24 paths (17 POST, 14 GET, 1 PUT, 1 PATCH, 1 DELETE). The largest groups are spaces, spaces.messages, users.sections, users.availability.
Is forking the Google Chat API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.