> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.eyelevel.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.eyelevel.ai/_mcp/server.

# update

PUT https://api.groundx.ai/api/v1/ingest/documents
Content-Type: application/json

Update the attributes of documents that have been uploaded to GroundX.


Reference: https://docs.eyelevel.ai/reference/api-reference/documents/update

## Authentication

- `X-API-Key` header (required) — API Key authentication via header

## Request

### Body (application/json)

This endpoint expects a DocumentUpdateRequest.

- `documents` (list of DocumentUpdate, required)
- `callbackUrl` (string, optional) — An endpoint that will receive processing event updates as POST.
- `callbackData` (string, optional) — A string that is returned, along with processing event updates, to the callback URL.

## Response

### 200

Documents successfully submitted for updates

- `ingest` (IngestStatus, required)

## Errors

### 400 Bad Request Error

Invalid request type

- `any`

### 401 Unauthorized Error

Unauthorized to update bucket with ID

- `any`

## Types

### DocumentUpdate

- `documentId` (string, required) — The document ID of the file you wish to update.
- `fileName` (string, optional) — The name you wish to change for the file.
- `filter` (DocumentUpdateFilter, optional) — A dictionary of key-value pairs that will replace the existing filter.
- `searchData` (DocumentUpdateSearchData, optional) — A dictionary of key-value pairs that will replace the existing searchData.

### IngestStatus

- `processId` (string, required)
- `status` (enum, required)
  - Allowed values: `queued`, `training`, `generating`, `processing`, `error`, `complete`, `cancelled`, `active`, `inactive`
- `id` (integer, optional)
- `progress` (IngestStatusProgress, optional)
- `statusMessage` (string, optional)

### DocumentUpdateFilter

A dictionary of key-value pairs that will replace the existing filter.

### DocumentUpdateSearchData

A dictionary of key-value pairs that will replace the existing searchData.

### IngestStatusProgress

- `cancelled` (IngestStatusProgressCancelled, optional)
- `complete` (IngestStatusProgressComplete, optional)
- `errors` (IngestStatusProgressErrors, optional)
- `processing` (IngestStatusProgressProcessing, optional)
- `queued` (IngestStatusProgressQueued, optional)

### IngestStatusProgressCancelled

- `documents` (list of DocumentDetail, optional)
- `total` (integer, optional)

### IngestStatusProgressComplete

- `documents` (list of DocumentDetail, optional)
- `total` (integer, optional)

### IngestStatusProgressErrors

- `documents` (list of DocumentDetail, optional)
- `total` (integer, optional)

### IngestStatusProgressProcessing

- `documents` (list of DocumentDetail, optional)
- `total` (integer, optional)

### IngestStatusProgressQueued

- `documents` (list of DocumentDetail, optional)
- `total` (integer, optional)

### DocumentDetail

- `documentId` (string, required) — Unique system generated ID for the document
- `bucketId` (integer, optional)
- `created` (string, optional) — Document creation time in RFC 3339 format, when available.
- `deliveryStatus` (enum, optional) — Current-run required customer delivery confirmation. Failed confirmation does not prove nonreceipt; unknown means saved evidence is insufficient.
  - Allowed values: `not_configured`, `pending`, `succeeded`, `failed`, `unknown`
- `extractionProvenance` (ExtractionProvenance, optional) — Workflow and runtime builds associated with the document's current extraction result.
- `extractionReady` (boolean, optional, nullable) — Whether the current run's final extraction is published after required review and transformations. Null means saved evidence is insufficient.
- `retryAvailable` (boolean, optional) — Whether the document can currently restart its failed HTTP callback. Returned by document detail only. GroundX rechecks eligibility when retry is requested.
- `fileName` (string, optional)
- `fileSize` (string, optional) — The file size of the file stored in GroundX
- `fileType` (enum, optional) — The type of document (one of the currently supported file types)
  - Allowed values: `bmp`, `csv`, `docx`, `gif`, `heif`, `hwp`, `ico`, `jpg`, `json`, `pdf`, `png`, `pptx`, `svg`, `tiff`, `tsv`, `txt`, `xlsx`, `webp`
