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

# list

GET https://api.groundx.ai/api/v1/ingest/documents

lookup all documents across all resources which are currently on GroundX


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

## Authentication

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

## Request

### Query parameters

- `n` (integer, optional) — The maximum number of returned documents. Accepts 1-100 with a default of 20.
- `filter` (string, optional) — Return only documents whose names contain this string.
- `sort` (enum, optional) — The document attribute that will be used to sort the results.
  - Allowed values: `name`, `created`
- `sortOrder` (enum, optional) — Sort order. Requires sort.
  - Allowed values: `asc`, `desc`
- `status` (enum, optional) — Return only documents with this status.
  - Allowed values: `queued`, `training`, `generating`, `processing`, `error`, `complete`, `cancelled`, `active`, `inactive`
- `nextToken` (string, optional) — Pass nextToken from the previous response to get the next page of up to n documents.

## Response

### 200

Lookup successful

- `documents` (list of DocumentDetail, optional)
- `nextToken` (string, optional)

## Types

### DocumentDetail

- `documentId` (string, required) — Unique system generated ID for the document
- `fileAccess` (FileAccessPolicy, optional, nullable) — Settings saved on this document. Null means use the bucket and account settings. Omitted when file protection is disabled.
- `effectiveFileAccess` (EffectivePolicy, optional) — Settings GroundX uses after checking document, bucket and account values. The default temporary-link lifetime is 300 seconds. Storage credentials may expire sooner. Normal protected URLs require an API key and do not expire.
- `bucketId` (integer, optional)
- `created` (string, optional) — Document creation time in RFC 3339 format, when available.
- `deliveryStatus` (enum, optional) — Delivery confirmation for the current run. Failure does not prove the receiver received nothing. Unknown means the saved evidence cannot confirm delivery.
  - 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) — Whether the current run's final extraction was published after required review and transformations. Null means saved evidence cannot confirm publication.
- `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) — Key-value metadata used to filter documents before searching.
- `processId` (string, optional) — Unique system generated ID for the ingest request
- `processLevel` (enum, optional) — Processing level. 'none' extracts and chunks text. 'full', the default, also uses agents to create metadata for each chunk.
  - 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
- `fileAccessRevision` (integer, optional, deprecated) — Deprecated. Not needed and ignored when updating file-access settings.

### FileAccessPolicy

Controls access to normal file URLs and the maximum lifetime of temporary links. For each setting, use the document value first, then bucket, then account. If none is set, defaults are public access and a 300-second link lifetime. Normal file URLs do not expire.

- `mode` (enum, optional) — Public allows anyone with the URL to read the file. Protected requires the owning account's API key in X-API-Key.
  - Allowed values: `public`, `protected`
- `urlTtlSeconds` (integer, optional) — Maximum lifetime of a new temporary link, in seconds. Does not make normal file URLs expire.

### EffectivePolicy

Settings GroundX uses after checking document, bucket and account values. The default temporary-link lifetime is 300 seconds. Storage credentials may expire sooner. Normal protected URLs require an API key and do not expire.

- `mode` (enum, required)
  - Allowed values: `public`, `protected`
- `urlTtlSeconds` (integer, required)

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

Key-value metadata used to filter documents before searching.

### DocumentDetailSearchData

## Examples

**Response**

```json
{
  "documents": [
    {
      "documentId": "string",
      "fileAccess": {
        "mode": "public",
        "urlTtlSeconds": 1
      },
      "effectiveFileAccess": {
        "mode": "public",
        "urlTtlSeconds": 1
      },
      "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",
      "fileAccessRevision": 1
    }
  ],
  "nextToken": "string"
}
```

**SDK Code**

```python
import requests

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

headers = {"X-API-Key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.groundx.ai/api/v1/ingest/documents';
const options = {method: 'GET', headers: {'X-API-Key': '<apiKey>'}};

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"
	"net/http"
	"io"
)

func main() {

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

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-API-Key", "<apiKey>")

	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::Get.new(url)
request["X-API-Key"] = '<apiKey>'

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.get("https://api.groundx.ai/api/v1/ingest/documents")
  .header("X-API-Key", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.groundx.ai/api/v1/ingest/documents', [
  'headers' => [
    '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.GET);
request.AddHeader("X-API-Key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["X-API-Key": "<apiKey>"]

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

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()
```