Covara logoDocs
Endpoint Reference

Overview

Integrating with Covara API for policy extraction, document ingestion, Vara agent turns, and usage reporting.

GET
/health

Response Body

application/json

curl -X GET "https://example.com/health"
{
  "status": "ok",
  "service": "covara-api"
}
GET
/v1/ping

Authorization

bearerAuth
AuthorizationBearer <token>

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"
  ]
}
GET
/v1/policies

Returns all policy types available in the Covara schema registry.

Authorization

bearerAuth
AuthorizationBearer <token>

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"
  ]
}
GET
/v1/policies/{type}/schema

Returns the JSON Schema representation for a policy type's structured extraction result.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

type*string

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"
  ]
}
POST
/v1/extract/{policyType}

Creates a high-priority extraction job for a non-batched policy type, waits for completion, and returns the structured result inline.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

policyType*string

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"
  ]
}
POST
/v1/jobs

Creates an asynchronous extraction job. This endpoint supports all policy types, including types that require batching.

Authorization

bearerAuth
AuthorizationBearer <token>

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"
  ]
}
GET
/v1/jobs/{jobId}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

jobId*string
Formatuuid

Response 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"
  ]
}
GET
/v1/documents

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

query?string

Optional search query.

limit?integer

Maximum documents to return.

Default20
Range1 <= value

Response 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"
  ]
}
GET
/v1/documents/{documentId}/status

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

documentId*string
Formatuuid

Response 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"
  ]
}
POST
/v1/documents/uploads

Creates a document record and upload instructions for a client-side PDF upload.

Authorization

bearerAuth
AuthorizationBearer <token>

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"
  ]
}
POST
/v1/documents/uploads/complete

Marks a prepared upload complete and queues extraction processing.

Authorization

bearerAuth
AuthorizationBearer <token>

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"
  ]
}
POST
/v1/documents/from-url

Creates a document from a publicly accessible URL and queues extraction processing.

Authorization

bearerAuth
AuthorizationBearer <token>

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"
  ]
}
POST
/v1/agent/messages

Starts or continues a Vara assistant conversation and can optionally attach documents or request tools.

Authorization

bearerAuth
AuthorizationBearer <token>

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"
  ]
}
GET
/v1/agent/sessions/{sessionId}/messages

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

sessionId*string
Formatuuid

Response 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"
  ]
}
POST
/v1/agent/sessions/{sessionId}/messages

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

sessionId*string
Formatuuid

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

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"
  ]
}
GET
/v1/usage

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

from?string

ISO 8601 start timestamp.

Formatdate-time
to?string

ISO 8601 end timestamp.

Formatdate-time
keyId?string

Filter usage to a specific API key ID.

Formatuuid

Response 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"
  ]
}