Box Developer Documentation
 
    Latest version

    Create jobs to terminate users session

    post
    https://api.box.com/2.0
    /users/terminate_sessions

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

    Validates the roles and permissions of the user, and creates asynchronous jobs to terminate the user's sessions. Returns the status for the POST request.

    Request

    bearer [ACCESS_TOKEN]
    application/json

    Request Body

    string arrayin bodyrequired
    ["123456","456789"]

    A list of user IDs

    string arrayin bodyrequired
    ["user@sample.com","user2@sample.com"]

    A list of user logins

    Response

    Returns a message about the request status.

    application/jsonClient error

    Returns an error if some of the parameters are not valid.

    • Users can not be NULL or EMPTY when no value is provided
    • User id format is string when the provided user id format is incorrect
    • Supported payload format is JSON when the provided payload format is incorrect
    application/jsonClient error

    Returns an error if there are insufficient permissions.

    application/jsonClient error

    Returns an error if the resource could not be found.

    application/jsonClient error

    Returns an error if the rate limit is exceeded.

    application/jsonClient error

    Returns an error if there is an internal server issue.

    application/jsonClient error

    Returns an error if the request timed out.

    application/jsonClient error

    An unexpected client error.

    post
    Create jobs to terminate users session
    You can now try out some of our APIs live, right here in the documentation.
    Log in

    Request Example

    cURL
    curl -i -X POST "https://api.box.com/2.0/users/terminate_sessions" \
        -H "authorization: Bearer <ACCESS_TOKEN>" \
        -H "content-type: application/json" \
        -H "accept: application/json" \
        -d
      {
          user_ids: ["6178859178", "4824866571"]
          user_logins: ["user@example.com", "user2@example.com",]
      }

    Response Example

    {
      "message": "Request is successful, please check the admin\nevents for the status of the job"
    }