Manage Applications

    Create whitelist entry

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

    Creates a collaboration whitelist entry, specifying a domain and direction to allow collaboration for.

    Request

    application/json

    Request Body

    stringin bodyrequired
    inboud

    The direction in which to allow collaborations.

    Value is one of "inbound", "outbound", "both"

    stringin bodyrequired
    example.com

    The domain to add to the whitelist.

    Response

    Returns a new collaboration whitelist entry.

    You can now try out some of our APIs live, right here in the documentation.
    Log In

    Request Example

    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);

    Response Example

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