---
title: Create or update an indicator triage state
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Security Monitoring
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Create or update an indicator triage state{% #create-or-update-an-indicator-triage-state %}
Copy pageCopied
{% tab title="v2" %}
**Note**: This endpoint is in beta and may be subject to changes. Please check the documentation regularly for updates.
| Datadog site      | API endpoint                                                                |
| ----------------- | --------------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/security/siem/ioc-explorer/triage |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/security/siem/ioc-explorer/triage |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/security/siem/ioc-explorer/triage      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/security/siem/ioc-explorer/triage      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/security/siem/ioc-explorer/triage  |
| uk1.datadoghq.com | POST https://api.uk1.datadoghq.com/api/v2/security/siem/ioc-explorer/triage |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/security/siem/ioc-explorer/triage     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/security/siem/ioc-explorer/triage |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/security/siem/ioc-explorer/triage |

### Overview

Set the triage state of an indicator of compromise (IoC). This creates or updates the triage state for the indicator in your organization.

OAuth apps require the `security_monitoring_signals_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#security-monitoring) to access this endpoint.



### Request

#### Body Data (required)

The triage state to set for the indicator.

{% tab title="Model" %}

| Parent field | Field                          | Type   | Description                                                                         |
| ------------ | ------------------------------ | ------ | ----------------------------------------------------------------------------------- |
|              | data [*required*]         | object | Data object for the triage write request.                                           |
| data         | attributes [*required*]   | object | Attributes for setting an indicator's triage state.                                 |
| attributes   | indicator [*required*]    | string | The indicator value to triage (for example, an IP address or domain).               |
| attributes   | triage_state [*required*] | enum   | Current triage state of the indicator. Allowed enum values: `not_reviewed,reviewed` |
| data         | type [*required*]         | string | Triage state resource type.                                                         |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "indicator": "192.0.2.1",
      "triage_state": "reviewed"
    },
    "type": "ioc_triage_state"
  }
}
```

{% /tab %}

### Response

{% tab title="201" %}
Created
{% tab title="Model" %}
Response for the create indicator triage state endpoint.

| Parent field | Field        | Type      | Description                                                                         |
| ------------ | ------------ | --------- | ----------------------------------------------------------------------------------- |
|              | data         | object    | Data object of the triage write response.                                           |
| data         | attributes   | object    | Attributes of a created or updated triage state.                                    |
| attributes   | created_at   | date-time | Timestamp when the triage record was created.                                       |
| attributes   | indicator    | string    | The indicator value that was triaged.                                               |
| attributes   | triage_state | enum      | Current triage state of the indicator. Allowed enum values: `not_reviewed,reviewed` |
| attributes   | triaged_at   | date-time | Timestamp when the triage state was set.                                            |
| attributes   | triaged_by   | string    | UUID of the user who set the triage state.                                          |
| data         | id           | string    | Unique identifier for the triage state record.                                      |
| data         | type         | string    | Triage state resource type.                                                         |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "created_at": "2019-09-19T10:00:00.000Z",
      "indicator": "string",
      "triage_state": "not_reviewed",
      "triaged_at": "2019-09-19T10:00:00.000Z",
      "triaged_by": "string"
    },
    "id": "string",
    "type": "string"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Not Authorized
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                          \## default
# 
 \# Curl command curl -X POST "https://api.datadoghq.com/api/v2/security/siem/ioc-explorer/triage" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "indicator": "192.0.2.1",
      "triage_state": "reviewed"
    },
    "type": "ioc_triage_state"
  }
}
EOF 
                        
##### 

