Box Developer Documentation

Join BoxWorks 2024 to discover what's possible with content and AI!

Register now!

Allow a domain for collaboration

Allow a domain for collaboration

An enterprise that normally restricts creating collaborations can add domains, such as example.com, to a list for which collaborations may be created within the enterprise.

cURL
curl -i -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"
     }'
TypeScript Gen
await client.collaborationAllowlistEntries.createCollaborationWhitelistEntry({
  direction:
    'inbound' as CreateCollaborationWhitelistEntryRequestBodyDirectionField,
  domain: domain,
} satisfies CreateCollaborationWhitelistEntryRequestBody);
Python Gen
client.collaboration_allowlist_entries.create_collaboration_whitelist_entry(
    domain, CreateCollaborationWhitelistEntryDirection.INBOUND.value
)
.NET Gen
await client.CollaborationAllowlistEntries.CreateCollaborationWhitelistEntryAsync(requestBody: new CreateCollaborationWhitelistEntryRequestBody(direction: CreateCollaborationWhitelistEntryRequestBodyDirectionField.Inbound, domain: domain));
Swift Gen (Beta)
try await client.collaborationAllowlistEntries.createCollaborationWhitelistEntry(requestBody: CreateCollaborationWhitelistEntryRequestBody(direction: CreateCollaborationWhitelistEntryRequestBodyDirectionField.inbound, domain: domain))
.NET
BoxCollaborationWhitelistEntry entry = await client.CollaborationWhitelistManager.AddCollaborationWhitelistEntryAsync(
    "example.com",
    "both"
);
Node
client.collaborationAllowlist.addDomain('test.com', client.collaborationAllowlist.directions.INBOUND, callback);

The 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 allowed domain.

cURL
curl -i -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"
     }'
TypeScript Gen
await client.collaborationAllowlistEntries.createCollaborationWhitelistEntry({
  direction:
    'inbound' as CreateCollaborationWhitelistEntryRequestBodyDirectionField,
  domain: domain,
} satisfies CreateCollaborationWhitelistEntryRequestBody);
Python Gen
client.collaboration_allowlist_entries.create_collaboration_whitelist_entry(
    domain, CreateCollaborationWhitelistEntryDirection.INBOUND.value
)
.NET Gen
await client.CollaborationAllowlistEntries.CreateCollaborationWhitelistEntryAsync(requestBody: new CreateCollaborationWhitelistEntryRequestBody(direction: CreateCollaborationWhitelistEntryRequestBodyDirectionField.Inbound, domain: domain));
Swift Gen (Beta)
try await client.collaborationAllowlistEntries.createCollaborationWhitelistEntry(requestBody: CreateCollaborationWhitelistEntryRequestBody(direction: CreateCollaborationWhitelistEntryRequestBodyDirectionField.inbound, domain: domain))
.NET
BoxCollaborationWhitelistEntry entry = await client.CollaborationWhitelistManager.AddCollaborationWhitelistEntryAsync(
    "example.com",
    "both"
);
Node
client.collaborationAllowlist.addDomain('test.com', client.collaborationAllowlist.directions.INBOUND, callback);