Context API
The /context endpoint allows you to programmatically add context to DelegateZero.
This is the same type of information you would add through the dashboard. DZ will analyze, categorize, and store the content so it can be used in future decisions. Use this endpoint when you want to:
- Add information outside of a decision request
- Preload knowledge before automation runs
- Sync documents, notes, or data from other systems
- Gradually build DZ's understanding over time
This endpoint does not trigger a decision or return an outcome. Here is what it looks like:
cURL
Node.js
Python
curl -X POST https://delegatezero.com/api/v1/context \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"context": "Here is a list of our client's including their contact information.",
"files": "https://example.com/data.pdf"
}'
import axios from "axios";
const context = await axios.post(
"https://delegatezero.com/api/v1/context",
{
context: "Here is a list of our client's including their contact information.",
files: "https://example.com/data.pdf"
},
{
headers: {
Authorization: `Bearer ${process.env.API_KEY}`
}
}
);
import requests
import os
response = requests.post(
"https://delegatezero.com/api/v1/context",
headers={
"Authorization": "Bearer {os.environ['API_KEY']}",
"Content-Type": "application/json"
},
json={
"context": "Here is a list of our client's including their contact information.",
"files": "https://example.com/data.pdf"
}
)The endpoint currently accepts two inputs: a context string and optional files.
Path
Purpose
/decisions
To send a decision request and get a valid response.
/context
To add context to your account.
The response is very simple and only returns a confirmation:
{
"response": "Context added",
}
Sorry, we don't have any results for that search. If you need assistance, please contact us.