Purpose
Theendpoint-api delivers conversation events to external HTTP endpoints. When a call starts, ends, or a message is exchanged, assistant-api emits events to endpoint-api via gRPC. This service handles fan-out to all registered webhooks, retry with exponential backoff, HMAC-SHA256 payload signing, and delivery tracking.
Port
9005 — HTTP · gRPC (cmux)Language
Go 1.25
Gin (REST) + gRPC
Storage
PostgreSQL
endpoint_db
Redis (retry job queue)Event Delivery Flow
Core Components
Webhook Registry
Webhook Registry
Each webhook is scoped to a project and subscribes to one or more event types.
| Field | Type | Description |
|---|---|---|
name | string | Human-readable label |
url | string | Destination HTTPS endpoint |
events | string[] | Subscribed event types |
is_active | bool | Enable / disable without deleting |
secret | string | HMAC signing secret |
max_retries | int | Default: 5 |
timeout_ms | int | Default: 30000 |
headers | JSON | Custom headers sent with each delivery |
Retry Strategy
Retry Strategy
| Attempt | Delay |
|---|---|
| 1 | Immediate |
| 2 | 5 seconds |
| 3 | 25 seconds |
| 4 | 2 minutes |
| 5 | 10 minutes |
408, 429, and 5xx. Status 2xx = success. Status 4xx (except 408, 429) = non-retriable failure.Payload Signing
Payload Signing
Every delivery includes an Verification (Node.js):
X-Rapida-Signature header:Event Reference
| Event | Trigger | Key Payload Fields |
|---|---|---|
conversation.started | Call begins | conversation_id, assistant_id, timestamp |
conversation.ended | Call terminates | conversation_id, duration_ms, messages_count, end_reason |
message.sent | Assistant speaks | conversation_id, message_id, content, role |
message.received | User speaks | conversation_id, message_id, content, role |
assistant.updated | Config changed | assistant_id, changes |
assistant.deleted | Assistant removed | assistant_id, timestamp |
error.occurred | Pipeline error | conversation_id, error_code, error_message |
conversation.ended:
API Endpoints
| Method | Path | Description |
|---|---|---|
GET | /readiness/ | Readiness probe |
GET | /healthz/ | Liveness probe |
POST | /api/v1/endpoint/webhooks | Create webhook |
GET | /api/v1/endpoint/webhooks | List webhooks |
GET | /api/v1/endpoint/webhooks/{id} | Get webhook |
PUT | /api/v1/endpoint/webhooks/{id} | Update webhook |
DELETE | /api/v1/endpoint/webhooks/{id} | Delete webhook |
POST | /api/v1/endpoint/webhooks/{id}/test | Send test event |
GET | /api/v1/endpoint/webhooks/{id}/deliveries | List delivery history |
POST | /api/v1/endpoint/webhooks/{id}/replay | Replay a specific event |
Running
- Docker Compose
- From Source
Health Endpoints
| Endpoint | Purpose |
|---|---|
GET /readiness/ | Service ready (DB + Redis connected) |
GET /healthz/ | Liveness probe |