Box Developer Documentation
 
    Beta

    Create Teams integration mapping

    post
    https://api.box.com/2.0
    /integration_mappings/teams

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

    Creates a Teams integration mapping by mapping a Teams channel to a Box item. You need Admin or Co-Admin role to use this endpoint.

    Request

    bearer [ACCESS_TOKEN]
    application/json

    Request Body

    objectin body

    The Box folder, to which the object from the partner app domain (referenced in partner_item_id) is mapped

    stringin bodyrequired
    "42037322"

    ID of the folder

    stringin bodyrequired
    "folder"

    folder

    Value is always folder

    objectin body

    The schema for an integration mapping mapped item object for type Teams.

    stringin bodyrequired
    "19%ABCD-Avgfggkggyftdtfgghjhkhkhh%40thread:tacv2"

    ID of the mapped item (of type referenced in type)

    stringin bodyrequired
    "channel"

    Type of the mapped item referenced in id

    Value is one of channel,team

    stringin bodyrequired
    "hjgjgjg-bhhj-564a-b643-hghgj685u"

    ID of the team that is registered with Microsoft Teams.

    stringin bodyrequired
    "abcd-defg-1235-7890"

    ID of the tenant that is registered with Microsoft Teams.

    Response

    Returns the created integration mapping.

    application/jsonClient error

    Returns a bad_request if an incorrect options was supplied or the Box folder cannot be mapped to this partner_item_id. 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,
    • CHANNEL_ALREADY_MAPPED - channel is already mapped to another box_item_id,
    • TEAM_ALREADY_MAPPED - team is already mapped to another box_item_id,
    • BOX_ENTERPRISE_MISMATCH - Box folder must be owned by the enterprise, which is configured to use Box as Content layer for Teams,
    • 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 a not_found error if the integration mapping, record or folder could not be found.

    application/jsonClient error

    An unexpected client error.

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

    Request Example

    TypeScript Gen
    await userClient.integrationMappings.createTeamsIntegrationMapping({
      partnerItem: {
        type: 'channel' as IntegrationMappingPartnerItemTeamsCreateRequestTypeField,
        id: partnerItemId,
        tenantId: tenantId,
        teamId: teamId,
      } satisfies IntegrationMappingPartnerItemTeamsCreateRequest,
      boxItem: new FolderReference({ id: folder.id }),
    } satisfies IntegrationMappingTeamsCreateRequest);

    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"
      }
    }