Sample - Box Platform API
POST/integration_mappings/slack

Create a Slack integration mapping

Creates a Slack integration mapping between a Slack channel and a Box item. Supply partner_item and box_item, and ensure the authenticated user has the Admin or Co-Admin role; options can disable access management for the mapping.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

3 body fields

Slack integration mapping details connecting a Slack channel or organization to a Box item.

partner_itemobjectrequired
The Slack item to map, including its required `id` and `type`; provide either `slack_org_id` or `slack_workspace_id`, but not both.
box_itemobjectrequired
The Box item to associate with the Slack item, including its required `id` and `type`.
optionsobjectoptional
Slack integration options, including whether access management is disabled.

4 status codes
201Returns the created Slack integration mapping, including its identifiers, mapped Slack and Box items, options, creator, and timestamps.
idstringrequired
A unique identifier of a folder mapping (part of a composite key together with `integration_type`).
typestringrequired
Mapping type.
Allowed:integration_mapping
integration_typestringoptional
Identifies the Box partner app, with which the mapping is associated. Currently only supports Slack. (part of the composite key together with `id`).
Allowed:slack
is_manually_createdbooleanoptional
Identifies whether the mapping has been manually set (as opposed to being automatically created).
optionsobjectoptional
created_byobjectoptional
An object representing the user who created the integration mapping.
modified_byobjectoptional
The user who last modified the integration mapping.
partner_itemobjectrequired
Mapped item object for Slack.
box_itemobjectrequired
The Box folder, to which the object from the partner app domain (referenced in `partner_item_id`) is mapped.
created_atstringoptional
When the integration mapping object was created.
modified_atstringoptional
When the integration mapping object was last modified.
400Returned when `options` is invalid or the Box folder cannot be mapped to the specified Slack item, including when the channel is already mapped or the integration is not authorized.
typestringoptional
The value will always be `error`.
Allowed:error
statusintegeroptional
The HTTP status of the response.
codestringoptional
A Box-specific error code.
Allowed:createdacceptedno_contentredirectnot_modifiedbad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictprecondition_failed
messagestringoptional
A short message describing the error.
context_infoobjectoptional
A free-form object that contains additional context about the error. The possible fields are defined on a per-endpoint basis. `message` is only one example.
help_urlstringoptional
A URL that links to more information about why this error occurred.
request_idstringoptional
A unique identifier for this response, which can be used when contacting Box support.
404Returned when the integration mapping cannot be found.
typestringoptional
The value will always be `error`.
Allowed:error
statusintegeroptional
The HTTP status of the response.
codestringoptional
A Box-specific error code.
Allowed:createdacceptedno_contentredirectnot_modifiedbad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictprecondition_failed
messagestringoptional
A short message describing the error.
context_infoobjectoptional
A free-form object that contains additional context about the error. The possible fields are defined on a per-endpoint basis. `message` is only one example.
help_urlstringoptional
A URL that links to more information about why this error occurred.
request_idstringoptional
A unique identifier for this response, which can be used when contacting Box support.
defaultReturned for an unexpected client error and includes a generic error object with a message and request identifier.
typestringoptional
The value will always be `error`.
Allowed:error
statusintegeroptional
The HTTP status of the response.
codestringoptional
A Box-specific error code.
Allowed:createdacceptedno_contentredirectnot_modifiedbad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictprecondition_failed
messagestringoptional
A short message describing the error.
context_infoobjectoptional
A free-form object that contains additional context about the error. The possible fields are defined on a per-endpoint basis. `message` is only one example.
help_urlstringoptional
A URL that links to more information about why this error occurred.
request_idstringoptional
A unique identifier for this response, which can be used when contacting Box support.

Error handling

A 400 is returned when options is invalid or the Box folder cannot be mapped to partner_item. In partner_item, provide either slack_org_id or slack_workspace_id, but not both; partner_item and box_item must each include their required id and type fields. A 404 is returned when the integration mapping cannot be found.