> This page is for Gateway.

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

# Get a project's DLP settings

GET https://api-gateway.merge.dev/v1/projects/{project_id}/dlp-settings

Returns the project's override keyed by entity type, plus how every entity in the organization's catalog resolves for this project. A project pinned to an API key uses this policy as written. A project named per request (project_id body field or X-Project-Id header) may only tighten the organization policy; anything that loosens it is ignored at request time.

Reference: https://docs.merge.dev/merge-gateway/management-api/projects/get-project-dlp-settings

## Authentication

- `Authorization` header (bearer token, required) — A management key (prefixed `mgmt_`), created on the dashboard's **API keys** page under **Management keys**. Distinct from a regular gateway API key, and never used to call models.

## Request

### Path parameters

- `project_id` (string, required)

## Response

### 200

The project's settings, with the effective policy resolved.

- `override` (map from string to DlpEntityOverride, optional) — What this project sets, keyed by entity type. Keys the project does not set are absent, and unset halves come back null
- `entities` (list of ProjectDlpEntityState, optional) — Every entity in the organization's catalog, with the merge applied

## Errors

### 403 Forbidden Error

The management key lacks the `manage_projects` scope.

- `detail` (string, optional) — Human-readable error message.

### 404 Not Found Error

Project not found, or it belongs to another organization.

- `detail` (string, optional) — Human-readable error message.

## Types

### DlpEntityOverride

A project's override for one entity type. Both fields are optional; omit one to inherit that half from the organization's rule.

- `enabled` (boolean, optional, nullable) — Whether this entity is scanned for this project
- `action` (enum, optional, nullable) — What to do on a match
  - Allowed values: `log`, `redact`, `block`

### ProjectDlpEntityState

How one entity type resolves for a project.

- `entity_type` (string, optional)
- `display_name` (string, optional, nullable)
- `category` (string, optional)
- `is_seeded` (boolean, optional) — Whether this entity comes from the seeded rule set
- `org_action` (string, optional, nullable) — What the organization does with it. Null means not scanned
- `effective_action` (string, optional, nullable) — What this project does with it after its override. Null means not scanned
- `overridden` (boolean, optional) — Whether the project overrides this entity

## Examples

**Response**

```json
{
  "override": {},
  "entities": [
    {
      "entity_type": "string",
      "display_name": "string",
      "category": "string",
      "is_seeded": true,
      "org_action": "string",
      "effective_action": "string",
      "overridden": true
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api-gateway.merge.dev/v1/projects/project_id/dlp-settings"

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

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

print(response.json())
```

```javascript
const url = 'https://api-gateway.merge.dev/v1/projects/project_id/dlp-settings';
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
package main

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

func main() {

	url := "https://api-gateway.merge.dev/v1/projects/project_id/dlp-settings"

	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
require 'uri'
require 'net/http'

url = URI("https://api-gateway.merge.dev/v1/projects/project_id/dlp-settings")

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
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api-gateway.merge.dev/v1/projects/project_id/dlp-settings")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-gateway.merge.dev/v1/projects/project_id/dlp-settings', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api-gateway.merge.dev/v1/projects/project_id/dlp-settings");
var request = new RestRequest(Method.GET);
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://api-gateway.merge.dev/v1/projects/project_id/dlp-settings")! 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()
```