curl --request POST \
--url https://api.geekidea.ai/v1/organization/webhook_endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/webhooks/geekidea",
"description": "<string>",
"project_id": "proj_0192f1c3a7b87c3e9a4f5b6c7d8e9f01",
"events": [
"generation.completed",
"generation.failed"
]
}
'import requests
url = "https://api.geekidea.ai/v1/organization/webhook_endpoints"
payload = {
"url": "https://example.com/webhooks/geekidea",
"description": "<string>",
"project_id": "proj_0192f1c3a7b87c3e9a4f5b6c7d8e9f01",
"events": ["generation.completed", "generation.failed"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com/webhooks/geekidea',
description: '<string>',
project_id: 'proj_0192f1c3a7b87c3e9a4f5b6c7d8e9f01',
events: ['generation.completed', 'generation.failed']
})
};
fetch('https://api.geekidea.ai/v1/organization/webhook_endpoints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "whep_0192f1c3a7b87c3e9a4f5b6c7d8e9f01",
"object": "webhook_endpoint",
"url": "<string>",
"description": "<string>",
"project_id": "<string>",
"events": [
"<string>"
],
"status": "active",
"created_at": 123,
"secret": "<string>"
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}Create a webhook endpoint
Creates a webhook endpoint for the organization (or one project); the response includes the signing secret (whsec_…) once. When an asynchronous task completes, fails or is cancelled, a request signed per Standard Webhooks is sent; the receiver must return 2xx within 15 seconds, otherwise it is retried with backoff for about 22 hours. The URL must be https and must not point to a private network.
curl --request POST \
--url https://api.geekidea.ai/v1/organization/webhook_endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/webhooks/geekidea",
"description": "<string>",
"project_id": "proj_0192f1c3a7b87c3e9a4f5b6c7d8e9f01",
"events": [
"generation.completed",
"generation.failed"
]
}
'import requests
url = "https://api.geekidea.ai/v1/organization/webhook_endpoints"
payload = {
"url": "https://example.com/webhooks/geekidea",
"description": "<string>",
"project_id": "proj_0192f1c3a7b87c3e9a4f5b6c7d8e9f01",
"events": ["generation.completed", "generation.failed"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com/webhooks/geekidea',
description: '<string>',
project_id: 'proj_0192f1c3a7b87c3e9a4f5b6c7d8e9f01',
events: ['generation.completed', 'generation.failed']
})
};
fetch('https://api.geekidea.ai/v1/organization/webhook_endpoints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "whep_0192f1c3a7b87c3e9a4f5b6c7d8e9f01",
"object": "webhook_endpoint",
"url": "<string>",
"description": "<string>",
"project_id": "<string>",
"events": [
"<string>"
],
"status": "active",
"created_at": 123,
"secret": "<string>"
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}Authorizations
Provide your API key in the Authorization header using Bearer auth
Body
Create a webhook endpoint
Endpoint URL, must be https
1000"https://example.com/webhooks/geekidea"
Description
255Only receive events of this project (proj_ prefix); the whole organization if omitted
"proj_0192f1c3a7b87c3e9a4f5b6c7d8e9f01"
Event types to subscribe to; all generation.* events if omitted
Event types to subscribe to; all generation.* events if omitted
["generation.completed", "generation.failed"]
Response
OK
Webhook endpoint. The signing secret is returned only on creation and rotation
ID (whep_ prefix)
"whep_0192f1c3a7b87c3e9a4f5b6c7d8e9f01"
Always webhook_endpoint
"webhook_endpoint"
Endpoint URL
Description
Only receives events of this project; null means the whole organization
Subscribed event types
Subscribed event types
Status: active / disabled
"active"
Creation time (Unix seconds)
Signing secret (whsec_ prefix), returned only on creation and rotation; store it safely
