If you specify a thread when creating a message, you can set themessageReplyOptionfield to determine what happens if no matching thread is found.
Generated from protobuf messagegoogle.chat.v1.Thread
Namespace
Google \ Apps \ Chat \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Identifier. Resource name of the thread. Example:spaces/{space}/threads/{thread}
↳ thread_key
string
Optional. Input for creating or updating a thread. Otherwise, output only. ID for the thread. Supports up to 4000 characters. This ID is unique to the Chat app that sets it. For example, if multiple Chat apps create a message using the same thread key, the messages are posted in different threads. To reply in a thread created by a person or another Chat app, specify the threadnamefield instead.
getName
Identifier. Resource name of the thread.
Example:spaces/{space}/threads/{thread}
Returns
Type
Description
string
setName
Identifier. Resource name of the thread.
Example:spaces/{space}/threads/{thread}
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getThreadKey
Optional. Input for creating or updating a thread. Otherwise, output only.
ID for the thread. Supports up to 4000 characters.
This ID is unique to the Chat app that sets it. For example, if
multiple Chat apps create a message using the same thread key,
the messages are posted in different threads. To reply in a
thread created by a person or another Chat app, specify the threadnamefield instead.
Returns
Type
Description
string
setThreadKey
Optional. Input for creating or updating a thread. Otherwise, output only.
ID for the thread. Supports up to 4000 characters.
This ID is unique to the Chat app that sets it. For example, if
multiple Chat apps create a message using the same thread key,
the messages are posted in different threads. To reply in a
thread created by a person or another Chat app, specify the threadnamefield instead.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Apps Chat V1 Client - Class Thread (0.12.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.12.0 (latest)](/php/docs/reference/apps-chat/latest/Chat.V1.Thread)\n- [0.11.2](/php/docs/reference/apps-chat/0.11.2/Chat.V1.Thread)\n- [0.10.0](/php/docs/reference/apps-chat/0.10.0/Chat.V1.Thread)\n- [0.9.0](/php/docs/reference/apps-chat/0.9.0/Chat.V1.Thread)\n- [0.8.1](/php/docs/reference/apps-chat/0.8.1/Chat.V1.Thread)\n- [0.7.2](/php/docs/reference/apps-chat/0.7.2/Chat.V1.Thread)\n- [0.6.1](/php/docs/reference/apps-chat/0.6.1/Chat.V1.Thread)\n- [0.5.0](/php/docs/reference/apps-chat/0.5.0/Chat.V1.Thread)\n- [0.4.0](/php/docs/reference/apps-chat/0.4.0/Chat.V1.Thread)\n- [0.3.0](/php/docs/reference/apps-chat/0.3.0/Chat.V1.Thread)\n- [0.2.0](/php/docs/reference/apps-chat/0.2.0/Chat.V1.Thread)\n- [0.1.4](/php/docs/reference/apps-chat/0.1.4/Chat.V1.Thread) \nReference documentation and code samples for the Google Apps Chat V1 Client class Thread.\n\nA thread in a Google Chat space. For example usage, see\n[Start or reply to a message\nthread](https://developers.google.com/workspace/chat/create-messages#create-message-thread).\n\nIf you specify a thread when creating a message, you can set the\n[`messageReplyOption`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#messagereplyoption)\nfield to determine what happens if no matching thread is found.\n\nGenerated from protobuf message `google.chat.v1.Thread`\n\nNamespace\n---------\n\nGoogle \\\\ Apps \\\\ Chat \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nIdentifier. Resource name of the thread.\n\nExample: `spaces/{space}/threads/{thread}`\n\n### setName\n\nIdentifier. Resource name of the thread.\n\nExample: `spaces/{space}/threads/{thread}`\n\n### getThreadKey\n\nOptional. Input for creating or updating a thread. Otherwise, output only.\n\nID for the thread. Supports up to 4000 characters.\nThis ID is unique to the Chat app that sets it. For example, if\nmultiple Chat apps create a message using the same thread key,\nthe messages are posted in different threads. To reply in a\nthread created by a person or another Chat app, specify the thread `name`\nfield instead.\n\n### setThreadKey\n\nOptional. Input for creating or updating a thread. Otherwise, output only.\n\nID for the thread. Supports up to 4000 characters.\nThis ID is unique to the Chat app that sets it. For example, if\nmultiple Chat apps create a message using the same thread key,\nthe messages are posted in different threads. To reply in a\nthread created by a person or another Chat app, specify the thread `name`\nfield instead."]]