title | description | author | ms.localizationpriority | ms.subservice | doc_type |
---|---|---|---|---|---|
Create conversation thread |
Start a new group conversation by first creating a thread. |
mikemcleanlive |
medium |
entra-groups |
apiPageType |
Namespace: microsoft.graph
Start a new group conversation by first creating a thread.
A new conversation, conversation thread, and post are created in the group. Use reply thread or reply post to further post to that thread.
Note: You can also start a new thread in an existing conversation.
[!INCLUDE national-cloud-support]
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Permission type | Permissions (from least to most privileged) |
---|---|
Delegated (work or school account) | Group.ReadWrite.All |
Delegated (personal Microsoft account) | Not supported. |
Application | Not supported. |
POST /groups/{id}/threads
Header | Value |
---|---|
Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Content-Type | application/json |
In the request body, supply a JSON representation of conversationThread object containing a post.
If successful, this method returns 201 Created
response code and conversationThread object in the response body.
The following example shows a request.
POST https://graph.microsoft.com/v1.0/groups/{id}/threads
Content-type: application/json
{
"topic": "New Conversation Thread Topic",
"posts": [{
"body": {
"contentType": "html",
"content": "this is body content"
},
"newParticipants": [{
"emailAddress": {
"name": "Alex Darrow",
"address": "alexd@contoso.com"
}
}]
}]
}
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 201 Created
Content-type: application/json
{
"toRecipients": [
{
"emailAddress": {
"name": "name-value",
"address": "address-value"
}
}
],
"topic": "topic-value",
"hasAttachments": true,
"lastDeliveredDateTime": "datetime-value",
"uniqueSenders": [
"uniqueSenders-value"
],
"ccRecipients": [
{
"emailAddress": {
"name": "name-value",
"address": "address-value"
}
}
]
}