Request
Copy
POST /api/events/subscriptions
Authorization: Bearer ACCESS_TOKEN
Content-Type: application/json
{
"channels": ["conversation", "memory"],
"events": ["message.new", "memory.updated"],
"filters": {
"conversation_id": "conv_6789"
},
"delivery": {
"method": "webhook",
"url": "https://example.com/webhook",
"headers": {
"X-Custom-Header": "value"
}
}
}
Response
Copy
{
"subscription_id": "sub_12345",
"channels": ["conversation", "memory"],
"events": ["message.new", "memory.updated"],
"filters": {
"conversation_id": "conv_6789"
},
"delivery": {
"method": "webhook",
"url": "https://example.com/webhook"
},
"created_at": "2023-04-10T16:40:00Z",
"status": "active"
}