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

# Create an ingest job handler

> **Required scope:** write

**Required scope:** `write`

### Request body

`CreateIngestJobRequest`

**compute\_embeddings** `boolean`

**file\_id** `string`

**input\_text** `string`

**metadata** `object`

**source\_locator** `string`

**source\_type** `string`

**structured** `object`

### Response

`IngestJobResponse`

**completed\_at** `integer (int64)`

**created\_at** `integer (int64)` *required*

**entity\_ids** `string[]`

**errors** `string[]`

**evidence\_ids** `string[]`

**file\_id** `string`

**id** `string` *required*

**object** `string` *required*

**rule\_ids** `string[]`

**status** `string` *required*

**summary** `IngestJobSummary` *required*

**IngestJobSummary**

**entities\_created** `integer` *required*

**evidence\_nodes\_created** `integer` *required*

**files\_processed** `integer` *required*

**rules\_created** `integer` *required*

**source\_id** `string`

**triples\_created** `integer` *required*

**warnings** `string[]`

### Status codes

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

```bash cURL theme={null}
curl --request POST \
  --url 'https://api.nsr.stateset.com/v1/ingest/jobs' \
  --header "X-API-Key: $STATESET_NSR_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "compute_embeddings": true,
  "file_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "input_text": "string",
  "metadata": {},
  "source_locator": "string",
  "source_type": "string",
  "structured": {
    "entities": [
      {
        "entity_type": null,
        "name": null,
        "properties": null
      }
    ],
    "rules": [
      {
        "body": null,
        "confidence": null,
        "description": null,
        "head_args": null,
        "head_predicate": null,
        "name": null
      }
    ],
    "triples": [
      {
        "confidence": null,
        "object_id": null,
        "predicate": null,
        "subject_id": null
      }
    ]
  }
}'
```

```json 201 theme={null}
{
  "completed_at": 1,
  "created_at": 1,
  "entity_ids": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ],
  "errors": [
    "string"
  ],
  "evidence_ids": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ],
  "file_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "object": "string",
  "rule_ids": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ],
  "status": "pending",
  "summary": {
    "entities_created": 1,
    "evidence_nodes_created": 1,
    "files_processed": 1,
    "rules_created": 1,
    "source_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "triples_created": 1
  },
  "warnings": [
    "string"
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.