Webhooks let you trigger Python datasets in Definite docs from external systems with a simple HTTPSDocumentation Index
Fetch the complete documentation index at: https://docs.definite.app/llms.txt
Use this file to discover all available pages before exploring further.
POST. Send JSON to our endpoint, and Definite will execute your doc’s Python datasets with access to your data. This enables real-time pipelines for events like meeting transcripts, signups, payments, orders, alerts, and more.
How it works
Endpoint
POST/v4/webhook/docs/{doc_id}/execute
Where {doc_id} is the UUID of the doc containing your Python dataset(s).
Authentication
Authenticate with your API key in theAuthorization header:
{user_id}-{api_key_suffix}
Get your API key from the bottom-left user menu in the Definite app.
Request Body
| Field | Type | Description |
|---|---|---|
data | object | Arbitrary JSON payload. Written as a file in the sandbox, accessible via WEBHOOK_DATA_FILE env var. |
environmentVariables | object | Additional environment variables injected into the sandbox. |
datasetKeys | string[] | Execute only these datasets. Default: all Python datasets in the doc. |
Data injection
Yourdata payload is written as a JSON file inside the execution sandbox. The file path is available via the WEBHOOK_DATA_FILE environment variable. This approach supports large payloads (e.g., full meeting transcripts) without hitting environment variable size limits.
Response
The response is wrapped in a standard v4 envelope:results corresponds to a Python dataset that was executed:
| Field | Description |
|---|---|
success | Whether the dataset executed without errors |
executionId | UUID for retrieving execution logs |
error | Error message if execution failed |
Reading webhook data in Python
Both
DEFINITE_API_KEY and DEFINITE_API_BASE_URL are automatically available in the sandbox, so you can use the Definite SDK to write data back to DuckLake.Example: Pipeline doc for webhook processing
Create a doc with a Python dataset that processes incoming webhook data:Examples
Basic webhook call
With environment variables and dataset filter
Python client
Common use cases
- Meeting transcript ingestion: Receive webhooks from Read.ai, Otter.ai, or similar services
- Event processing: Payments, signups, order lifecycle events
- Streaming ingestion: Telemetry, IoT, monitoring alerts
- Workflow automation: Trigger transformations or enrichment on external events
- Third-party callbacks: Process responses from external integrations
Best practices
- Use bearer auth in the
Authorizationheader. - Use
datasetKeysto target specific datasets when your doc has multiple. - Include an idempotency key (e.g.,
session_idindata) if your sender may retry. - Separate secrets from data: Pass secrets via
environmentVariables, not indata. - Log
executionIdfrom responses to trace runs in Definite. - Set
timeoutMson your Python dataset (default is 6s, which is too short for most webhook processing).
Troubleshooting
| Status | Cause | Fix |
|---|---|---|
| 401 | Invalid or missing API key | Check API key format and Authorization header |
| 404 | Doc not found, archived, or belongs to a different team | Verify doc ID and that your API key has access |
| 422 | Invalid request body | Validate JSON structure |
| 5xx | Server error | Retry with exponential backoff |

