Box Developer Documentation
Latest version

Create user exemption from collaboration domain restrictions

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

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

Exempts a user from the restrictions set out by the allowed list of domains for collaborations.

Request

bearer [ACCESS_TOKEN]
application/json

Request Body

objectin body

The user to exempt.

stringin bodyrequired
"23522323"

The ID of the user to exempt.

Response

Returns a new exemption entry.

application/jsonClient error

An unexpected client error.

post
Create user exemption from collaboration domain restrictions
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_exempt_targets" \
     -H "authorization: Bearer <ACCESS_TOKEN>" \
     -H "content-type: application/json" \
     -d '{
       "user": {
         "id": "23522323"
       }
     }'
Node/TypeScript v10
await client.collaborationAllowlistExemptTargets.createCollaborationWhitelistExemptTarget(
  {
    user: {
      id: user.id,
    } satisfies CreateCollaborationWhitelistExemptTargetRequestBodyUserField,
  } satisfies CreateCollaborationWhitelistExemptTargetRequestBody,
);
Python v10
client.collaboration_allowlist_exempt_targets.create_collaboration_whitelist_exempt_target(
    CreateCollaborationWhitelistExemptTargetUser(id=user.id)
)
.NET v10
await client.CollaborationAllowlistExemptTargets.CreateCollaborationWhitelistExemptTargetAsync(requestBody: new CreateCollaborationWhitelistExemptTargetRequestBody(user: new CreateCollaborationWhitelistExemptTargetRequestBodyUserField(id: user.Id)));
Swift v10
try await client.collaborationAllowlistExemptTargets.createCollaborationWhitelistExemptTarget(requestBody: CreateCollaborationWhitelistExemptTargetRequestBody(user: CreateCollaborationWhitelistExemptTargetRequestBodyUserField(id: user.id)))
Java v10
client.getCollaborationAllowlistExemptTargets().createCollaborationWhitelistExemptTarget(new CreateCollaborationWhitelistExemptTargetRequestBody(new CreateCollaborationWhitelistExemptTargetRequestBodyUserField(user.getId())))
.NET v5
string userId = "22222";
BoxCollaborationWhitelistTargetEntry exemptUser = await client.CollaborationWhitelistManager
    .AddCollaborationWhitelistExemptUserAsync(userId);
Node v3
client.collaborationAllowlist.addExemption('5678', callback);

Response Example

{
  "id": "11446498",
  "type": "collaboration_whitelist_exempt_target",
  "created_at": "2012-12-12T10:53:43-08:00",
  "enterprise": {
    "id": "11446498",
    "type": "enterprise",
    "name": "Acme Inc."
  },
  "modified_at": "2012-12-12T10:53:43-08:00",
  "user": {
    "id": "11446498",
    "type": "user",
    "login": "ceo@example.com",
    "name": "Aaron Levie"
  }
}