|
| 1 | +--- |
| 2 | +title: "Add item to section" |
| 3 | +description: "Add an item to a section in a user's teamwork." |
| 4 | +author: "jsinghmokha" |
| 5 | +ms.localizationpriority: medium |
| 6 | +ms.subservice: "teams" |
| 7 | +doc_type: apiPageType |
| 8 | +ms.date: 03/08/2026 |
| 9 | +--- |
| 10 | + |
| 11 | +# Add item to section |
| 12 | + |
| 13 | +Namespace: microsoft.graph |
| 14 | + |
| 15 | +[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)] |
| 16 | + |
| 17 | +Add an [item](../resources/teamworksectionitem.md) such as a chat, channel, meeting, or community to a [section](../resources/teamworksection.md) in a user's [teamwork](../resources/userteamwork.md). Each item can belong to only one section at a time. If the item is already associated with another section, use the [move](teamworksectionitem-move.md) action instead. |
| 18 | + |
| 19 | +[!INCLUDE [national-cloud-support](../../includes/all-clouds.md)] |
| 20 | + |
| 21 | +## Permissions |
| 22 | + |
| 23 | +Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions [only if your app requires it](/graph/permissions-overview#best-practices-for-using-microsoft-graph-permissions). For details about delegated and application permissions, see [Permission types](/graph/permissions-overview#permission-types). To learn more about these permissions, see the [permissions reference](/graph/permissions-reference). |
| 24 | + |
| 25 | +<!-- { "blockType": "permissions", "name": "teamworksection_post_items" } --> |
| 26 | +[!INCLUDE [permissions-table](../includes/permissions/teamworksection-post-items-permissions.md)] |
| 27 | + |
| 28 | +## HTTP request |
| 29 | + |
| 30 | +<!-- { "blockType": "ignored" } --> |
| 31 | +```http |
| 32 | +POST /users/{user-id}/teamwork/sections/{teamworkSection-id}/items |
| 33 | +``` |
| 34 | + |
| 35 | +## Request headers |
| 36 | + |
| 37 | +| Header | Value | |
| 38 | +|:-------|:------| |
| 39 | +| Authorization | Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts). | |
| 40 | +| Content-Type | application/json. Required. | |
| 41 | +| If-Match | The ETag value of a previously retrieved **teamworkSection**. Required for optimistic concurrency control. | |
| 42 | + |
| 43 | +## Request body |
| 44 | + |
| 45 | +In the request body, supply a JSON representation of a [teamworkSectionItem](../resources/teamworksectionitem.md) object. |
| 46 | + |
| 47 | +The following table lists the properties that you can set when you add a **teamworkSectionItem**. |
| 48 | + |
| 49 | +| Property | Type | Description | |
| 50 | +|:---------|:-----|:------------| |
| 51 | +| id | String | The conversation ID of the chat, channel, meeting, or community to add to the section. For community items, the service automatically normalizes the ID to the `19:{id}@EngageCommunity` format. Required. | |
| 52 | + |
| 53 | +## Response |
| 54 | + |
| 55 | +If successful, this method returns a `201 Created` response code and a [teamworkSectionItem](../resources/teamworksectionitem.md) object in the response body. |
| 56 | + |
| 57 | +The following errors can occur: |
| 58 | + |
| 59 | +| Scenario | HTTP code | Error code | Message | |
| 60 | +|:---------|:----------|:-----------|:--------| |
| 61 | +| Item already exists in this section | `409 Conflict` | `conflict` | This item is already in this section. | |
| 62 | +| Item already exists in another section | `409 Conflict` | `conflict` | This item is already associated with another section. Use the move API to relocate it. | |
| 63 | +| Maximum items per section reached | `400 Bad Request` | `badRequest` | The maximum number of items in this section has been reached. | |
| 64 | +| Invalid item ID | `400 Bad Request` | `badRequest` | The specified item ID is not valid. Provide a valid chat, channel, meeting, or community ID. | |
| 65 | +| ETag version mismatch | `412 Precondition Failed` | `preconditionFailed` | The resource has been modified since it was last read. Read the latest version and retry. | |
| 66 | + |
| 67 | +## Examples |
| 68 | + |
| 69 | +### Request |
| 70 | + |
| 71 | +The following example shows a request to add a chat to a section. |
| 72 | + |
| 73 | +<!-- { |
| 74 | + "blockType": "request", |
| 75 | + "name": "add_teamworksectionitem", |
| 76 | + "sampleKeys": ["10f8c3a6-3e2a-4e8b-9c7d-5a4b6c8d9e0f", "a1b2c3d4-e5f6-7890-abcd-ef1234567890"] |
| 77 | +}--> |
| 78 | +```http |
| 79 | +POST https://graph.microsoft.com/beta/users/10f8c3a6-3e2a-4e8b-9c7d-5a4b6c8d9e0f/teamwork/sections/a1b2c3d4-e5f6-7890-abcd-ef1234567890/items |
| 80 | +Content-type: application/json |
| 81 | +If-Match: W/"123456" |
| 82 | +
|
| 83 | +{ |
| 84 | + "id": "19:d5b2c3a4-e6f7-8901-abcd-ef3456789012@thread.v2" |
| 85 | +} |
| 86 | +``` |
| 87 | + |
| 88 | +### Response |
| 89 | + |
| 90 | +The following example shows the response. |
| 91 | + |
| 92 | +>**Note:** The response object shown here might be shortened for readability. |
| 93 | +
|
| 94 | +<!-- { |
| 95 | + "blockType": "response", |
| 96 | + "truncated": true, |
| 97 | + "@odata.type": "microsoft.graph.teamworkSectionItem" |
| 98 | +}--> |
| 99 | +```http |
| 100 | +HTTP/1.1 201 Created |
| 101 | +Content-type: application/json |
| 102 | +Location: https://graph.microsoft.com/beta/users/10f8c3a6-3e2a-4e8b-9c7d-5a4b6c8d9e0f/teamwork/sections/a1b2c3d4-e5f6-7890-abcd-ef1234567890/items/19:d5b2c3a4-e6f7-8901-abcd-ef3456789012@thread.v2 |
| 103 | +
|
| 104 | +{ |
| 105 | + "@odata.type": "#microsoft.graph.teamworkSectionItem", |
| 106 | + "@odata.etag": "W/\"123457\"", |
| 107 | + "id": "19:d5b2c3a4-e6f7-8901-abcd-ef3456789012@thread.v2", |
| 108 | + "itemType": "chat", |
| 109 | + "createdDateTime": "2026-03-08T10:00:00Z", |
| 110 | + "lastModifiedDateTime": null |
| 111 | +} |
| 112 | +``` |
| 113 | + |
| 114 | +<!-- uuid: e6f7a8b9-0123-4567-cdef-567890123456 |
| 115 | +2026-03-08 00:00:00 UTC --> |
| 116 | +<!-- |
| 117 | +{ |
| 118 | + "type": "#page.annotation", |
| 119 | + "description": "Add item to section", |
| 120 | + "keywords": "", |
| 121 | + "section": "documentation", |
| 122 | + "tocPath": "" |
| 123 | +} |
| 124 | +--> |
0 commit comments