```go
// Create or update an indicator triage state returns "Created" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	body := datadogV2.IoCTriageWriteRequest{
		Data: datadogV2.IoCTriageWriteRequestData{
			Attributes: datadogV2.IoCTriageWriteRequestAttributes{
				Indicator:   "192.0.2.1",
				TriageState: datadogV2.IOCTRIAGESTATE_REVIEWED,
			},
			Type: "ioc_triage_state",
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	configuration.SetUnstableOperationEnabled("v2.CreateIoCTriageState", true)
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewSecurityMonitoringApi(apiClient)
	resp, r, err := api.CreateIoCTriageState(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SecurityMonitoringApi.CreateIoCTriageState`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SecurityMonitoringApi.CreateIoCTriageState`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Create or update an indicator triage state returns "Created" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.SecurityMonitoringApi;
import com.datadog.api.client.v2.model.IoCTriageState;
import com.datadog.api.client.v2.model.IoCTriageWriteRequest;
import com.datadog.api.client.v2.model.IoCTriageWriteRequestAttributes;
import com.datadog.api.client.v2.model.IoCTriageWriteRequestData;
import com.datadog.api.client.v2.model.IoCTriageWriteResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    defaultClient.setUnstableOperationEnabled("v2.createIoCTriageState", true);
    SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);

    IoCTriageWriteRequest body =
        new IoCTriageWriteRequest()
            .data(
                new IoCTriageWriteRequestData()
                    .attributes(
                        new IoCTriageWriteRequestAttributes()
                            .indicator("192.0.2.1")
                            .triageState(IoCTriageState.REVIEWED))
                    .type("ioc_triage_state"));

    try {
      IoCTriageWriteResponse result = apiInstance.createIoCTriageState(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SecurityMonitoringApi#createIoCTriageState");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```python
"""
Create or update an indicator triage state returns "Created" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.security_monitoring_api import SecurityMonitoringApi
from datadog_api_client.v2.model.io_c_triage_state import IoCTriageState
from datadog_api_client.v2.model.io_c_triage_write_request import IoCTriageWriteRequest
from datadog_api_client.v2.model.io_c_triage_write_request_attributes import IoCTriageWriteRequestAttributes
from datadog_api_client.v2.model.io_c_triage_write_request_data import IoCTriageWriteRequestData

body = IoCTriageWriteRequest(
    data=IoCTriageWriteRequestData(
        attributes=IoCTriageWriteRequestAttributes(
            indicator="192.0.2.1",
            triage_state=IoCTriageState.REVIEWED,
        ),
        type="ioc_triage_state",
    ),
)

configuration = Configuration()
configuration.unstable_operations["create_io_c_triage_state"] = True
with ApiClient(configuration) as api_client:
    api_instance = SecurityMonitoringApi(api_client)
    response = api_instance.create_io_c_triage_state(body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Create or update an indicator triage state returns "Created" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
  config.unstable_operations["v2.create_io_c_triage_state".to_sym] = true
end
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new

body = DatadogAPIClient::V2::IoCTriageWriteRequest.new({
  data: DatadogAPIClient::V2::IoCTriageWriteRequestData.new({
    attributes: DatadogAPIClient::V2::IoCTriageWriteRequestAttributes.new({
      indicator: "192.0.2.1",
      triage_state: DatadogAPIClient::V2::IoCTriageState::REVIEWED,
    }),
    type: "ioc_triage_state",
  }),
})
p api_instance.create_io_c_triage_state(body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```rust
// Create or update an indicator triage state returns "Created" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAPI;
use datadog_api_client::datadogV2::model::IoCTriageState;
use datadog_api_client::datadogV2::model::IoCTriageWriteRequest;
use datadog_api_client::datadogV2::model::IoCTriageWriteRequestAttributes;
use datadog_api_client::datadogV2::model::IoCTriageWriteRequestData;

#[tokio::main]
async fn main() {
    let body = IoCTriageWriteRequest::new(IoCTriageWriteRequestData::new(
        IoCTriageWriteRequestAttributes::new("192.0.2.1".to_string(), IoCTriageState::REVIEWED),
        "ioc_triage_state".to_string(),
    ));
    let mut configuration = datadog::Configuration::new();
    configuration.set_unstable_operation_enabled("v2.CreateIoCTriageState", true);
    let api = SecurityMonitoringAPI::with_config(configuration);
    let resp = api.create_io_c_triage_state(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Create or update an indicator triage state returns "Created" response
 */

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
configuration.unstableOperations["v2.createIoCTriageState"] = true;
const apiInstance = new v2.SecurityMonitoringApi(configuration);

const params: v2.SecurityMonitoringApiCreateIoCTriageStateRequest = {
  body: {
    data: {
      attributes: {
        indicator: "192.0.2.1",
        triageState: "reviewed",
      },
      type: "ioc_triage_state",
    },
  },
};

apiInstance
  .createIoCTriageState(params)
  .then((data: v2.IoCTriageWriteResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}
