Ingest
curl --request POST \
--url https://api.userepo.com/v1/ingest \
--header 'Content-Type: application/json' \
--data '
{
"documents": [
{}
],
"connectorId": "<string>",
"provider": "<string>",
"sourceKind": "<string>",
"externalId": "<string>",
"title": "<string>",
"body": "<string>",
"url": "<string>",
"authorName": "<string>",
"sourceCreatedAt": {},
"sourceUpdatedAt": {},
"metadata": {}
}
'import requests
url = "https://api.userepo.com/v1/ingest"
payload = {
"documents": [{}],
"connectorId": "<string>",
"provider": "<string>",
"sourceKind": "<string>",
"externalId": "<string>",
"title": "<string>",
"body": "<string>",
"url": "<string>",
"authorName": "<string>",
"sourceCreatedAt": {},
"sourceUpdatedAt": {},
"metadata": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
documents: [{}],
connectorId: '<string>',
provider: '<string>',
sourceKind: '<string>',
externalId: '<string>',
title: '<string>',
body: JSON.stringify('<string>'),
url: '<string>',
authorName: '<string>',
sourceCreatedAt: {},
sourceUpdatedAt: {},
metadata: {}
})
};
fetch('https://api.userepo.com/v1/ingest', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.userepo.com/v1/ingest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'documents' => [
[
]
],
'connectorId' => '<string>',
'provider' => '<string>',
'sourceKind' => '<string>',
'externalId' => '<string>',
'title' => '<string>',
'body' => '<string>',
'url' => '<string>',
'authorName' => '<string>',
'sourceCreatedAt' => [
],
'sourceUpdatedAt' => [
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.userepo.com/v1/ingest"
payload := strings.NewReader("{\n \"documents\": [\n {}\n ],\n \"connectorId\": \"<string>\",\n \"provider\": \"<string>\",\n \"sourceKind\": \"<string>\",\n \"externalId\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"url\": \"<string>\",\n \"authorName\": \"<string>\",\n \"sourceCreatedAt\": {},\n \"sourceUpdatedAt\": {},\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.userepo.com/v1/ingest")
.header("Content-Type", "application/json")
.body("{\n \"documents\": [\n {}\n ],\n \"connectorId\": \"<string>\",\n \"provider\": \"<string>\",\n \"sourceKind\": \"<string>\",\n \"externalId\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"url\": \"<string>\",\n \"authorName\": \"<string>\",\n \"sourceCreatedAt\": {},\n \"sourceUpdatedAt\": {},\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.userepo.com/v1/ingest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"documents\": [\n {}\n ],\n \"connectorId\": \"<string>\",\n \"provider\": \"<string>\",\n \"sourceKind\": \"<string>\",\n \"externalId\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"url\": \"<string>\",\n \"authorName\": \"<string>\",\n \"sourceCreatedAt\": {},\n \"sourceUpdatedAt\": {},\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_bodyReference
Ingest
Push documents directly into Repo without going through a connector.
POST
/
v1
/
ingest
Ingest
curl --request POST \
--url https://api.userepo.com/v1/ingest \
--header 'Content-Type: application/json' \
--data '
{
"documents": [
{}
],
"connectorId": "<string>",
"provider": "<string>",
"sourceKind": "<string>",
"externalId": "<string>",
"title": "<string>",
"body": "<string>",
"url": "<string>",
"authorName": "<string>",
"sourceCreatedAt": {},
"sourceUpdatedAt": {},
"metadata": {}
}
'import requests
url = "https://api.userepo.com/v1/ingest"
payload = {
"documents": [{}],
"connectorId": "<string>",
"provider": "<string>",
"sourceKind": "<string>",
"externalId": "<string>",
"title": "<string>",
"body": "<string>",
"url": "<string>",
"authorName": "<string>",
"sourceCreatedAt": {},
"sourceUpdatedAt": {},
"metadata": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
documents: [{}],
connectorId: '<string>',
provider: '<string>',
sourceKind: '<string>',
externalId: '<string>',
title: '<string>',
body: JSON.stringify('<string>'),
url: '<string>',
authorName: '<string>',
sourceCreatedAt: {},
sourceUpdatedAt: {},
metadata: {}
})
};
fetch('https://api.userepo.com/v1/ingest', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.userepo.com/v1/ingest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'documents' => [
[
]
],
'connectorId' => '<string>',
'provider' => '<string>',
'sourceKind' => '<string>',
'externalId' => '<string>',
'title' => '<string>',
'body' => '<string>',
'url' => '<string>',
'authorName' => '<string>',
'sourceCreatedAt' => [
],
'sourceUpdatedAt' => [
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.userepo.com/v1/ingest"
payload := strings.NewReader("{\n \"documents\": [\n {}\n ],\n \"connectorId\": \"<string>\",\n \"provider\": \"<string>\",\n \"sourceKind\": \"<string>\",\n \"externalId\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"url\": \"<string>\",\n \"authorName\": \"<string>\",\n \"sourceCreatedAt\": {},\n \"sourceUpdatedAt\": {},\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.userepo.com/v1/ingest")
.header("Content-Type", "application/json")
.body("{\n \"documents\": [\n {}\n ],\n \"connectorId\": \"<string>\",\n \"provider\": \"<string>\",\n \"sourceKind\": \"<string>\",\n \"externalId\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"url\": \"<string>\",\n \"authorName\": \"<string>\",\n \"sourceCreatedAt\": {},\n \"sourceUpdatedAt\": {},\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.userepo.com/v1/ingest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"documents\": [\n {}\n ],\n \"connectorId\": \"<string>\",\n \"provider\": \"<string>\",\n \"sourceKind\": \"<string>\",\n \"externalId\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"url\": \"<string>\",\n \"authorName\": \"<string>\",\n \"sourceCreatedAt\": {},\n \"sourceUpdatedAt\": {},\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_bodyUse this when you have a custom source not covered by Repo’s built-in connectors (e.g. an internal wiki, a proprietary CRM, a folder of PDFs in S3) and you want to feed its documents into Repo’s memory.
Required action
ingest
Body
array
required
Array of source documents to ingest. Min 1 entry.
Document fields
uuid
required
The connector this document belongs to. Create a connector first via the console, or contact support for a “virtual” connector for custom sources.
string
required
One of
slack, google_drive, notion, gmail. For custom sources, pick the one whose access model matches yours.string
required
One of
message, document, file.string
required
Stable ID from your source system. Repo dedupes on
(organizationId, provider, externalId) — re-posting with the same externalId is treated as an update.string
required
Human-facing title. Used in citations.
string
required
The full text content to embed.
string
Deep-link back to the source (will be returned in retrieval hits).
string
Original author’s name.
ISO 8601
When the source was created at the provider.
ISO 8601
When the source was last updated at the provider.
object
default:"{}"
Arbitrary provider-specific metadata. If you want to preserve ACLs or other access policy data, include an
accessPolicy key — Repo’s retrieval will surface it back to the caller.Response
{
"ingested": 12,
"skipped": 0
}
skipped counts documents that matched an existing externalId with identical content (no-op).
Example
curl -X POST https://api.userepo.com/v1/ingest \
-H "Authorization: Bearer repo_your_key" \
-H "Content-Type: application/json" \
-d '{
"documents": [
{
"connectorId": "550e8400-e29b-41d4-a716-446655440000",
"provider": "notion",
"sourceKind": "document",
"externalId": "internal-wiki-page-42",
"title": "Refund policy",
"body": "Customers can request a refund within 30 days...",
"url": "https://wiki.acme.internal/refunds",
"metadata": {
"accessPolicy": {
"provider": "notion",
"mode": "provider_scope",
"description": "Wiki page accessible to all employees"
}
}
}
]
}'
When to use ingest vs. a connector
Use /v1/ingest when | Use a built-in connector when |
|---|---|
| You have a custom source not covered by connectors | The source is Slack, Drive, Notion, or Gmail |
| You want to control sync cadence yourself | You want hands-off, every-15-minute polling |
| You’re piping in data from an ETL pipeline you already run | You don’t want to maintain sync logic |