> 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.

# Remove all quotas of assigned endpoints

DELETE https://cdn.emnify.net/api/v1/service_profile/{profile_id}/quota/{quota_type}

Required permissions Beta [Learn more](/developers/api-guidelines/permissions#how-permissions-work)`ServiceProfile.Quota` + `Remove`Roles: Administrator UserRemove all quotas of endpoints which are assigned to this profile. Notice that `apply_data_quota` and/or
`apply_sms_quota` have to be patched to false before, otherwise the endpoints will get blocked
for having no quota left.
This call will also return successfully if no endpoint is assigned or no quotas are set.

Reference: https://docs.emnify.com/developers/api/service-profiles/delete-quota-by-service-profile-id

## 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

- `profile_id` (double, required) — The Numeric ID of a Service Profile
- `quota_type` (enum, required) — The type of service of the quota, can be `data` or `sms`
  - Allowed values: `data`, `sms`

## Response

### 204

Successfully deleted the quota of all (0 or more) assigned endpoints.

## Errors

### 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

Service profile not found or not part of this organisation.

- `any`

## Examples

**SDK Code**

```python
import requests

url = "https://cdn.emnify.net/api/v1/service_profile/1.1/quota/data"

headers = {"Authorization": "Bearer <token>"}

response = requests.delete(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://cdn.emnify.net/api/v1/service_profile/1.1/quota/data';
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};

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"
	"net/http"
	"io"
)

func main() {

	url := "https://cdn.emnify.net/api/v1/service_profile/1.1/quota/data"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	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://cdn.emnify.net/api/v1/service_profile/1.1/quota/data")

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

request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'

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.delete("https://cdn.emnify.net/api/v1/service_profile/1.1/quota/data")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://cdn.emnify.net/api/v1/service_profile/1.1/quota/data', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://cdn.emnify.net/api/v1/service_profile/1.1/quota/data");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://cdn.emnify.net/api/v1/service_profile/1.1/quota/data")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

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()
```