Set status for new user

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

Sets the status for a terms of service for a user.

Request

application/json

Request Body

booleanin bodyrequired
true

Whether the user has accepted the terms.

objectin body

The terms of service to set the status for.

stringin bodyrequired
1232132

The ID of terms of service

stringin bodyrequired
terms_of_service

Value is always "terms_of_service"

objectin body

The user to set the status for.

stringin bodyrequired
3423423

The ID of user

stringin bodyrequired
user

Value is always "user"

Response

application/jsonToS User Status

Returns a terms of service status object.

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/terms_of_service_user_statuses \
     -H "Authorization: Bearer <ACCESS_TOKEN>" \
     -H "Content-Type: application/json" \
     -d '{
       "tos": {
         "type": "terms_of_service",
         "id": "1232132"
       },
       "user": {
         "type": "user",
         "id": "3423423"
       },
       "is_accepted": true
     }'
Java
BoxTermsOfService.Info newUserStatus = BoxTermsOfServiceUserStatus.create(api, "tos-id", true, "user-id");
Python
user = client.user(user_id='22222')
user_status = client.terms_of_service(tos_id='12345').set_user_status(is_accepted=True, user=user)
print('User status ID is {0} and the accepted status is {1}'.format(user_status.id, user_status.is_accepted)
Node
client.termsOfService.createUserStatus('11111', true, {user_id: '22222'})
	.then(tosStatus => {
		/* tosStatus -> {
			type: 'terms_of_service_user_status',
			id: '12345',
			tos: { type: 'terms_of_service', id: '11111' },
			user: { type: 'user', id: '22222' },
			is_accepted: true,
			created_at: '2018-04-11T15:33:49-07:00',
			modified_at: '2018-04-11T15:33:49-07:00' }
		*/
	});

Response Example

{
  "id": 11446498,
  "type": "terms_of_service_user_status",
  "tos": {
    "id": 11446498,
    "type": "terms_of_service"
  },
  "user": {
    "id": 11446498,
    "type": "user",
    "name": "Aaron Levie",
    "login": "ceo@example.com"
  },
  "is_accepted": true,
  "created_at": "2012-12-12T10:53:43-08:00",
  "modified_at": "2012-12-12T10:53:43-08:00"
}