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

<ParamField body="compute_embeddings" type="boolean" />

<ParamField body="file_id" type="string" />

<ParamField body="input_text" type="string" />

<ParamField body="metadata" type="object" />

<ParamField body="source_locator" type="string" />

<ParamField body="source_type" type="string" />

<ParamField body="structured" type="object" />

### Response

`IngestJobResponse`

<ResponseField name="completed_at" type="integer (int64)" />

<ResponseField name="created_at" type="integer (int64)" required />

<ResponseField name="entity_ids" type="string[]" />

<ResponseField name="errors" type="string[]" />

<ResponseField name="evidence_ids" type="string[]" />

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

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

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

<ResponseField name="rule_ids" type="string[]" />

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

<ResponseField name="summary" type="IngestJobSummary" required>
  <Expandable title="IngestJobSummary">
    <ResponseField name="entities_created" type="integer" required />

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

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

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

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

    <ResponseField name="triples_created" type="integer" required />
  </Expandable>
</ResponseField>

<ResponseField name="warnings" type="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 |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.nsr.stateset.com/v1/ingest/jobs' \
    --header 'X-API-Key: YOUR_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
        }
      ]
    }
  }'
  ```
</RequestExample>

<ResponseExample>
  ```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"
    ]
  }
  ```
</ResponseExample>
