> This page is for Dropbox API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.dropboxapi.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.dropboxapi.com/_mcp/server.

# Team Folder Space Limit Set

POST https://api.dropboxapi.com/2/team/team_folder/space_limit/set
Content-Type: application/json

Sets the space limit configuration of a team folder, replacing any existing
 configuration. See `TeamFolderSpaceLimitCapsType` for how space
 limits are enforced.

**Required scope:** `team_data.content.write`

**Endpoint format:** [RPC](https://docs.dropboxapi.com/dropbox-api/docs/technical-reference/request-response-formats#rpc-endpoints)

**Authentication:** [Team](https://docs.dropboxapi.com/dropbox-api/docs/auth-types#team-authentication)

Reference: https://docs.dropboxapi.com/dropbox-api/api-reference/business-endpoints/team/team-folder-space-limit-set

## Authentication

- `Authorization` header (bearer token, required) — Team-level OAuth 2.0 token issued to a Dropbox Business admin. Use `Authorization: Bearer <token>`. Obtain via the authorization code flow with team-scoped permissions. Grants access to team-wide administrative operations. You can generate a short-lived access token in the Developer Console; see [Testing with a generated token](https://docs.dropboxapi.com/dropbox-api/docs/oauth#testing-with-a-generated-token).

## Request

### Body (application/json)

This endpoint expects a team.TeamFolderSetSpaceLimitRequest.

- `caps_type` (team.TeamFolderSpaceLimitCapsTypeRequest, required) — The caps type to apply to the specified team folder.
- `notification_target` (team.TeamFolderSpaceLimitNotificationTargetRequest, required) — Who receives usage notifications for the specified team folder.
- `space_limit_bytes` (uint64, required) — The maximum total size, in bytes, of all content in the team folder and its subfolders. When `caps_type` is `TeamFolderSpaceLimitCapsType.soft` or `TeamFolderSpaceLimitCapsType.hard`, this must be at least 2 GB (2147483648 bytes). It must never exceed the team's total storage capacity. When `caps_type` is `TeamFolderSpaceLimitCapsType.off`, the value is stored but has no effect, and it may be 0.
- `team_folder_id` (string, required) — The ID of the team folder.

## Response

### 200

Successful response (no content)

## Errors

### 401 Unauthorized Error

Bad or expired token

- `error` (auth_apiv2.AuthError, required) — Errors occurred during authentication.
- `error_summary` (string, required) — A human-readable summary of the error.

### 403 Forbidden Error

The user or team account doesn't have access to the endpoint or feature

- `error` (auth_apiv2.AccessError, required) — Error occurred because the account doesn't have permission to access the resource.
- `error_summary` (string, required) — A human-readable summary of the error.

### 409 Conflict Error

Endpoint-specific error

- `error` (team.TeamFolderSetSpaceLimitError, required) — Errors for [team_folder/space_limit/set](https://docs.dropboxapi.com/dropbox-api/api-reference/business-endpoints/team/team-folder-space-limit-set).
- `error_summary` (string, required) — A human-readable summary of the error.
- `user_message` (2TeamTeamFolderSpaceLimitSetPostResponsesContentApplicationJsonSchemaUserMessage, optional)

### 429 Too Many Requests Error

The app is making too many requests for the given user or team and is being rate limited. The app should wait for the number of seconds specified in the "Retry-After" response header before trying again.

- `error` (auth_apiv2.RateLimitError, required) — Error occurred because the app is being rate limited.
- `error_summary` (string, required) — A human-readable summary of the error.

### 500 Internal Server Error

Internal server error. An error occurred on the Dropbox servers. Check https://status.dropbox.com/ for announcements about Dropbox service issues.

- `any`

## Types

### team.TeamFolderSpaceLimitCapsTypeRequest

How a team folder's space limit is enforced.

- team.TeamFolderSpaceLimitCapsType.off: team.TeamFolderSpaceLimitCapsType.off
- team.TeamFolderSpaceLimitCapsType.soft: team.TeamFolderSpaceLimitCapsType.soft
- team.TeamFolderSpaceLimitCapsType.hard: team.TeamFolderSpaceLimitCapsType.hard

### team.TeamFolderSpaceLimitNotificationTargetRequest

Who receives email notifications when a team folder's usage reaches 80% of its space limit, and when usage reaches or exceeds the limit. These notifications are sent asynchronously, so they can arrive some time after usage crosses a threshold. They are only sent when the caps type is `TeamFolderSpaceLimitCapsType.soft` or `TeamFolderSpaceLimitCapsType.hard`. Regardless of this setting, team admins and all members with edit access to the team folder are notified when a space limit is added, changed, or removed.

- team.TeamFolderSpaceLimitNotificationTarget.admins: team.TeamFolderSpaceLimitNotificationTarget.admins
- team.TeamFolderSpaceLimitNotificationTarget.editors: team.TeamFolderSpaceLimitNotificationTarget.editors
- team.TeamFolderSpaceLimitNotificationTarget.both: team.TeamFolderSpaceLimitNotificationTarget.both
- team.TeamFolderSpaceLimitNotificationTarget.silent: team.TeamFolderSpaceLimitNotificationTarget.silent

### auth_apiv2.AuthError

Errors occurred during authentication.

- auth_apiv2.AuthError.invalid_access_token: auth_apiv2.AuthError.invalid_access_token
- auth_apiv2.AuthError.invalid_select_user: auth_apiv2.AuthError.invalid_select_user
- auth_apiv2.AuthError.invalid_select_admin: auth_apiv2.AuthError.invalid_select_admin
- auth_apiv2.AuthError.user_suspended: auth_apiv2.AuthError.user_suspended
- auth_apiv2.AuthError.expired_access_token: auth_apiv2.AuthError.expired_access_token
- auth_apiv2.AuthError.missing_scope: auth_apiv2.AuthError.missing_scope
- auth_apiv2.AuthError.route_access_denied: auth_apiv2.AuthError.route_access_denied
- Other: auth_apiv2.AuthError.other

### auth_apiv2.AccessError

Error occurred because the account doesn't have permission to access the resource.

- auth_apiv2.AccessError.invalid_account_type: auth_apiv2.AccessError.invalid_account_type
- auth_apiv2.AccessError.paper_access_denied: auth_apiv2.AccessError.paper_access_denied
- auth_apiv2.AccessError.team_access_denied: auth_apiv2.AccessError.team_access_denied
- auth_apiv2.AccessError.no_permission: auth_apiv2.AccessError.no_permission
- Other: auth_apiv2.AccessError.other

### team.TeamFolderSetSpaceLimitError

Errors for [team_folder/space_limit/set](https://docs.dropboxapi.com/dropbox-api/api-reference/business-endpoints/team/team-folder-space-limit-set).

- team.TeamFolderSetSpaceLimitError.access_error: team.TeamFolderSetSpaceLimitError.access_error
- team.TeamFolderSetSpaceLimitError.status_error: team.TeamFolderSetSpaceLimitError.status_error
- team.TeamFolderSetSpaceLimitError.team_shared_dropbox_error: team.TeamFolderSetSpaceLimitError.team_shared_dropbox_error
- team.TeamFolderSetSpaceLimitError.limit_below_minimum: team.TeamFolderSetSpaceLimitError.limit_below_minimum
- team.TeamFolderSetSpaceLimitError.limit_exceeds_team_quota: team.TeamFolderSetSpaceLimitError.limit_exceeds_team_quota
- Other: team.TeamFolderSetSpaceLimitError.other

### 2TeamTeamFolderSpaceLimitSetPostResponsesContentApplicationJsonSchemaUserMessage

- `locale` (string, optional)
- `text` (string, optional)

### auth_apiv2.RateLimitError

Error occurred because the app is being rate limited.

- `reason` (auth_apiv2.RateLimitReason, required) — The reason why the app is being rate limited.
- `retry_after` (uint64, optional, default: 1) — The number of seconds that the app should wait before making another request.

### team.TeamFolderSpaceLimitCapsType.off

No space limit is enforced and no usage notifications are sent. Any stored space limit value is ignored.

- `.tag` (enum, required)
  - Allowed values: `off`

### team.TeamFolderSpaceLimitCapsType.soft

The space limit is advisory. Members can keep adding content after the team folder reaches the limit, but usage notifications are sent as described in `TeamFolderSpaceLimitNotificationTarget`.

- `.tag` (enum, required)
  - Allowed values: `soft`

### team.TeamFolderSpaceLimitCapsType.hard

The space limit is enforced. Once the total size of the team folder, including all of its subfolders, reaches the limit, uploads and other writes that add content to the team folder fail until space is freed or the limit is raised. Usage notifications are sent as for `soft`.

- `.tag` (enum, required)
  - Allowed values: `hard`

### team.TeamFolderSpaceLimitNotificationTarget.admins

Team admins who can manage team folders.

- `.tag` (enum, required)
  - Allowed values: `admins`

### team.TeamFolderSpaceLimitNotificationTarget.editors

Members with edit access to the team folder, excluding team admins.

- `.tag` (enum, required)
  - Allowed values: `editors`

### team.TeamFolderSpaceLimitNotificationTarget.both

Both team admins who can manage team folders and members with edit access to the team folder.

- `.tag` (enum, required)
  - Allowed values: `both`

### team.TeamFolderSpaceLimitNotificationTarget.silent

No usage notifications are sent.

- `.tag` (enum, required)
  - Allowed values: `silent`

### auth_apiv2.AuthError.invalid_access_token

The access token is invalid. This can happen if the access token has been revoked by Dropbox or the user. To fix this, you should re-authenticate the user. Note: Access tokens that are not returned exactly as provisioned will return this error. Be sure not to truncate or otherwise malform access tokens provided by Dropbox.

- `.tag` (enum, required)
  - Allowed values: `invalid_access_token`

### auth_apiv2.AuthError.invalid_select_user

The user specified in 'Dropbox-API-Select-User' is no longer on the team.

- `.tag` (enum, required)
  - Allowed values: `invalid_select_user`

### auth_apiv2.AuthError.invalid_select_admin

The user specified in 'Dropbox-API-Select-Admin' is not a Dropbox Business team admin.

- `.tag` (enum, required)
  - Allowed values: `invalid_select_admin`

### auth_apiv2.AuthError.user_suspended

The user has been suspended.

- `.tag` (enum, required)
  - Allowed values: `user_suspended`

### auth_apiv2.AuthError.expired_access_token

The access token has expired.

- `.tag` (enum, required)
  - Allowed values: `expired_access_token`

### auth_apiv2.AuthError.missing_scope

The access token does not have the required scope to access the route.

- `.tag` (enum, required)
  - Allowed values: `missing_scope`
- `required_scope` (string, required) — The required scope to access the route.

### auth_apiv2.AuthError.route_access_denied

The route is not available to public.

- `.tag` (enum, required)
  - Allowed values: `route_access_denied`

### auth_apiv2.AuthError.other

An open-union catch-all: a variant added to this union after your API client's spec was generated. Its ".tag" is a value not listed among the known variants above; treat it as an unrecognized/forward-compatible case.

- `.tag` (string, optional)

### auth_apiv2.AccessError.invalid_account_type

Current account type cannot access the resource.

- `.tag` (enum, required)
  - Allowed values: `invalid_account_type`
- `invalid_account_type` (auth_apiv2.InvalidAccountTypeError, required)

### auth_apiv2.AccessError.paper_access_denied

Current account cannot access Paper.

- `.tag` (enum, required)
  - Allowed values: `paper_access_denied`
- `paper_access_denied` (auth_apiv2.PaperAccessError, required)

### auth_apiv2.AccessError.team_access_denied

Team doesn't have permission to access.

- `.tag` (enum, required)
  - Allowed values: `team_access_denied`

### auth_apiv2.AccessError.no_permission

Caller does not have permission to access the resource.

- `.tag` (enum, required)
  - Allowed values: `no_permission`
- `no_permission` (auth_apiv2.NoPermissionError, required)

### auth_apiv2.AccessError.other

An open-union catch-all: a variant added to this union after your API client's spec was generated. Its ".tag" is a value not listed among the known variants above; treat it as an unrecognized/forward-compatible case.

- `.tag` (string, optional)

### team.TeamFolderSetSpaceLimitError.access_error

- `.tag` (enum, required)
  - Allowed values: `access_error`
- `access_error` (team.TeamFolderAccessError, required)

### team.TeamFolderSetSpaceLimitError.status_error

- `.tag` (enum, required)
  - Allowed values: `status_error`
- `status_error` (team.TeamFolderInvalidStatusError, required)

### team.TeamFolderSetSpaceLimitError.team_shared_dropbox_error

- `.tag` (enum, required)
  - Allowed values: `team_shared_dropbox_error`
- `team_shared_dropbox_error` (team.TeamFolderTeamSharedDropboxError, required)

### team.TeamFolderSetSpaceLimitError.limit_below_minimum

`TeamFolderSetSpaceLimitArg.space_limit_bytes` is below the 2 GB minimum. Only returned when `TeamFolderSetSpaceLimitArg.caps_type` is `TeamFolderSpaceLimitCapsType.soft` or `TeamFolderSpaceLimitCapsType.hard`.

- `.tag` (enum, required)
  - Allowed values: `limit_below_minimum`

### team.TeamFolderSetSpaceLimitError.limit_exceeds_team_quota

`TeamFolderSetSpaceLimitArg.space_limit_bytes` exceeds the team's total storage capacity.

- `.tag` (enum, required)
  - Allowed values: `limit_exceeds_team_quota`

### team.TeamFolderSetSpaceLimitError.other

An open-union catch-all: a variant added to this union after your API client's spec was generated. Its ".tag" is a value not listed among the known variants above; treat it as an unrecognized/forward-compatible case.

- `.tag` (string, optional)

### auth_apiv2.RateLimitReason

- auth_apiv2.RateLimitReason.too_many_requests: auth_apiv2.RateLimitReason.too_many_requests
- auth_apiv2.RateLimitReason.too_many_write_operations: auth_apiv2.RateLimitReason.too_many_write_operations
- Other: auth_apiv2.RateLimitReason.other

### auth_apiv2.InvalidAccountTypeError

- auth_apiv2.InvalidAccountTypeError.endpoint: auth_apiv2.InvalidAccountTypeError.endpoint
- auth_apiv2.InvalidAccountTypeError.feature: auth_apiv2.InvalidAccountTypeError.feature
- Other: auth_apiv2.InvalidAccountTypeError.other

### auth_apiv2.PaperAccessError

- auth_apiv2.PaperAccessError.paper_disabled: auth_apiv2.PaperAccessError.paper_disabled
- auth_apiv2.PaperAccessError.not_paper_user: auth_apiv2.PaperAccessError.not_paper_user
- Other: auth_apiv2.PaperAccessError.other

### auth_apiv2.NoPermissionError

- auth_apiv2.NoPermissionError.unauthorized_account_id_usage: auth_apiv2.NoPermissionError.unauthorized_account_id_usage
- Other: auth_apiv2.NoPermissionError.other

### team.TeamFolderAccessError

- team.TeamFolderAccessError.invalid_team_folder_id: team.TeamFolderAccessError.invalid_team_folder_id
- team.TeamFolderAccessError.no_access: team.TeamFolderAccessError.no_access
- Other: team.TeamFolderAccessError.other

### team.TeamFolderInvalidStatusError

- team.TeamFolderInvalidStatusError.active: team.TeamFolderInvalidStatusError.active
- team.TeamFolderInvalidStatusError.archived: team.TeamFolderInvalidStatusError.archived
- team.TeamFolderInvalidStatusError.archive_in_progress: team.TeamFolderInvalidStatusError.archive_in_progress
- Other: team.TeamFolderInvalidStatusError.other

### team.TeamFolderTeamSharedDropboxError

- team.TeamFolderTeamSharedDropboxError.disallowed: team.TeamFolderTeamSharedDropboxError.disallowed
- Other: team.TeamFolderTeamSharedDropboxError.other

### auth_apiv2.RateLimitReason.too_many_requests

You are making too many requests in the past few minutes.

- `.tag` (enum, required)
  - Allowed values: `too_many_requests`

### auth_apiv2.RateLimitReason.too_many_write_operations

There are currently too many write operations happening in the user's Dropbox.

- `.tag` (enum, required)
  - Allowed values: `too_many_write_operations`

### auth_apiv2.RateLimitReason.other

An open-union catch-all: a variant added to this union after your API client's spec was generated. Its ".tag" is a value not listed among the known variants above; treat it as an unrecognized/forward-compatible case.

- `.tag` (string, optional)

### auth_apiv2.InvalidAccountTypeError.endpoint

Current account type doesn't have permission to access this endpoint.

- `.tag` (enum, required)
  - Allowed values: `endpoint`

### auth_apiv2.InvalidAccountTypeError.feature

Current account type doesn't have permission to access this feature.

- `.tag` (enum, required)
  - Allowed values: `feature`

### auth_apiv2.InvalidAccountTypeError.other

An open-union catch-all: a variant added to this union after your API client's spec was generated. Its ".tag" is a value not listed among the known variants above; treat it as an unrecognized/forward-compatible case.

- `.tag` (string, optional)

### auth_apiv2.PaperAccessError.paper_disabled

Paper is disabled.

- `.tag` (enum, required)
  - Allowed values: `paper_disabled`

### auth_apiv2.PaperAccessError.not_paper_user

The provided user has not used Paper yet.

- `.tag` (enum, required)
  - Allowed values: `not_paper_user`

### auth_apiv2.PaperAccessError.other

An open-union catch-all: a variant added to this union after your API client's spec was generated. Its ".tag" is a value not listed among the known variants above; treat it as an unrecognized/forward-compatible case.

- `.tag` (string, optional)

### auth_apiv2.NoPermissionError.unauthorized_account_id_usage

Current caller does not have permission to access the account information for one or more of the specified account IDs.

- `.tag` (enum, required)
  - Allowed values: `unauthorized_account_id_usage`
- `unauthorized_account_ids` (list of string, required) — The account IDs that the caller does not have permission to use.

### auth_apiv2.NoPermissionError.other

An open-union catch-all: a variant added to this union after your API client's spec was generated. Its ".tag" is a value not listed among the known variants above; treat it as an unrecognized/forward-compatible case.

- `.tag` (string, optional)

### team.TeamFolderAccessError.invalid_team_folder_id

The team folder ID is invalid.

- `.tag` (enum, required)
  - Allowed values: `invalid_team_folder_id`

### team.TeamFolderAccessError.no_access

The authenticated app does not have permission to manage that team folder.

- `.tag` (enum, required)
  - Allowed values: `no_access`

### team.TeamFolderAccessError.other

An open-union catch-all: a variant added to this union after your API client's spec was generated. Its ".tag" is a value not listed among the known variants above; treat it as an unrecognized/forward-compatible case.

- `.tag` (string, optional)

### team.TeamFolderInvalidStatusError.active

The folder is active and the operation did not succeed.

- `.tag` (enum, required)
  - Allowed values: `active`

### team.TeamFolderInvalidStatusError.archived

The folder is archived and the operation did not succeed.

- `.tag` (enum, required)
  - Allowed values: `archived`

### team.TeamFolderInvalidStatusError.archive_in_progress

The folder is being archived and the operation did not succeed.

- `.tag` (enum, required)
  - Allowed values: `archive_in_progress`

### team.TeamFolderInvalidStatusError.other

An open-union catch-all: a variant added to this union after your API client's spec was generated. Its ".tag" is a value not listed among the known variants above; treat it as an unrecognized/forward-compatible case.

- `.tag` (string, optional)

### team.TeamFolderTeamSharedDropboxError.disallowed

This action is not allowed for a shared team root.

- `.tag` (enum, required)
  - Allowed values: `disallowed`

### team.TeamFolderTeamSharedDropboxError.other

An open-union catch-all: a variant added to this union after your API client's spec was generated. Its ".tag" is a value not listed among the known variants above; treat it as an unrecognized/forward-compatible case.

- `.tag` (string, optional)

## Examples

**Request**

```json
{
  "caps_type": {
    ".tag": "soft"
  },
  "notification_target": {
    ".tag": "admins"
  },
  "space_limit_bytes": 10737418240,
  "team_folder_id": "123456789"
}
```

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://api.dropboxapi.com/2/team/team_folder/space_limit/set"

payload = {
    "caps_type": { ".tag": "soft" },
    "notification_target": { ".tag": "admins" },
    "space_limit_bytes": 10737418240,
    "team_folder_id": "123456789"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.dropboxapi.com/2/team/team_folder/space_limit/set';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"caps_type":{".tag":"soft"},"notification_target":{".tag":"admins"},"space_limit_bytes":10737418240,"team_folder_id":"123456789"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.dropboxapi.com/2/team/team_folder/space_limit/set"

	payload := strings.NewReader("{\n  \"caps_type\": {\n    \".tag\": \"soft\"\n  },\n  \"notification_target\": {\n    \".tag\": \"admins\"\n  },\n  \"space_limit_bytes\": 10737418240,\n  \"team_folder_id\": \"123456789\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.dropboxapi.com/2/team/team_folder/space_limit/set")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"caps_type\": {\n    \".tag\": \"soft\"\n  },\n  \"notification_target\": {\n    \".tag\": \"admins\"\n  },\n  \"space_limit_bytes\": 10737418240,\n  \"team_folder_id\": \"123456789\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.dropboxapi.com/2/team/team_folder/space_limit/set")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"caps_type\": {\n    \".tag\": \"soft\"\n  },\n  \"notification_target\": {\n    \".tag\": \"admins\"\n  },\n  \"space_limit_bytes\": 10737418240,\n  \"team_folder_id\": \"123456789\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.dropboxapi.com/2/team/team_folder/space_limit/set', [
  'body' => '{
  "caps_type": {
    ".tag": "soft"
  },
  "notification_target": {
    ".tag": "admins"
  },
  "space_limit_bytes": 10737418240,
  "team_folder_id": "123456789"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.dropboxapi.com/2/team/team_folder/space_limit/set");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"caps_type\": {\n    \".tag\": \"soft\"\n  },\n  \"notification_target\": {\n    \".tag\": \"admins\"\n  },\n  \"space_limit_bytes\": 10737418240,\n  \"team_folder_id\": \"123456789\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "caps_type": [".tag": "soft"],
  "notification_target": [".tag": "admins"],
  "space_limit_bytes": 10737418240,
  "team_folder_id": "123456789"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.dropboxapi.com/2/team/team_folder/space_limit/set")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```