Join BoxWorks 2024 to discover what's possible with content and AI!
Register now!Updates a specific terms of service.
324234
The ID of the terms of service.
"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
.
Returns an updated terms of service object.
An unexpected client error.
curl -i -X PUT "https://api.box.com/2.0/terms_of_services/324234" \
-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.updateTermsOfServiceById(tos.id, {
status: 'disabled' as UpdateTermsOfServiceByIdRequestBodyStatusField,
text: 'Updated TOS',
} satisfies UpdateTermsOfServiceByIdRequestBody);
client.terms_of_services.update_terms_of_service_by_id(
tos.id, UpdateTermsOfServiceByIdStatus.DISABLED.value, "Updated TOS"
)
await client.TermsOfServices.UpdateTermsOfServiceByIdAsync(termsOfServiceId: tos.Id, requestBody: new UpdateTermsOfServiceByIdRequestBody(status: UpdateTermsOfServiceByIdRequestBodyStatusField.Disabled, text: "Updated TOS"));
try await client.termsOfServices.updateTermsOfServiceById(termsOfServiceId: tos.id, requestBody: UpdateTermsOfServiceByIdRequestBody(status: UpdateTermsOfServiceByIdRequestBodyStatusField.disabled, text: "Updated TOS"))
BoxTermsOfService termsOfService = new BoxTermsOfService(api, "tos-id");
BoxTermsOfService.Info termsOfServiceInfo = termsOfService.new Info();
termsOfServiceInfo.setStatus(BoxTermsOfService.TermsOfServiceStatus.DISABLED);
termsOfServiceInfo.setText("New Terms of Service Text");
termsOfService.updateInfo(termsOfService);
update_object = {'text': 'New Text'}
updated_tos = client.terms_of_service(tos_id='12345').update_info(data=update_object)
print(f'The updated message for your custom terms of service is {updated_tos.text} with ID {updated_tos.id}')
var updates = new BoxTermsOfServicesRequest()
{
Status = "disabled",
Text = "Updated Text"
};
BoxTermsOfService updatedToS = client.TermsOfServiceManager
.UpdateTermsOfServicesAsync("11111", updates);
client.termsOfService.update('12345', { status: 'disabled' })
.then(tos => {
/* tos -> {
type: 'terms_of_service',
id: '12345',
status: 'disabled',
enterprise: { type: 'enterprise', id: '55555' },
tos_type: 'managed',
text: 'By using this service, you agree to ...',
created_at: '2018-04-19T13:55:09-07:00',
modified_at: '2018-04-19T13:55:09-07:00' }
*/
});
client.termsOfService.update(
tosId: "12345",
text: "Updated Text String",
status: TermsOfServiceStatus.enabled
) { (result: Result<TermsOfService, BoxSDKError>) in
guard calse let .success(termsOfService) = result else {
print("Error updating terms of service")
return
}
print("Terms of Service with id: \(termsOfService.id) was updated with text: \(termsOfService.text)")
}
{
"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"
}