create_webhook
Register a URL to receive this company's document events.
Every document authorized, rejected, cancelled or corrected, and every received NF-e first stored (received_invoice.stored) or whose full XML arrived (received_invoice.full_document), is then sent there, signed with the secret. Confirm the URL with the user before calling: it is where their fiscal data goes. The API refuses a URL that is not HTTPS or points at a private network. Needs webhook:manage.
Calling it twice registers two endpoints, and each receives every event: list_webhooks first.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>",
"secret": "<secret>"
},
"name": "create_webhook"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Where to deliver, an https:// URL the user gave. Never one you made up. | |
| events | No | Which events to send. Every one if omitted. | |
| secret | Yes | 16 to 255 characters the user chose; every delivery is signed with it. It is never shown again, so do not repeat it back. | |
| company_id | No | UUID of the company acted for. Omit for a single company; else see list_authorized_companies. Send one, never both. | |
| company_tax_id | No | CNPJ or CPF of the company acted for, never the recipient or a taxpayer looked up. Omit for a single company; else see list_authorized_companies. Send one, never both. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Pass it to delete_webhook. | |
| url | No | ||
| events | No | The events sent there. Empty means every event. | |
| is_active | No | ||
| created_at | No | ||
| environment | No |