To get access to Background Agent APIs, contact enterprise@context.ai
Base URL & Authentication
Authentication
All API requests require a valid JWT token obtained through enterprise SSO:Task Management Endpoints
Submit Background Task
Create and submit a new background task for automated processing.Response Format
Get Task Status
Retrieve the current status and progress of a background task.Response Format
List Tasks
Retrieve a list of background tasks with filtering and pagination options.Response Format
Cancel Task
Cancel a pending or processing background task.Get Task Results
Retrieve the complete results of a completed background task.Response Format
Agent Type Endpoints
Research Agent Tasks
Submit specialized research tasks for market intelligence and analysis.Processing Agent Tasks
Submit document processing and data extraction tasks.Notification Agent Tasks
Configure automated notification and reporting workflows.WebSocket Integration
For real-time task updates, establish a WebSocket connection.WebSocket Connection
Webhook Configuration
Configure webhooks to receive task notifications at your endpoints.Webhook Payload Format
Webhook Signature Verification
Error Handling
Error Response Format
Common Error Codes
Code | Description | Resolution |
---|---|---|
UNAUTHORIZED | Invalid or expired authentication token | Refresh authentication token |
TASK_VALIDATION_FAILED | Invalid task configuration | Check task parameters against API docs |
RATE_LIMIT_EXCEEDED | Too many requests | Implement exponential backoff |
INSUFFICIENT_RESOURCES | System at capacity | Retry later or contact support |
TASK_TIMEOUT | Task exceeded maximum processing time | Reduce task complexity or increase timeout |
Rate Limits
Background Agent API implements rate limiting per organization:Endpoint | Rate Limit | Burst Limit |
---|---|---|
POST /tasks | 100 requests/hour | 10 requests/minute |
GET /tasks | 1000 requests/hour | 50 requests/minute |
GET /tasks/{id} | 500 requests/hour | 25 requests/minute |
WebSocket connections | 5 concurrent connections | N/A |