Webhooks
Create a webhook
POST /v1/webhooks- Permission
write:webhooks- Tokens
- API key, CLI user token
Create a session-event webhook. Save the signing secret returned once in this response. Verify the initial ping, then request activation through Support.
{
"description": str,
"url": str
}
{
"secret": str,
}
1
import os
2
3
from ellipsis import Ellipsis
4
from ellipsis import models
5
6
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
7
8
request = models.WebhookConfigRequest.model_validate(
9
{
10
"url": "https://example.com/ellipsis",
11
"events": [
12
"session.create"
13
]
14
}
15
)
16
17
result = client.webhooks.create(request.events, request.url)
18
print(result)
1
import { Ellipsis } from '@ellipsis-dev/sdk';
2
3
const client = new Ellipsis({
4
apiKey: process.env.ELLIPSIS_API_TOKEN!,
5
});
6
7
const request: Parameters<typeof client.webhooks.create>[0] = {
8
"url": "https://example.com/ellipsis",
9
"events": [
10
"session.create"
11
]
12
};
13
14
const result = await client.webhooks.create(request);
15
console.log(result);
1
curl -X POST "https://api.ellipsis.dev/v1/webhooks" \
2
-H "Authorization: Bearer $ELLIPSIS_API_TOKEN" \
3
-H "Content-Type: application/json" \
4
-d '{
5
"url": "https://example.com/ellipsis",
6
"events": [
7
"session.create"
8
]
9
}'
Request
descriptionstring
eventsarray<string>required
Explicit event subscriptions. Currently only session.create is supported. Pings are sent independently of subscriptions.
urlstringrequired
The single public HTTPS URL to receive signed POST requests. Changing it requires verification and approval again.
Response
secretstringrequired
The signing secret, returned only in this creation response. Save it now; it cannot be retrieved later.
webhookWebhookrequired