Box Developer Documentation
Latest version

Update Teams integration mapping

put
https://api.box.com/2.0
/integration_mappings/teams/:integration_mapping_id

This endpoint is in the version 2024.0. No changes are required to continue using it. For more details, see Box API versioning.

Updates a Teams integration mapping. Supports updating the Box folder ID and options. You need Admin or Co-Admin role to use this endpoint.

Request

bearer [ACCESS_TOKEN]
application/json

Path Parameters

stringin pathrequired
11235432

An ID of an integration mapping.

Request Body

objectin body

The Box folder, to which the object from the partner app domain is mapped.

stringin bodyoptional
"42037322"

ID of the folder.

stringin bodyoptional
"folder"

The value will always be folder.

Value is always folder

Response

Returns the updated integration mapping object.

application/jsonClient error

Returns a bad_request if an incorrect options was supplied or the Box folder cannot be mapped to this partner_item. Error codes:

  • SERVICE_ACCOUNT_IS_NOT_A_COOWNER_OR_OWNER - service account doesn't have co-owner collaboration or is not an owner of the box_item_id,
  • BOX_FOLDER_EXTERNALLY_OWNED - Box folder must be internally owned to the admin's enterprise,
  • FOLDER_ALREADY_MAPPED - Box folder must not be mapped to another integration mapping.
application/jsonClient error

Returns not_found if integration mapping object was not found.

application/jsonClient error

An unexpected client error.

put
Update Teams integration mapping
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

Learn more about Box SDK versionig strategy.


cURL
curl -X -L PUT "https://api.box.com/2.0/integration_mappings/teams/12345" \
     -H "authorization: Bearer <ACCESS_TOKEN>"  \
     -H 'content-type: application/json'  \
Node/TypeScript v10
await userClient.integrationMappings.updateTeamsIntegrationMappingById(
  integrationMappingId,
  {
    requestBody: {
      boxItem: new FolderReference({ id: '1234567' }),
    } satisfies UpdateTeamsIntegrationMappingByIdRequestBody,
  } satisfies UpdateTeamsIntegrationMappingByIdOptionalsInput,
);
Python v10
user_client.integration_mappings.update_teams_integration_mapping_by_id(
    integration_mapping_id, box_item=FolderReference(id="1234567")
)
.NET v10
await userClient.IntegrationMappings.UpdateTeamsIntegrationMappingByIdAsync(integrationMappingId: integrationMappingId, requestBody: new UpdateTeamsIntegrationMappingByIdRequestBody() { BoxItem = new FolderReference(id: "1234567") });
Swift v10
try await userClient.integrationMappings.updateTeamsIntegrationMappingById(integrationMappingId: integrationMappingId, requestBody: UpdateTeamsIntegrationMappingByIdRequestBody(boxItem: FolderReference(id: "1234567")))
Java v10
userClient.getIntegrationMappings().updateTeamsIntegrationMappingById(integrationMappingId, new UpdateTeamsIntegrationMappingByIdRequestBody.Builder().boxItem(new FolderReference("1234567")).build())

Response Example

{
  "id": "12345",
  "type": "integration_mapping",
  "box_item": {
    "id": "42037322",
    "type": "folder"
  },
  "created_at": "2012-12-12T10:53:43-08:00",
  "integration_type": "teams",
  "is_overridden_by_manual_mapping": true,
  "modified_at": "2012-12-12T10:53:43-08:00",
  "partner_item": {
    "id": "19%3ABCD-Avgfggkggyftdtfgghjhkhkhh%40thread:tacv2",
    "type": "channel",
    "team_id": "hjgjgjg-bhhj-564a-b643-hghgj685u",
    "tenant_id": "E1234567"
  }
}