> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a triple's confidence

> Update a triple's confidence. **Required scope:** write

Update a triple's confidence.

**Required scope:** `write`

### Request body

`UpdateTripleRequest`

<ParamField body="clear_valid_time" type="boolean">
  If true, clear the validity interval on this triple.
</ParamField>

<ParamField body="confidence" type="number (float)">
  New confidence score
</ParamField>

<ParamField body="object_id" type="string" required>
  Object entity ID (to identify the triple)
</ParamField>

<ParamField body="predicate" type="string" required>
  Predicate name (to identify the triple)
</ParamField>

<ParamField body="subject_id" type="string" required>
  Subject entity ID (to identify the triple)
</ParamField>

<ParamField body="valid_from" type="string">
  Optional RFC3339 start of validity interval.
</ParamField>

<ParamField body="valid_to" type="string">
  Optional RFC3339 end of validity interval.
</ParamField>

### Response

`TripleResponse`

<ResponseField name="confidence" type="number (float)" required />

<ResponseField name="object" type="string" required />

<ResponseField name="object_name" type="string" required />

<ResponseField name="predicate" type="string" required />

<ResponseField name="subject" type="string" required />

<ResponseField name="subject_name" type="string" required />

<ResponseField name="valid_from" type="string" />

<ResponseField name="valid_to" type="string" />

### Status codes

| Code  | Meaning                                            |
| ----- | -------------------------------------------------- |
| `200` | Triple updated                                     |
| `400` | Invalid request                                    |
| `401` | Unauthorized — missing or invalid credentials      |
| `403` | Forbidden — the key/token lacks the required scope |
| `404` | Triple not found                                   |
| `429` | Rate limited — see Retry-After / X-RateLimit-Reset |

<RequestExample>
  ```bash cURL theme={null}
  curl --request PATCH \
    --url 'https://api.nsr.stateset.com/api/v1/triples' \
    --header 'X-API-Key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "clear_valid_time": true,
    "confidence": 7.5,
    "object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "predicate": "string",
    "subject_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "valid_from": "string",
    "valid_to": "string"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "confidence": 7.5,
    "object": "string",
    "object_name": "string",
    "predicate": "string",
    "subject": "Replacement tent pole set",
    "subject_name": "string",
    "valid_from": "string",
    "valid_to": "string"
  }
  ```
</ResponseExample>
