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

# List DNS firewall profiles

GET https://cdn.emnify.net/api/v1/dns_firewall_profile

**Required permissions** [Learn more](/developers/api-guidelines/permissions#how-permissions-work)

`DnsFirewallProfile` + `List`

*Roles:* Administrator

Returns a list of all DNS firewall profiles within the organization.

Each item includes metadata and counts of attached service profiles and devices.
The profile rule content isn't included in list responses.

Reference: https://docs.emnify.com/developers/api/dns-firewall-profile/dns-firewall-profile-get-all

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

## Response

### 200

DNS firewall profiles successfully listed.

- `list of ApiV1DnsFirewallProfileGetResponsesContentApplicationJsonSchemaItems`

## Errors

### 401 Unauthorized Error

Missing or invalid Authorization header.

- `error_code` (integer, optional)
- `error_token` (string, optional)
- `message` (string, optional)
- `errors` (list of ApiV1DnsFirewallProfileGetResponsesContentApplicationJsonSchemaErrorsItems, optional) — sub error descriptions

### 403 Forbidden Error

User doesn't have permission to list DNS firewall profiles, or the feature isn't enabled for the organization.

- `error_token` (string, required)
- `message` (string, required)
- `error_code` (integer, optional)
- `errors` (list of ApiV1DnsFirewallProfileGetResponsesContentApplicationJsonSchemaErrorsItems, optional) — sub error descriptions

## Types

### ApiV1DnsFirewallProfileGetResponsesContentApplicationJsonSchemaItems

- `id` (integer, optional) — Unique identifier of the DNS firewall profile.
- `name` (string, optional) — Name of the DNS firewall profile.
- `description` (string, optional) — Description of the DNS firewall profile.
- `created` (string, optional) — Timestamp when the profile was created.
- `last_updated` (string, optional) — Timestamp when the profile was last modified.
- `last_uploaded` (string, optional) — Timestamp when the profile rules were last uploaded.
- `attached_service_profile_count` (integer, optional) — Number of service profiles using this DNS firewall profile.
- `attached_device_count` (integer, optional) — Number of devices using this DNS firewall profile.

### ApiV1DnsFirewallProfileGetResponsesContentApplicationJsonSchemaErrorsItems

## Examples

**Response**

```json
[
  {
    "id": 10,
    "name": "corp-dns-policy",
    "description": "Corporate DNS firewall policy",
    "created": "2026-07-07T08:15:00Z",
    "last_updated": "2026-07-07T08:15:00Z",
    "last_uploaded": "2026-07-07T08:15:00Z",
    "attached_service_profile_count": 3,
    "attached_device_count": 42
  }
]
```

**SDK Code**

```python List DNS Firewall Profiles
import requests

url = "https://cdn.emnify.net/api/v1/dns_firewall_profile"

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

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

print(response.json())
```

```javascript List DNS Firewall Profiles
const url = 'https://cdn.emnify.net/api/v1/dns_firewall_profile';
const options = {method: 'GET', 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 List DNS Firewall Profiles
package main

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

func main() {

	url := "https://cdn.emnify.net/api/v1/dns_firewall_profile"

	req, _ := http.NewRequest("GET", 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 List DNS Firewall Profiles
require 'uri'
require 'net/http'

url = URI("https://cdn.emnify.net/api/v1/dns_firewall_profile")

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

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

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

```java List DNS Firewall Profiles
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://cdn.emnify.net/api/v1/dns_firewall_profile")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php List DNS Firewall Profiles
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp List DNS Firewall Profiles
using RestSharp;

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

```swift List DNS Firewall Profiles
import Foundation

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

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