- `filter` (DocumentDetailFilter, optional) — A dictionary of key-value pairs that can be used to pre-filter documents prior to a search.
- `processId` (string, optional) — Unique system generated ID for the ingest request
- `processLevel` (enum, optional) — The amount of processing of document chunks to perform. 'none' specifies the document to go through only text extraction and chunking. Documents uploaded with 'full' go through text extraction, chunking, and an agentic process that creates robust metadata for each chunk. (default 'full').
  - Allowed values: `none`, `full`
- `searchData` (DocumentDetailSearchData, optional)
- `sourceUrl` (string, optional) — Source document URL
- `hostedSourceUrl` (string, optional) — GroundX-hosted stored source URL, when available. Returned by document detail only; access still requires normal document authorization.
- `status` (enum, optional)
  - Allowed values: `queued`, `training`, `generating`, `processing`, `error`, `complete`, `cancelled`, `active`, `inactive`
- `statusMessage` (string, optional)
- `textUrl` (string, optional) — Extracted text URL, if using the extract agent
- `xrayUrl` (string, optional) — Document X-Ray results

### ExtractionProvenance

Workflow and runtime builds associated with the document's current extraction result.

- `artifactRevision` (string, optional) — Revision of the complete deployed workflow artifact, including prompts.
- `runtimeBuildIds` (list of string, optional) — Unique extraction container build IDs observed while producing the current result. Each ID maps to one immutable image digest.
- `schemaHash` (string, optional) — Hash of the workflow output schema and routing metadata.
- `workflowId` (string, optional) — Unique system generated ID for the extraction workflow.
- `workflowVersion` (string, optional) — Exact workflow version selected when extraction was dispatched.

### DocumentDetailFilter

A dictionary of key-value pairs that can be used to pre-filter documents prior to a search.

### DocumentDetailSearchData

## Examples

**Request**

```json
{
  "documents": [
    {
      "documentId": "string"
    }
  ]
}
```

**Response**

