Box Developer Documentation

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.

Latest version

Create terms of service status for new user

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

This endpoint is in the version 2024.0. No changes are required to continue using it. For more details, see Box API versioning.

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

Request

bearer [ACCESS_TOKEN]
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"

The type of object.

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"

The type of object.

Value is always user

Response

Returns a terms of service status object.

application/jsonClient error

An unexpected client error.

post
Create terms of service status for new user
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

Learn more about Box SDK versioning strategy.


cURL
curl -i -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
     }'
Node/TypeScript v10
await client.termsOfServiceUserStatuses.createTermsOfServiceStatusForUser({
  tos: new CreateTermsOfServiceStatusForUserRequestBodyTosField({ id: tos.id }),
  user: new CreateTermsOfServiceStatusForUserRequestBodyUserField({
    id: user.id,
  }),
  isAccepted: false,
} satisfies CreateTermsOfServiceStatusForUserRequestBody);
Python v10
client.terms_of_service_user_statuses.create_terms_of_service_status_for_user(
    CreateTermsOfServiceStatusForUserTos(id=tos.id),
    CreateTermsOfServiceStatusForUserUser(id=user.id),
    False,
)
.NET v10
await client.TermsOfServiceUserStatuses.CreateTermsOfServiceStatusForUserAsync(requestBody: new CreateTermsOfServiceStatusForUserRequestBody(tos: new CreateTermsOfServiceStatusForUserRequestBodyTosField(id: tos.Id), user: new CreateTermsOfServiceStatusForUserRequestBodyUserField(id: user.Id), isAccepted: false));
Swift v10
try await client.termsOfServiceUserStatuses.createTermsOfServiceStatusForUser(requestBody: CreateTermsOfServiceStatusForUserRequestBody(tos: CreateTermsOfServiceStatusForUserRequestBodyTosField(id: tos.id), user: CreateTermsOfServiceStatusForUserRequestBodyUserField(id: user.id), isAccepted: false))
Java v10
client.getTermsOfServiceUserStatuses().createTermsOfServiceStatusForUser(new CreateTermsOfServiceStatusForUserRequestBody(new CreateTermsOfServiceStatusForUserRequestBodyTosField(tos.getId()), new CreateTermsOfServiceStatusForUserRequestBodyUserField(user.getId()), false))
.NET v6
await client.TermsOfServiceUserStatuses.CreateTermsOfServiceStatusForUserAsync(requestBody: new CreateTermsOfServiceStatusForUserRequestBody(tos: new CreateTermsOfServiceStatusForUserRequestBodyTosField(id: tos.Id), user: new CreateTermsOfServiceStatusForUserRequestBodyUserField(id: user.Id), isAccepted: false));
Node v4
await client.termsOfServiceUserStatuses.createTermsOfServiceStatusForUser({
  tos: new CreateTermsOfServiceStatusForUserRequestBodyTosField({ id: tos.id }),
  user: new CreateTermsOfServiceStatusForUserRequestBodyUserField({
    id: user.id,
  }),
  isAccepted: false,
} satisfies CreateTermsOfServiceStatusForUserRequestBody);

Response Example

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