> This page is for Developers.

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

# Assign a ratezone inclusive volume to an organization

PUT https://cdn.emnify.net/api/v1/organisation/{org_id_or_my}/inclusive_volume/{inclusive_volume_id}
Content-Type: application/json

Required permissions Beta [Learn more](/developers/api-guidelines/permissions#how-permissions-work)`Organisation.InclusiveVolume` + `Add`Roles: Administrator UserAssigns a pre-configured ratezone inclusive volume to the specified organization.This can be done in self-service as well as for direct child organizations.
Only postpaid customers can assign
inclusive volumes in self-service, while parent organizations can assign inclusive volumes for both postpaid and prepaid child organizations.
The inclusive volume is charged and calculated against traffic charges accordingly in every bill
that is refreshed from that point on.
Inclusive volume is counted per device on a monthly basis, the data can be pooled as well or be treated per individual device.Only inclusive volumes of ratezones belonging to the tariffs assigned to the selected organization can be chosen.Enterprise organizations are only allowed to upgrade to a higher inclusive volume if there is already one active in the current month.The request body is optional. All fields have default values and detailed constraints are specified in the schema below.

Reference: https://docs.emnify.com/developers/api/organization/assign-ratezone-inclusive-volume

## Authentication

- `Authorization` header (bearer token, required) — An `auth_token` should be provided to authenticate a session. To obtain an `auth_token`, see the [`/api/v1/authenticate` **POST** request](/developers/api/authentication/authenticate).

## Request

### Path parameters

- `org_id_or_my` (string, required, default: my) — Numerical ID of an Organization or the string `my` to use the currently authorized organisation
- `inclusive_volume_id` (double, required) — Numerical ID of a ratezone inclusive volume. Can be retrieved using `GET /api/v1/tariff/{tariff_id}/ratezone/{ratezone_id}/inclusive_volume`.

### Body (application/json)

This endpoint expects an object.

- `start_date` (string, optional) — The first day of the month when this inclusive volume assignment becomes active. Defaults to the first day of the current month. Times are normalized to midnight UTC (times in input are stripped). Must be the current month or a future month.
- `end_date` (string, optional, nullable) — The last day of the month when this inclusive volume assignment expires. Defaults to `null` (indefinite duration). When specified, must be the last day of a calendar month. Times are normalized to 23:59:59 UTC (times in input are stripped). Must be on or after the `start_date`.
- `pooled` (boolean, optional, default: true) — Whether the inclusive volume is shared across all devices or tracked individually. - `true` (default): Data consumption is pooled. All devices share the monthly volume limit. - `false`: Each device receives its own quota proportional to the total volume.

## Response

### 201

Created

- `id` (integer, optional)
- `start_date` (string, optional)
- `end_date` (string, optional)
- `pooled` (boolean, optional)

## Errors

### 400 Bad Request Error

The request is malformed, e.g. the body cannot be parsed

- `any`

### 403 Forbidden Error

Your role doesn't include the permission this endpoint requires. Most endpoints return `error_code`, `error_token`, and `message`. Some return only `status_code` and `message`.

- `error_code` (integer, optional)
- `error_token` (string, optional)
- `status_code` (integer, optional)
- `message` (string, optional)

### 404 Not Found Error

Organisation is not accessible or not valid in this context

- `any`

## Examples

### Default Assignment

**Request**

```json
{}
```

**Response**

```json
{
  "id": 27,
  "start_date": "2024-02-01T00:00:00.000Z",
  "end_date": null,
  "pooled": true
}
```

**SDK Code**

```python Default Assignment
import requests

url = "https://cdn.emnify.net/api/v1/organisation/1234/inclusive_volume/5678"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Default Assignment
const url = 'https://cdn.emnify.net/api/v1/organisation/1234/inclusive_volume/5678';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

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

```go Default Assignment
package main

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

func main() {

	url := "https://cdn.emnify.net/api/v1/organisation/1234/inclusive_volume/5678"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PUT", 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 Default Assignment
require 'uri'
require 'net/http'

url = URI("https://cdn.emnify.net/api/v1/organisation/1234/inclusive_volume/5678")

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

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

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

HttpResponse<String> response = Unirest.put("https://cdn.emnify.net/api/v1/organisation/1234/inclusive_volume/5678")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://cdn.emnify.net/api/v1/organisation/1234/inclusive_volume/5678', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Default Assignment
using RestSharp;

var client = new RestClient("https://cdn.emnify.net/api/v1/organisation/1234/inclusive_volume/5678");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Default Assignment
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://cdn.emnify.net/api/v1/organisation/1234/inclusive_volume/5678")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
```

### Fixed Period with Per-Device Tracking

**Request**

```json
{
  "start_date": "2024-01-01T00:00:00.000Z",
  "end_date": "2024-12-31T00:00:00.000Z",
  "pooled": false
}
```

**Response**

```json
{
  "id": 28,
  "start_date": "2024-01-01T00:00:00.000Z",
  "end_date": "2024-12-31T00:00:00.000Z",
  "pooled": false
}
```

**SDK Code**

```python Fixed Period with Per-Device Tracking
import requests

url = "https://cdn.emnify.net/api/v1/organisation/1234/inclusive_volume/5678"

payload = {
    "start_date": "2024-01-01T00:00:00.000Z",
    "end_date": "2024-12-31T00:00:00.000Z",
    "pooled": False
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Fixed Period with Per-Device Tracking
const url = 'https://cdn.emnify.net/api/v1/organisation/1234/inclusive_volume/5678';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"start_date":"2024-01-01T00:00:00.000Z","end_date":"2024-12-31T00:00:00.000Z","pooled":false}'
};

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

```go Fixed Period with Per-Device Tracking
package main

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

func main() {

	url := "https://cdn.emnify.net/api/v1/organisation/1234/inclusive_volume/5678"

	payload := strings.NewReader("{\n  \"start_date\": \"2024-01-01T00:00:00.000Z\",\n  \"end_date\": \"2024-12-31T00:00:00.000Z\",\n  \"pooled\": false\n}")

	req, _ := http.NewRequest("PUT", 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 Fixed Period with Per-Device Tracking
require 'uri'
require 'net/http'

url = URI("https://cdn.emnify.net/api/v1/organisation/1234/inclusive_volume/5678")

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"start_date\": \"2024-01-01T00:00:00.000Z\",\n  \"end_date\": \"2024-12-31T00:00:00.000Z\",\n  \"pooled\": false\n}"

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

```java Fixed Period with Per-Device Tracking
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://cdn.emnify.net/api/v1/organisation/1234/inclusive_volume/5678")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"start_date\": \"2024-01-01T00:00:00.000Z\",\n  \"end_date\": \"2024-12-31T00:00:00.000Z\",\n  \"pooled\": false\n}")
  .asString();
```

```php Fixed Period with Per-Device Tracking
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://cdn.emnify.net/api/v1/organisation/1234/inclusive_volume/5678', [
  'body' => '{
  "start_date": "2024-01-01T00:00:00.000Z",
  "end_date": "2024-12-31T00:00:00.000Z",
  "pooled": false
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Fixed Period with Per-Device Tracking
using RestSharp;

var client = new RestClient("https://cdn.emnify.net/api/v1/organisation/1234/inclusive_volume/5678");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"start_date\": \"2024-01-01T00:00:00.000Z\",\n  \"end_date\": \"2024-12-31T00:00:00.000Z\",\n  \"pooled\": false\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Fixed Period with Per-Device Tracking
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "start_date": "2024-01-01T00:00:00.000Z",
  "end_date": "2024-12-31T00:00:00.000Z",
  "pooled": false
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://cdn.emnify.net/api/v1/organisation/1234/inclusive_volume/5678")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
```