GuidesCollaboration WhitelistsCreate Collaboration Whitelist
Edit this page

Create Collaboration Whitelist

Create Collaboration Whitelist

Creating a new collaboration whitelist will set a new domain, such as example.com, for which collaborations may be created within the enterprise.

cURL
curl -X POST https://api.box.com/2.0/collaboration_whitelist_entries \
     -H 'Authorization: Bearer <ACCESS_TOKEN>'
     -H 'Content-Type: application/json" '
     -d '{
       "domain": "example.com",
       "direction": "inboud"
     }'
.NET
BoxCollaborationWhitelistEntry entry = await client.CollaborationWhitelistManager.AddCollaborationWhitelistEntryAsync(
    "example.com",
    "both"
);
Java
BoxCollaborationWhitelist.create(api, "test.com", BoxCollaborationWhitelist.WhitelistDirection.BOTH);
Python
from boxsdk.object.collaboration_whitelist import WhitelistDirection
domain = 'example.com'
whitelist_entry = client.collaboration_whitelist().add_domain(domain, direction=WhitelistDirection.INBOUND)
Node
client.collaborationWhitelist.addDomain('test.com', client.collaborationWhitelist.directions.INBOUND, callback);

The create collaboration whitelist endpoint will require the domain to allow the collaborations between, and a direction, which may be set to:

  • inbound: Whether external users may be collaborated in on content in your enterprise.
  • outbound: Whether your enterprise managed users may be collaborated in on content owned within an external enterprise.
  • both: Both of the above.

Supply both parameter to set up the new collaboration whitelist.

cURL
curl -X POST https://api.box.com/2.0/collaboration_whitelist_entries \
     -H 'Authorization: Bearer <ACCESS_TOKEN>'
     -H 'Content-Type: application/json" '
     -d '{
       "domain": "example.com",
       "direction": "inboud"
     }'
.NET
BoxCollaborationWhitelistEntry entry = await client.CollaborationWhitelistManager.AddCollaborationWhitelistEntryAsync(
    "example.com",
    "both"
);
Java
BoxCollaborationWhitelist.create(api, "test.com", BoxCollaborationWhitelist.WhitelistDirection.BOTH);
Python
from boxsdk.object.collaboration_whitelist import WhitelistDirection
domain = 'example.com'
whitelist_entry = client.collaboration_whitelist().add_domain(domain, direction=WhitelistDirection.INBOUND)
Node
client.collaborationWhitelist.addDomain('test.com', client.collaborationWhitelist.directions.INBOUND, callback);