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

# ingest - Remote Documents

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

Ingest documents hosted on public URLs into a GroundX bucket.

[Supported Document Types and Ingest Capacities](https://docs.eyelevel.ai/documentation/fundamentals/document-types-and-ingest-capacities)


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

## Authentication

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

## Request

### Body (application/json)

This endpoint expects a DocumentRemoteIngestRequest.

- `documents` (list of IngestRemoteDocument, required)
- `callbackUrl` (string, optional) — URL that receives processing updates as POST requests.
- `callbackData` (string, optional) — Custom string included in processing updates sent to the callback URL.

## Response

### 200

Documents successfully uploaded

- `ingest` (IngestStatus, required)

## Errors

### 400 Bad Request Error

Invalid document type or source URL

- `any`

### 401 Unauthorized Error

Unauthorized to update bucket with given ID

- `any`

### 403 Forbidden Error

File access is disabled or the request is forbidden

- `any`

### 503 Service Unavailable Error

File access is temporarily unavailable. Retry after the delay in Retry-After.

- `any`

## Types

### IngestRemoteDocument

- `bucketId` (integer, required) — The bucketId of the bucket which this remote file will be ingested into.
- `sourceUrl` (string, required) — The URL of the document being ingested by GroundX.
- `fileAccess` (FileAccessPolicy, optional, nullable) — Settings for the new document. Each supplied value overrides the bucket and account settings. Omit or send null to use those settings. For a protected upload, pass these settings when requesting the upload URL, before sending bytes.
- `fileName` (string, optional) — The name of the file being ingested.
- `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` (IngestRemoteDocumentFilter, optional) — Key-value metadata used to filter documents before searching.
- `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` (IngestRemoteDocumentSearchData, optional) — Custom metadata used to improve search results.

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

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

### IngestRemoteDocumentFilter

Key-value metadata used to filter documents before searching.

### IngestRemoteDocumentSearchData

Custom metadata used to improve search results.

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

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

**Request**

```json
{
  "documents": [
    {
      "bucketId": 1234,
      "sourceUrl": "https://my.source.url.com/file1.txt",
      "fileName": "my_file1.txt",
      "fileType": "txt"
    }
  ]
}
```

**Response**

```json
{
  "ingest": {
    "processId": "uuid",
    "status": "queued"
  }
}
```

**SDK Code**

```python
from groundx import Document, GroundX

client = GroundX(api_key="YOUR_API_KEY")

client.ingest(
  documents=[
    Document(
      bucket_id=1234,
      file_name="my_file1.txt",
      file_path="https://my.source.url.com/file1.txt",
      file_type="txt",
      search_data=dict(
        key = "value",
      ),
    )
  ]
)

```

```typescript
import { GroundXClient } from "groundx";

const client = new GroundXClient({ apiKey: "YOUR_API_KEY" });

await client.ingest(
  [
    {
      bucketId: 1234,
      fileName: "my_file1.txt",
      filePath: "https://my.source.url.com/file1.txt",
      fileType: "txt",
      searchData: {
        "key": "val",
      },
    }
  ]
);

```

```go
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"documents\": [\n    {\n      \"bucketId\": 1234,\n      \"sourceUrl\": \"https://my.source.url.com/file1.txt\",\n      \"fileName\": \"my_file1.txt\",\n      \"fileType\": \"txt\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", 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/remote")

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

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"documents\": [\n    {\n      \"bucketId\": 1234,\n      \"sourceUrl\": \"https://my.source.url.com/file1.txt\",\n      \"fileName\": \"my_file1.txt\",\n      \"fileType\": \"txt\"\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.post("https://api.groundx.ai/api/v1/ingest/documents/remote")
  .header("X-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"documents\": [\n    {\n      \"bucketId\": 1234,\n      \"sourceUrl\": \"https://my.source.url.com/file1.txt\",\n      \"fileName\": \"my_file1.txt\",\n      \"fileType\": \"txt\"\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.groundx.ai/api/v1/ingest/documents/remote', [
  'body' => '{
  "documents": [
    {
      "bucketId": 1234,
      "sourceUrl": "https://my.source.url.com/file1.txt",
      "fileName": "my_file1.txt",
      "fileType": "txt"
    }
  ]
}',
  '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/remote");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"documents\": [\n    {\n      \"bucketId\": 1234,\n      \"sourceUrl\": \"https://my.source.url.com/file1.txt\",\n      \"fileName\": \"my_file1.txt\",\n      \"fileType\": \"txt\"\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": [
    [
      "bucketId": 1234,
      "sourceUrl": "https://my.source.url.com/file1.txt",
      "fileName": "my_file1.txt",
      "fileType": "txt"
    ]
  ]] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.groundx.ai/api/v1/ingest/documents/remote")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```