API Reference
Every public endpoint. Generated from the OpenAPI 3.1 spec available at /api/v1/openapi. All endpoints are rooted at https://bieintel.com/api/v1.
Authentication
Every request requires a Bearer token in the Authorization header. Keys start with bie_ and are created from Developer → API Keys in the app.
Authorization: Bearer bie_your_key_here
Error shape
Errors return a JSON object with a machine-readable code and human-readable message.
{
"error": {
"code": "VALIDATION_ERROR",
"message": "At least one event is required"
}
}| Status | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_ERROR | Request body failed schema validation |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 404 | NOT_FOUND | Session or resource not found |
| 429 | RATE_LIMITED | Rate limit or budget exceeded |
| 500 | INTERNAL_ERROR | Unexpected server error |
| 503 | SERVICE_UNAVAILABLE | Queue at capacity, retry after the Retry-After header |
POST /ingest
Submit interaction events for analysis. Returns a session ID to poll. The engine runs environmental assessment and selects the appropriate pipeline automatically.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| events | BIEEvent[] | yes | 1–5000 interaction events |
| deployment_id | string | yes | Stable identifier for this AI deployment |
| pipeline | string | no | auto (default) | support | reviews |
| webhook_url | string (uri) | no | Deliver results to this URL when complete |
BIEEvent schema
| Field | Type | Required | Description |
|---|---|---|---|
| actor_id | string | yes | Stable identifier for the person creating the interaction |
| content | string | yes | The text the AI will analyze |
| timestamp | string (ISO 8601) | yes | When the interaction occurred |
| context | string | no | Channel, thread, category, topic |
| metadata | object | no | Arbitrary key/value pairs preserved in the output |
{
"events": [
{
"actor_id": "user_jane",
"content": "The new checkout broke, three customers called in already.",
"timestamp": "2026-04-01T14:23:00Z",
"context": "product-feedback",
"metadata": { "source": "slack", "channel": "#support" }
}
],
"pipeline": "auto",
"webhook_url": "https://yourapp.com/webhooks/bie"
}Response, 202 Accepted
{
"session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"event_count": 1,
"status": "received"
}GET /intelligence/:sessionId
Poll for session status. When status is complete, the response includes plain_summary, plain_recommendations, and full_output.
| Field | Type | Description |
|---|---|---|
| session_id | uuid | Echoes the path parameter |
| status | enum | received | processing | complete | failed |
| event_count | integer | Number of events analyzed |
| environment_type | string | null | Detected environment type |
| created_at | string (ISO 8601) | Session creation time |
| completed_at | string | null | Set when status is complete |
| plain_summary | string | null | Human-readable environmental summary |
| plain_recommendations | string[] | null | Actionable recommendations |
| full_output | object | null | Structured pipeline-specific intelligence |
| error | string | null | Error message if status is failed |
{
"session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "complete",
"event_count": 47,
"environment_type": "review_dataset",
"created_at": "2026-04-01T14:30:00Z",
"completed_at": "2026-04-01T14:31:12Z",
"plain_summary": "Delivery timing is the dominant negative signal...",
"plain_recommendations": [
"16 of 47 reviews reference late or unpredictable delivery windows.",
"Three reviews mention the same courier, investigate the logistics change."
],
"full_output": {
"pipeline": "review",
"intelligence": { "operational_signals": [], "sentiment_trajectory": {} }
}
}POST /drift
Compare two time periods. Submit a before and after event set; BIE classifies both, compares behavioral dimensions, and returns a drift analysis. Each period must contain 5–2000 events.
{
"before": {
"label": "Pre-launch (Jan–Mar)",
"events": [ /* 5–2000 events */ ]
},
"after": {
"label": "Post-launch (Apr–Jun)",
"events": [ /* 5–2000 events */ ]
},
"question": "Did the product change affect customer frustration?"
}Returns 202 Accepted with a session_id and poll_url. Poll GET /drift/:sessionId until complete. Rate limit: 10 drift sessions per hour per key.
GET /drift/:sessionId
Returns the drift analysis when complete, overall_drift, direction, plain_summary, plain_recommendations, key_findings, and dimension_drifts.
POST /webhooks
Register a URL to receive intelligence outputs via HTTP POST. The payload is signed with HMAC-SHA256 using the secret returned at creation.
{
"url": "https://yourapp.com/webhooks/bie",
"events": ["intelligence.ready"]
}Response, 201 Created
{
"id": "wh_abc123",
"url": "https://yourapp.com/webhooks/bie",
"secret": "whsec_a1b2c3d4e5f6...",
"events": ["intelligence.ready"],
"created_at": "2026-04-01T14:30:00Z"
}secret is shown exactly once at creation time. Store it before dismissing the response, it cannot be retrieved later.GET /webhooks
Returns all active webhooks for the authenticated key: id, url, events, last_delivery_at, and failure_count.
Rate limits
Every response includes standard rate limit headers so you can back off gracefully:
| Header | Meaning |
|---|---|
| X-RateLimit-Limit | Maximum requests allowed in the current window |
| X-RateLimit-Remaining | Requests left before you hit the limit |
| X-RateLimit-Reset | Unix timestamp when the window resets |
| Retry-After | (429 only) seconds to wait before retrying |
Default limits are 1000 requests per hour and 10000 per day per key. Limits scale with your plan, see Billing & Rate Limits.
OpenAPI spec
The full OpenAPI 3.1 specification is served live at GET /api/v1/openapi. Feed it into Postman, Insomnia, or any OpenAPI code generator.