Box Developer Documentation
Latest version

Add domain to list of allowed collaboration domains

post
https://api.box.com/2.0
/collaboration_whitelist_entries

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 new entry in the list of allowed domains to allow collaboration for.

Request

bearer [ACCESS_TOKEN]
application/json

Request Body

stringin bodyrequired
"inbound"

The direction in which to allow collaborations.

Value is one of inbound,outbound,both

stringin bodyrequired
"example.com"

The domain to add to the list of allowed domains.

Response

Returns a new entry on the list of allowed domains.

application/jsonClient error

An unexpected client error.

post
Add domain to list of allowed collaboration domains
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 -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"
     }'
Node/TypeScript v10
await client.collaborationAllowlistEntries.createCollaborationWhitelistEntry({
  direction:
    'inbound' as CreateCollaborationWhitelistEntryRequestBodyDirectionField,
  domain: domain,
} satisfies CreateCollaborationWhitelistEntryRequestBody);
Python v10
client.collaboration_allowlist_entries.create_collaboration_whitelist_entry(
    domain, CreateCollaborationWhitelistEntryDirection.INBOUND
)
.NET v10
await client.CollaborationAllowlistEntries.CreateCollaborationWhitelistEntryAsync(requestBody: new CreateCollaborationWhitelistEntryRequestBody(direction: CreateCollaborationWhitelistEntryRequestBodyDirectionField.Inbound, domain: domain));
Swift v10
try await client.collaborationAllowlistEntries.createCollaborationWhitelistEntry(requestBody: CreateCollaborationWhitelistEntryRequestBody(direction: CreateCollaborationWhitelistEntryRequestBodyDirectionField.inbound, domain: domain))
Java v10
client.getCollaborationAllowlistEntries().createCollaborationWhitelistEntry(new CreateCollaborationWhitelistEntryRequestBody(domain, CreateCollaborationWhitelistEntryRequestBodyDirectionField.INBOUND))
.NET v5
BoxCollaborationWhitelistEntry entry = await client.CollaborationWhitelistManager.AddCollaborationWhitelistEntryAsync(
    "example.com",
    "both"
);
Node v3
client.collaborationAllowlist.addDomain('test.com', client.collaborationAllowlist.directions.INBOUND, callback);

Response Example

{
  "id": "11446498",
  "type": "collaboration_whitelist_entry",
  "created_at": "2012-12-12T10:53:43-08:00",
  "direction": "both",
  "domain": "example.com",
  "enterprise": {
    "id": "11446498",
    "type": "enterprise",
    "name": "Acme Inc."
  }
}