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

# Get Project Entity Risk Changes

GET https://api.sayari.com/v1/projects/{project_id}/entities/{project_entity_id}/changes/risk

Retrieves the risk changes for a single project entity.

Reference: https://documentation.sayari.com/api/api-reference/project-entity/get-project-entity-risk-changes

## Authentication

- OAuth2 — send the obtained token as `Authorization: Bearer <token>`

## Servers

- `https://api.sayari.com` (Production, default)
- `https://api.internal.sayari.com` (Dev)
- `https://api.uk.sayari.com` (Production_UK)

## Request

### Path parameters

- `project_id` (string, required)
- `project_entity_id` (string, required)

### Query parameters

- `limit` (integer, optional) — The maximum number of risk changes to return. Default is 100.
- `next` (string, optional) — Token to retrieve the next page of risk changes
- `prev` (string, optional) — Token to retrieve the previous page of risk changes
- `sort.date` (enum, optional) — Sort by timestamp in ascending or descending order. Default is desc.
  - Allowed values: `asc`, `desc`
- `filter.from` (string, optional) — Filter risk changes from the provided date
- `filter.to` (string, optional) — Filter risk changes up to the provided date
- `filter.risk_factor` (list of string, optional) — Filter risk changes for the provided risk factors
- `filter.risk_category` (list of string, optional) — Filter risk changes for risk factors from the provided risk categories

## Response

### 200

- `filters` (RiskChangeFilters, required)
- `limit` (integer, required)
- `data` (ProjectEntityRiskChangesResponseData, required)
- `next` (string, optional)
- `prev` (string, optional)

## Errors

### 400 Bad Request

- `any`

### 401 Unauthorized

- `any`

### 404 Not Found

- `status` (integer, required)
- `message` (list of string, required)
- `success` (boolean, required)

### 405 Method Not Allowed

- `status` (integer, required)
- `message` (list of string, required)
- `success` (boolean, required)

### 422 Unprocessable Content

- `status` (integer, required)
- `message` (list of string, required)
- `success` (boolean, required)

### 429 Rate Limit Exceeded

- `any`

### 500 Internal Server Error

- `any`

## Types

### RiskChangeFilters

- `from` (string, optional)
- `to` (string, optional)
- `risk_factor` (list of string, optional)
- `risk_category` (list of string, optional)

### ProjectEntityRiskChangesResponseData

- `project_id` (string, required)
- `project_entity_id` (string, required)
- `risk_factors` (list of RiskChangeFactor, required)

### RiskChangeFactor

- `id` (string, required)
- `timestamp` (string, required) — Timestamp of risk change detection
- `change_type` (enum, required)
  - Allowed values: `added`, `removed`

## Examples

**Response**

```json
{
  "filters": {
    "from": "2025-04-20 22:54:00.913586+00",
    "to": "2025-05-20 22:54:00.913586+00"
  },
  "limit": 100,
  "data": {
    "project_id": "YVB88Y",
    "project_entity_id": "52z4Wa",
    "risk_factors": [
      {
        "id": "pep",
        "timestamp": "2025-04-22 22:54:00.913586+00",
        "change_type": "added"
      },
      {
        "id": "regulatory_action",
        "timestamp": "2025-04-22 22:54:00.913586+00",
        "change_type": "removed"
      }
    ]
  },
  "next": "eyJzYXZlZF9yZXNvdXJjZV9pZCI6MSwiZmllbGQiOiJyZWd1bGF0b3J5X2FjdGlvbiIsImRhdGUiOiIyMDIxLTA1LTE5IDAwOjA"
}
```

**SDK Code**

```python
import requests

url = "https://api.sayari.com/v1/projects/YVB88Y/entities/52z4Wa/changes/risk"

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

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

print(response.json())
```

```javascript
const url = 'https://api.sayari.com/v1/projects/YVB88Y/entities/52z4Wa/changes/risk';
const options = {method: 'GET', headers: {Authorization: '<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.sayari.com/v1/projects/YVB88Y/entities/52z4Wa/changes/risk"

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

	req.Header.Add("Authorization", "<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.sayari.com/v1/projects/YVB88Y/entities/52z4Wa/changes/risk")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<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.sayari.com/v1/projects/YVB88Y/entities/52z4Wa/changes/risk")
  .header("Authorization", "<token>.")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.sayari.com/v1/projects/YVB88Y/entities/52z4Wa/changes/risk', [
  'headers' => [
    'Authorization' => '<token>.',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.sayari.com/v1/projects/YVB88Y/entities/52z4Wa/changes/risk");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<token>.");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sayari.com/v1/projects/YVB88Y/entities/52z4Wa/changes/risk")! 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()
```