Skip to main content
POST
/
storage_policy_assignments
cURL
curl -i -X POST "https://api.box.com/2.0/storage_policy_assignments" \
     -H "authorization: Bearer <ACCESS_TOKEN>" \
     -H "content-type: application/json" \
     -d '{
       "storage_policy": {
         "type": "storage_policy",
         "id": "1434325"
       },
       "assigned_to": {
         "type": "user",
         "id": "9987987"
       }
     }'
{
  "id": "ZW50ZXJwcmlzZV8xMjM0NTY3ODkw",
  "type": "storage_policy_assignment",
  "storage_policy": {
    "id": "11446498",
    "type": "storage_policy"
  },
  "assigned_to": {
    "id": "11446498",
    "type": "file"
  }
}
This endpoint is in the version 2024.0. No changes are required to continue using it. For more details, see Box API versioning.Learn more about Box SDK versioning strategy.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
storage_policy
object
required

The storage policy to assign to the user or enterprise.

assigned_to
object
required

The user or enterprise to assign the storage policy to.

Response

Returns the new storage policy assignment created.

The assignment of a storage policy to a user or enterprise.

id
string
required

The unique identifier for a storage policy assignment.

Example:

"ZW50ZXJwcmlzZV8xMjM0NTY3ODkw"

type
enum<string>
required

The value will always be storage_policy_assignment.

Available options:
storage_policy_assignment
Example:

"storage_policy_assignment"

storage_policy
Storage policy (Mini) · object

The assigned storage policy.

assigned_to
Reference · object

The enterprise or use the policy is assigned to.