A beta version of the new Box developer documentation site is launching soon! Updated Developer Guides, modern API Reference, and AI-powered search are on the way to help you build with Box faster. Stay tuned for more updates.
Creates a terms of service for a given enterprise and type of user.
"enabled"Whether this terms of service is active.
Value is one of enabled,disabled
"By collaborating on this file you are accepting..."The terms of service text to display to users.
The text can be set to empty if the status is set to disabled.
"managed"The type of user to set the terms of service for.
Value is one of external,managed
Returns a new task object.
An unexpected client error.
curl -i -X POST "https://api.box.com/2.0/terms_of_services" \
-H "authorization: Bearer <ACCESS_TOKEN>" \
-H "content-type: application/json" \
-d '{
"status": "enabled",
"text": "By collaborating on this file you are accepting..."
}'await client.termsOfServices.createTermsOfService({
status: 'disabled' as CreateTermsOfServiceRequestBodyStatusField,
tosType: 'managed' as CreateTermsOfServiceRequestBodyTosTypeField,
text: 'Test TOS',
} satisfies CreateTermsOfServiceRequestBody);client.terms_of_services.create_terms_of_service(
CreateTermsOfServiceStatus.DISABLED,
"Test TOS",
tos_type=CreateTermsOfServiceTosType.MANAGED,
)await client.TermsOfServices.CreateTermsOfServiceAsync(requestBody: new CreateTermsOfServiceRequestBody(status: CreateTermsOfServiceRequestBodyStatusField.Disabled, text: "Test TOS") { TosType = CreateTermsOfServiceRequestBodyTosTypeField.Managed });try await client.termsOfServices.createTermsOfService(requestBody: CreateTermsOfServiceRequestBody(status: CreateTermsOfServiceRequestBodyStatusField.disabled, tosType: CreateTermsOfServiceRequestBodyTosTypeField.managed, text: "Test TOS"))client.getTermsOfServices().createTermsOfService(new CreateTermsOfServiceRequestBody.Builder(CreateTermsOfServiceRequestBodyStatusField.DISABLED, "Test TOS").tosType(CreateTermsOfServiceRequestBodyTosTypeField.MANAGED).build())await client.TermsOfServices.CreateTermsOfServiceAsync(requestBody: new CreateTermsOfServiceRequestBody(status: CreateTermsOfServiceRequestBodyStatusField.Disabled, text: "Test TOS") { TosType = CreateTermsOfServiceRequestBodyTosTypeField.Managed });await client.termsOfServices.createTermsOfService({
status: 'disabled' as CreateTermsOfServiceRequestBodyStatusField,
tosType: 'managed' as CreateTermsOfServiceRequestBodyTosTypeField,
text: 'Test TOS',
} satisfies CreateTermsOfServiceRequestBody);{
"id": "11446498",
"type": "terms_of_service",
"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",
"status": "enabled",
"text": "By using this service, you agree to ...",
"tos_type": "managed"
}