Skip to main content
POST
/
v1
/
ingestion
/
any
Ingest data with metadata
curl --request POST \
  --url https://api.qontext.ai/v1/ingestion/any \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "vaultId": "kg_a2de5758-a7c5-4291-9f97-3da82f99c8f8",
  "string_data": "Harry Potter created a new deal for Gryffindor Inc. in HubSpot: [...].",
  "source": {
    "source_integration": "HubSpot",
    "source_data_type": "Deal",
    "source_id": "4754016823"
  }
}
'
import requests

url = "https://api.qontext.ai/v1/ingestion/any"

payload = {
"vaultId": "kg_a2de5758-a7c5-4291-9f97-3da82f99c8f8",
"string_data": "Harry Potter created a new deal for Gryffindor Inc. in HubSpot: [...].",
"source": {
"source_integration": "HubSpot",
"source_data_type": "Deal",
"source_id": "4754016823"
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
vaultId: 'kg_a2de5758-a7c5-4291-9f97-3da82f99c8f8',
string_data: 'Harry Potter created a new deal for Gryffindor Inc. in HubSpot: [...].',
source: {
source_integration: 'HubSpot',
source_data_type: 'Deal',
source_id: '4754016823'
}
})
};

fetch('https://api.qontext.ai/v1/ingestion/any', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
  "syncLogId": "sync_a01c7c1c-ecb0-49ec-af7f-329f4b4628bf"
}
{
"message": [
"<error message>",
"<error message>"
],
"error": "Bad Request",
"statusCode": 400
}
{
"error": "Internal Server Error",
"statusCode": 500
}
This endpoint ensures your data is stored with provenance, making it easier to identify information sources when querying.

Authorizations

X-API-Key
string
header
required

API key for the Qontext API

Body

application/json
vaultId
string
required

The id of the vault that the data should be ingested into.

Example:

"kg_a2de5758-a7c5-4291-9f97-3da82f99c8f8"

string_data
string
required

The data to ingest

Example:

"Harry Potter created a new deal for Gryffindor Inc. in HubSpot: [...]."

source
object
required

The source of the data to ingest.

Example:
{
"source_integration": "HubSpot",
"source_data_type": "Deal",
"source_id": "4754016823"
}

Response

Data ingestion initiated

syncLogId
string
required

The sync log id for the ingestion process.

Example:

"sync_a01c7c1c-ecb0-49ec-af7f-329f4b4628bf"