openapi: 3.0.3 info: title: Agnost AI Alerts Conversations API description: 'Complete REST API for Agnost AI: an analytics and monitoring platform for AI agents. **Authentication**: - SDK ingestion endpoints (`/api/v1/*`) use `x-org-id` header (UUID) - Dashboard endpoints use `Authorization: Bearer ` + `x-org-id` header, or `x-api-key` header - API key management uses JWT only (no API key auth) ' version: 2.1.2 contact: name: Agnost AI url: https://agnost.ai servers: - url: https://api.agnost.ai description: Production tags: - name: Conversations description: Conversation message and span retrieval paths: /dashboard/api/conversation-messages: post: tags: - Conversations summary: Get conversation messages operationId: getConversationMessages security: - BearerAuth: [] OrgScope: [] - ApiKey: [] requestBody: content: application/json: schema: type: object required: - conversation_id properties: conversation_id: type: string format: uuid responses: '200': description: Conversation messages with I/O data /dashboard/api/conversation-spans: post: tags: - Conversations summary: Get conversation spans (trace) operationId: getConversationSpans security: - BearerAuth: [] OrgScope: [] - ApiKey: [] requestBody: content: application/json: schema: type: object required: - conversation_id properties: conversation_id: type: string format: uuid event_id: type: string format: uuid description: Optional. Filter to ancestors/descendants of this event responses: '200': description: Span hierarchy for the conversation /dashboard/api/conversation-audio: get: tags: - Conversations summary: Get a presigned URL for a conversation's recorded audio description: 'Returns a short-lived presigned URL the dashboard uses to play back recorded audio for a voice conversation. The audio is stored in object storage and only addressable through this endpoint. ' operationId: getConversationAudio security: - BearerAuth: [] OrgScope: [] - ApiKey: [] parameters: - name: conversation_id in: query required: true schema: type: string format: uuid responses: '200': description: Presigned audio URL content: application/json: schema: type: object properties: url: type: string format: uri expires_at: type: string format: date-time '404': description: No audio recorded for this conversation /dashboard/api/conversation-detail: post: tags: - Conversations summary: Get conversation detail (messages + spans combined) operationId: getConversationDetail security: - BearerAuth: [] OrgScope: [] - ApiKey: [] requestBody: content: application/json: schema: type: object required: - conversation_id properties: conversation_id: type: string format: uuid responses: '200': description: Combined messages and spans content: application/json: schema: type: object properties: messages: type: object spans: type: object /dashboard/api/spotlight-search: post: tags: - Conversations summary: Semantic search across conversations operationId: spotlightSearch security: - BearerAuth: [] OrgScope: [] - ApiKey: [] requestBody: content: application/json: schema: allOf: - $ref: '#/components/schemas/QueryFilters' - type: object required: - query properties: query: type: string responses: '200': description: Search results /dashboard/api/intent-keywords: post: tags: - Conversations summary: Extract intent keywords operationId: getIntentKeywords security: - BearerAuth: [] OrgScope: [] - ApiKey: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/QueryFilters' responses: '200': description: Keyword extraction results components: schemas: QueryFilters: type: object properties: time_range: $ref: '#/components/schemas/TimeRange' connection_type: oneOf: - type: string - type: array items: type: string agent_name: oneOf: - type: string - type: array items: type: string metadata_filters: type: array items: type: object properties: key: type: string value: type: string page: type: integer default: 1 page_size: type: integer default: 20 TimeRange: type: string enum: - 1min - 1h - 1d - 1w - 1m - all default: 1w securitySchemes: OrgId: type: apiKey in: header name: x-org-id description: Organization ID (UUID). Used by SDKs for event ingestion. Header is case-insensitive. BearerAuth: type: http scheme: bearer bearerFormat: JWT description: JWT token from OAuth login. ApiKey: type: apiKey in: header name: x-api-key description: API key (`agnost_<64-hex>`) for programmatic dashboard access. Issued via Settings → API Keys. OrgScope: type: apiKey in: header name: x-org-id description: Optional. Selects which organization a JWT- or API-key-authenticated request targets when the credential has access to multiple.