> ## 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.

# Validate a fact against the type registry

> **Required scope:** write

**Required scope:** `write`

### Request body

`ValidateTypeRequest`

<ParamField body="arg_types" type="string[]" required>
  Argument types to validate
</ParamField>

<ParamField body="predicate" type="string" required>
  Predicate name
</ParamField>

### Response

`ValidateTypeResponse`

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

<ResponseField name="expected_signature" type="object">
  <Expandable title="expected_signature">
    <ResponseField name="arg_types" type="string[]" required />

    <ResponseField name="arity" type="integer" required />

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

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

    <ResponseField name="return_type" type="string" />
  </Expandable>
</ResponseField>

<ResponseField name="valid" type="boolean" required />

### Status codes

| Code  | Meaning                                            |
| ----- | -------------------------------------------------- |
| `200` | Validation result                                  |
| `401` | Unauthorized — missing or invalid credentials      |
| `403` | Forbidden — the key/token lacks the required scope |
| `429` | Rate limited — see Retry-After / X-RateLimit-Reset |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.nsr.stateset.com/api/v1/types/validate' \
    --header 'X-API-Key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "arg_types": [
      "entity",
      "location"
    ],
    "predicate": "lived_in"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "error": "string",
    "expected_signature": {
      "arg_types": [
        "string"
      ],
      "arity": 1,
      "doc": "string",
      "name": "Two-Person Tent",
      "return_type": "string"
    },
    "valid": true
  }
  ```
</ResponseExample>
