Overview
Integrating with Covara API for policy extraction, document ingestion, Vara agent turns, and usage reporting.
Response Body
application/json
curl -X GET "https://example.com/health"{
"status": "ok",
"service": "covara-api"
}Authorization
bearerAuth In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/ping"{
"message": "pong",
"user": {},
"timestamp": "2019-08-24T14:15:22Z"
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}Returns all policy types available in the Covara schema registry.
Authorization
bearerAuth In: header
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/v1/policies"{
"policies": [
{
"type": "string",
"label": "string",
"category": "string",
"description": "string",
"complexityRating": "string",
"requiresBatching": true,
"estimatedTokens": {
"prompt": 0,
"completion": 0
}
}
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}Returns the JSON Schema representation for a policy type's structured extraction result.
Authorization
bearerAuth In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/policies/string/schema"{
"type": "string",
"schema": {}
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}Creates a high-priority extraction job for a non-batched policy type, waits for completion, and returns the structured result inline.
Authorization
bearerAuth In: header
Path Parameters
Policy type to extract. Batched policy types must use the Jobs API instead.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/extract/string" \ -H "Content-Type: application/json" \ -d '{ "document": { "type": "url", "content": "string" } }'{
"success": true,
"data": {},
"metadata": {
"policyType": "string",
"jobId": "9d222c6d-893e-4e79-8201-3c9ca16a0f39",
"durationMs": 0
}
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}Creates an asynchronous extraction job. This endpoint supports all policy types, including types that require batching.
Authorization
bearerAuth In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/jobs" \ -H "Content-Type: application/json" \ -d '{ "policyType": "string" }'{
"jobId": "9d222c6d-893e-4e79-8201-3c9ca16a0f39",
"status": "string",
"idempotencyKey": "string",
"createdAt": "2019-08-24T14:15:22Z",
"workflowId": "string"
}{
"jobId": "9d222c6d-893e-4e79-8201-3c9ca16a0f39",
"status": "string",
"idempotencyKey": "string",
"createdAt": "2019-08-24T14:15:22Z",
"workflowId": "string"
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}Authorization
bearerAuth In: header
Path Parameters
uuidResponse Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/jobs/497f6eca-6276-4993-bfeb-53cbbbba6f08"{
"jobId": "9d222c6d-893e-4e79-8201-3c9ca16a0f39",
"status": "pending",
"policyType": "string",
"priority": 0,
"attempts": 0,
"maxAttempts": 0,
"timestamps": {},
"progress": {},
"result": {},
"error": {},
"metadata": {}
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}Authorization
bearerAuth In: header
Query Parameters
Optional search query.
Maximum documents to return.
201 <= valueResponse Body
application/json
application/json
application/json
curl -X GET "https://example.com/v1/documents"{
"documents": [
{}
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}Authorization
bearerAuth In: header
Path Parameters
uuidResponse Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/status"{}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}Creates a document record and upload instructions for a client-side PDF upload.
Authorization
bearerAuth In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/documents/uploads" \ -H "Content-Type: application/json" \ -d '{ "fileName": "string", "documentType": "string" }'{}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}Marks a prepared upload complete and queues extraction processing.
Authorization
bearerAuth In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/documents/uploads/complete" \ -H "Content-Type: application/json" \ -d '{ "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052" }'{}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}Creates a document from a publicly accessible URL and queues extraction processing.
Authorization
bearerAuth In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/documents/from-url" \ -H "Content-Type: application/json" \ -d '{ "url": "http://example.com", "documentType": "string" }'{}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}Starts or continues a Vara assistant conversation and can optionally attach documents or request tools.
Authorization
bearerAuth In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/agent/messages" \ -H "Content-Type: application/json" \ -d '{ "message": "string" }'{}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}Authorization
bearerAuth In: header
Path Parameters
uuidResponse Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/agent/sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/messages"{
"sessionId": "f6567dd8-e069-418e-8893-7d22fcf12459",
"messages": [
{}
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}Authorization
bearerAuth In: header
Path Parameters
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/agent/sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/messages" \ -H "Content-Type: application/json" \ -d '{ "message": "string" }'{}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}Authorization
bearerAuth In: header
Query Parameters
ISO 8601 start timestamp.
date-timeISO 8601 end timestamp.
date-timeFilter usage to a specific API key ID.
uuidResponse Body
application/json
application/json
application/json
curl -X GET "https://example.com/v1/usage"{
"usage": {},
"bySource": {
"web": 0,
"api": 0
},
"jobs": {
"property1": 0,
"property2": 0
},
"period": {
"from": "2019-08-24T14:15:22Z",
"to": "2019-08-24T14:15:22Z"
}
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}{
"error": "string",
"message": "string",
"issues": [
{}
],
"required": [
"string"
]
}