```json
{
  "ingest": {
    "processId": "string",
    "status": "queued",
    "id": 1,
    "progress": {
      "cancelled": {
        "documents": [
          {
            "documentId": "string",
            "bucketId": 1,
            "created": "2024-01-15T09:30:00Z",
            "deliveryStatus": "not_configured",
            "extractionProvenance": {
              "artifactRevision": "string",
              "runtimeBuildIds": [
                "string"
              ],
              "schemaHash": "string",
              "workflowId": "string",
              "workflowVersion": "string"
            },
            "extractionReady": true,
            "retryAvailable": true,
            "fileName": "string",
            "fileSize": "1.4MB",
            "fileType": "bmp",
            "filter": {
              "key": "value",
              "another_key": {
                "nested": "value"
              }
            },
            "processId": "string",
            "processLevel": "none",
            "searchData": {},
            "sourceUrl": "string",
            "hostedSourceUrl": "string",
            "status": "queued",
            "statusMessage": "string",
            "textUrl": "string",
            "xrayUrl": "string"
          }
        ],
        "total": 1
      },
      "complete": {
        "documents": [
          {
            "documentId": "string",
            "bucketId": 1,
            "created": "2024-01-15T09:30:00Z",
            "deliveryStatus": "not_configured",
            "extractionProvenance": {
              "artifactRevision": "string",
              "runtimeBuildIds": [
                "string"
              ],
              "schemaHash": "string",
              "workflowId": "string",
              "workflowVersion": "string"
            },
            "extractionReady": true,
            "retryAvailable": true,
            "fileName": "string",
            "fileSize": "1.4MB",
            "fileType": "bmp",
            "filter": {
              "key": "value",
              "another_key": {
                "nested": "value"
              }
            },
            "processId": "string",
            "processLevel": "none",
            "searchData": {},
            "sourceUrl": "string",
            "hostedSourceUrl": "string",
            "status": "queued",
            "statusMessage": "string",
            "textUrl": "string",
            "xrayUrl": "string"
          }
        ],
        "total": 1
      },
      "errors": {
        "documents": [
          {
            "documentId": "string",
            "bucketId": 1,
            "created": "2024-01-15T09:30:00Z",
            "deliveryStatus": "not_configured",
            "extractionProvenance": {
              "artifactRevision": "string",
              "runtimeBuildIds": [
                "string"
              ],
              "schemaHash": "string",
              "workflowId": "string",
              "workflowVersion": "string"
            },
            "extractionReady": true,
            "retryAvailable": true,
            "fileName": "string",
            "fileSize": "1.4MB",
            "fileType": "bmp",
            "filter": {
              "key": "value",
              "another_key": {
                "nested": "value"
              }
            },
            "processId": "string",
            "processLevel": "none",
            "searchData": {},
            "sourceUrl": "string",
            "hostedSourceUrl": "string",
            "status": "queued",
            "statusMessage": "string",
            "textUrl": "string",
            "xrayUrl": "string"
          }
        ],
        "total": 1
      },
      "processing": {
        "documents": [
          {
            "documentId": "string",
            "bucketId": 1,
            "created": "2024-01-15T09:30:00Z",
            "deliveryStatus": "not_configured",
            "extractionProvenance": {
              "artifactRevision": "string",
              "runtimeBuildIds": [
                "string"
              ],
              "schemaHash": "string",
              "workflowId": "string",
              "workflowVersion": "string"
            },
            "extractionReady": true,
            "retryAvailable": true,
            "fileName": "string",
            "fileSize": "1.4MB",
            "fileType": "bmp",
            "filter": {
              "key": "value",
              "another_key": {
                "nested": "value"
              }
            },
            "processId": "string",
            "processLevel": "none",
            "searchData": {},
            "sourceUrl": "string",
            "hostedSourceUrl": "string",
            "status": "queued",
            "statusMessage": "string",
            "textUrl": "string",
            "xrayUrl": "string"
          }
        ],
        "total": 1
      },
      "queued": {
        "documents": [
          {
            "documentId": "string",
            "bucketId": 1,
            "created": "2024-01-15T09:30:00Z",
            "deliveryStatus": "not_configured",
            "extractionProvenance": {
              "artifactRevision": "string",
              "runtimeBuildIds": [
                "string"
              ],
              "schemaHash": "string",
              "workflowId": "string",
              "workflowVersion": "string"
            },
            "extractionReady": true,
            "retryAvailable": true,
            "fileName": "string",
            "fileSize": "1.4MB",
            "fileType": "bmp",
            "filter": {
              "key": "value",
              "another_key": {
                "nested": "value"
              }
            },
            "processId": "string",
            "processLevel": "none",
            "searchData": {},
            "sourceUrl": "string",
            "hostedSourceUrl": "string",
            "status": "queued",
            "statusMessage": "string",
            "textUrl": "string",
            "xrayUrl": "string"
          }
        ],
        "total": 1
      }
    },
    "statusMessage": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.groundx.ai/api/v1/ingest/documents"

payload = { "documents": [{ "documentId": "string" }] }
headers = {
    "X-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.groundx.ai/api/v1/ingest/documents';
const options = {
  method: 'PUT',
  headers: {'X-API-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"documents":[{"documentId":"string"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.groundx.ai/api/v1/ingest/documents"

	payload := strings.NewReader("{\n  \"documents\": [\n    {\n      \"documentId\": \"string\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("X-API-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.groundx.ai/api/v1/ingest/documents")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"documents\": [\n    {\n      \"documentId\": \"string\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.groundx.ai/api/v1/ingest/documents")
  .header("X-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"documents\": [\n    {\n      \"documentId\": \"string\"\n    }\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.groundx.ai/api/v1/ingest/documents', [
  'body' => '{
  "documents": [
    {
      "documentId": "string"
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.groundx.ai/api/v1/ingest/documents");
var request = new RestRequest(Method.PUT);
request.AddHeader("X-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"documents\": [\n    {\n      \"documentId\": \"string\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-API-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["documents": [["documentId": "string"]]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.groundx.ai/api/v1/ingest/documents")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```