curl -X POST "https://api.dabarai.com/v1/politics" \
-H "api-token: YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "BP Rules",
"description": "Analyze compliance documents",
"rules": [
{ "name": "Scope", "description": "Only loans > 10k" },
{ "name": "Tone", "description": "Formal" }
],
"knowledgeFiles": [
{ "url": "https://cdn.example.com/policy.pdf", "type": "pdf", "name": "policy.pdf" }
],
"contactNotifications": ["ops@example.com"]
}'
{
"success": true,
"message": "<string>",
"data": {}
}Politics
Create politics
Create a new politics
POST
/
politics
curl -X POST "https://api.dabarai.com/v1/politics" \
-H "api-token: YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "BP Rules",
"description": "Analyze compliance documents",
"rules": [
{ "name": "Scope", "description": "Only loans > 10k" },
{ "name": "Tone", "description": "Formal" }
],
"knowledgeFiles": [
{ "url": "https://cdn.example.com/policy.pdf", "type": "pdf", "name": "policy.pdf" }
],
"contactNotifications": ["ops@example.com"]
}'
{
"success": true,
"message": "<string>",
"data": {}
}Headers
string
required
Body
string
required
Display name.
string
required
What the politics is meant to analyze / enforce.
Rule[]
required
File[]
string[]
Emails or identifiers to notify when this politics produces a result.
object
Free-form JSON describing the desired shape of results.
Response — 201 Created
boolean
string
Politics
The full persisted document, including
_id, userId, status (1),
createdAt, and updatedAt.curl -X POST "https://api.dabarai.com/v1/politics" \
-H "api-token: YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "BP Rules",
"description": "Analyze compliance documents",
"rules": [
{ "name": "Scope", "description": "Only loans > 10k" },
{ "name": "Tone", "description": "Formal" }
],
"knowledgeFiles": [
{ "url": "https://cdn.example.com/policy.pdf", "type": "pdf", "name": "policy.pdf" }
],
"contactNotifications": ["ops@example.com"]
}'