> ## Documentation Index
> Fetch the complete documentation index at: https://developer.box.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ドメインへのコラボレーションの許可

一般にコラボレーションの作成を制限している企業は、企業で作成されている可能性のあるコラボレーションのリストに`example.com`などのドメインを追加できます。

```sh cURL theme={null}
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 Node/TypeScript v10 theme={null}
await client.collaborationAllowlistEntries.createCollaborationWhitelistEntry({
  direction:
    'inbound' as CreateCollaborationWhitelistEntryRequestBodyDirectionField,
  domain: domain,
} satisfies CreateCollaborationWhitelistEntryRequestBody);
```

```python Python v10 theme={null}
client.collaboration_allowlist_entries.create_collaboration_whitelist_entry(
    domain, CreateCollaborationWhitelistEntryDirection.INBOUND
)
```

```cs .NET v10 theme={null}
await client.CollaborationAllowlistEntries.CreateCollaborationWhitelistEntryAsync(requestBody: new CreateCollaborationWhitelistEntryRequestBody(direction: CreateCollaborationWhitelistEntryRequestBodyDirectionField.Inbound, domain: domain));
```

```swift Swift v10 theme={null}
try await client.collaborationAllowlistEntries.createCollaborationWhitelistEntry(requestBody: CreateCollaborationWhitelistEntryRequestBody(direction: CreateCollaborationWhitelistEntryRequestBodyDirectionField.inbound, domain: domain))
```

```java Java v10 theme={null}
client.getCollaborationAllowlistEntries().createCollaborationWhitelistEntry(new CreateCollaborationWhitelistEntryRequestBody(domain, CreateCollaborationWhitelistEntryRequestBodyDirectionField.INBOUND))
```

```cs .NET v6 theme={null}
BoxCollaborationWhitelistEntry entry = await client.CollaborationWhitelistManager.AddCollaborationWhitelistEntryAsync(
    "example.com",
    "both"
);
```

```javascript Node v4 theme={null}
client.collaborationAllowlist.addDomain('test.com', client.collaborationAllowlist.directions.INBOUND, callback);
```

このエンドポイントには、コラボレーションを許可する`domain`と、以下のように設定できる`direction`が必要です。

* `inbound`: 外部ユーザーが企業のコンテンツでコラボレーションできるかどうか。
* `outbound`: 企業の管理対象ユーザーが外部の企業で所有されているコンテンツでコラボレーションできるかどうか。
* `both`: 上記の両方。

新しく許可されたドメインを設定する場合はbothパラメータを指定します。

```sh cURL theme={null}
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 Node/TypeScript v10 theme={null}
await client.collaborationAllowlistEntries.createCollaborationWhitelistEntry({
  direction:
    'inbound' as CreateCollaborationWhitelistEntryRequestBodyDirectionField,
  domain: domain,
} satisfies CreateCollaborationWhitelistEntryRequestBody);
```

```python Python v10 theme={null}
client.collaboration_allowlist_entries.create_collaboration_whitelist_entry(
    domain, CreateCollaborationWhitelistEntryDirection.INBOUND
)
```

```cs .NET v10 theme={null}
await client.CollaborationAllowlistEntries.CreateCollaborationWhitelistEntryAsync(requestBody: new CreateCollaborationWhitelistEntryRequestBody(direction: CreateCollaborationWhitelistEntryRequestBodyDirectionField.Inbound, domain: domain));
```

```swift Swift v10 theme={null}
try await client.collaborationAllowlistEntries.createCollaborationWhitelistEntry(requestBody: CreateCollaborationWhitelistEntryRequestBody(direction: CreateCollaborationWhitelistEntryRequestBodyDirectionField.inbound, domain: domain))
```

```java Java v10 theme={null}
client.getCollaborationAllowlistEntries().createCollaborationWhitelistEntry(new CreateCollaborationWhitelistEntryRequestBody(domain, CreateCollaborationWhitelistEntryRequestBodyDirectionField.INBOUND))
```

```cs .NET v6 theme={null}
BoxCollaborationWhitelistEntry entry = await client.CollaborationWhitelistManager.AddCollaborationWhitelistEntryAsync(
    "example.com",
    "both"
);
```

```javascript Node v4 theme={null}
client.collaborationAllowlist.addDomain('test.com', client.collaborationAllowlist.directions.INBOUND, callback);
```

**関連するAPI**

**関連するガイド**
