---
title: Get NEL setting
---

[Skip to content](#%5Ftop) 

[API Reference](https://developers.cloudflare.com/api/go)

[Zones](https://developers.cloudflare.com/api/go/resources/zones)

[NEL](https://developers.cloudflare.com/api/go/resources/zones/subresources/nel)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Get NEL setting

client.Zones.NEL.Get(ctx, query) (\*[Setting](https://developers.cloudflare.com/api/go/resources/zones#%28resource%29%20zones.nel%20%3E%20%28model%29%20setting%20%3E%20%28schema%29), error)

GET/zones/{zone\_id}/settings/nel

Fetches the Network Error Logging (NEL) setting for a zone. NEL allows browsers to report network errors to a configured endpoint. The setting is enabled by default for free and pro zones, and disabled by default for business and enterprise zones unless the NEL product feature is enabled.

##### Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/).

**Example:**`Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY`

API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**`X-Auth-Email: user@example.com`

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**`X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194`

##### Accepted Permissions (at least one required)

`Zone Settings Read`

##### ParametersExpand Collapse 

query NELGetParams

ZoneID param.Field\[string\]

Identifier of the zone.

maxLength32

##### ReturnsExpand Collapse 

type Setting struct{…}

A zone-scoped NEL configuration setting.

ID SettingID

Zone setting identifier.

Editable bool

Whether the setting is editable. This is false when the zone’s plan does not include NEL or the NEL product feature is not enabled.

ModifiedOn Time

When the setting was last modified. A zero value (0001-01-01T00:00:00Z) indicates the setting has never been explicitly set and is using the default value.

formatdate-time

Value SettingValue

The NEL configuration value.

Enabled bool

Whether Network Error Logging is enabled for the zone. When enabled, browsers report network errors to Cloudflare’s NEL endpoint.

### Get NEL setting

Go

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/zones"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  setting, err := client.Zones.NEL.Get(context.TODO(), zones.NELGetParams{
    ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", setting.ID)
}

```

200 example

200 example

401 example

403 example

500 example

```
{
  "errors": [],
  "messages": [],
  "result": {
    "editable": false,
    "id": "nel",
    "modified_on": "0001-01-01T00:00:00Z",
    "value": {
      "enabled": false
    }
  },
  "success": true
}
```

```
{
  "errors": [],
  "messages": [],
  "result": {
    "editable": true,
    "id": "nel",
    "modified_on": "2024-01-15T10:30:00Z",
    "value": {
      "enabled": true
    }
  },
  "success": true
}
```

```
{
  "errors": [
    {
      "code": 1009,
      "message": "auth.not_authorized"
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
```

```
{
  "errors": [
    {
      "code": 1010,
      "message": "auth.forbidden"
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
```

```
{
  "errors": [
    {
      "code": 1000,
      "message": "internal_error"
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
```

##### Returns Examples

200 example

200 example

401 example

403 example

500 example

```
{
  "errors": [],
  "messages": [],
  "result": {
    "editable": false,
    "id": "nel",
    "modified_on": "0001-01-01T00:00:00Z",
    "value": {
      "enabled": false
    }
  },
  "success": true
}
```

```
{
  "errors": [],
  "messages": [],
  "result": {
    "editable": true,
    "id": "nel",
    "modified_on": "2024-01-15T10:30:00Z",
    "value": {
      "enabled": true
    }
  },
  "success": true
}
```

```
{
  "errors": [
    {
      "code": 1009,
      "message": "auth.not_authorized"
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
```

```
{
  "errors": [
    {
      "code": 1010,
      "message": "auth.forbidden"
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
```

```
{
  "errors": [
    {
      "code": 1000,
      "message": "internal_error"
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
```