Skip to content

Push row changes to a URL (a service that would rather be called than poll `list_changes`): batches of up to 100 events POSTed as `{webhook, events, last}`, signed with `X-Datanotes-Signature: sha256=<HMAC of the body>`, retried with backoff until a 2xx. Events are those of `list_changes` (hand edits with their `violations`; the hand edits the service has seen are recorded before it stops). Starts from now unless `since`. Returns the webhook with its `secret` — shown only here: give it to the receiver. Only on the user's explicit request: a webhook sends the database's changes (and, with `since`, its past ones) to that address.

POST
/datanotes/operations/create_webhook/
curl --request POST \
--url https://example.com/datanotes/operations/create_webhook/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Datanotes-Actor: {"harness":"my-script","model":"","session":"s-1"}' \
--data '{ "url": "example", "tables": null, "kinds": null, "columns": null, "exclude_actor": null, "where": null, "since": null }'

Push row changes to a URL (a service that would rather be called than poll list_changes): batches of up to 100 events POSTed as {webhook, events, last}, signed with X-Datanotes-Signature: sha256=<HMAC of the body>, retried with backoff until a 2xx. Events are those of list_changes (hand edits with their violations; the hand edits the service has seen are recorded before it stops). Starts from now unless since. Returns the webhook with its secret — shown only here: give it to the receiver. Only on the user’s explicit request: a webhook sends the database’s changes (and, with since, its past ones) to that address.

X-Datanotes-Actor
string

JSON: on whose behalf the write is made, recorded in the journal (harness, model, session).

Example

{"harness":"my-script","model":"","session":"s-1"}
Media typeapplication/json
object
url
required
string
tables
Any of:
Array<string>
kinds
Any of:
Array<string>
Allowed values: insert update delete move metastore tool_call unreadable
columns
Any of:
Array<string>
exclude_actor
Any of:
string
where
Any of:
object
key
additional properties
any
since
Any of:
integer

Done.

Media typeapplication/json

The webhook created, with its secret.

object
id
required

Webhook id (wh_…).

string
url
required

Receiver URL.

string
tables
Array<string>
kinds
Array<string>
Allowed values: insert update delete move metastore tool_call unreadable
columns
Array<string>
exclude_actor
string
where

Row filter.

object
key
additional properties
any
enabled
required
boolean
cursor
required

Last sequence number delivered (or skipped by the filter).

integer
created_at
required

ISO date-time.

string
last_delivery

ISO date-time of the last delivery.

string
last_error
string
failures
required

Consecutive failed deliveries.

integer
status
required

Delivery state.

string
Allowed values: ok failing disabled
secret
required

HMAC secret for X-Datanotes-Signature: shown only here.

string

Example

{
"kinds": [
"insert"
],
"status": "ok"
}

Bad input: the body is not a JSON object, or an argument is unknown, missing or of the wrong type.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}

Missing or wrong bearer token.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}

A named token beyond its permissions (the engine’s administration, tables outside its write patterns, schema changes without ddl).

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}

Unexpected error.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}