Skip to content
Reference

Webhooks

Signed notifications of changes to your HTTPS addresses and a feed of the same events. A notification is never proof of fiscalization.

11 operations

Event feed

get/v1/events

Scopewebhooks:read

The same events that webhooks push, oldest first, for the last 30 days. Keep `nextCursor` and send it as `after` next time; when nothing new happened, the same cursor comes back.

Contract notes (OpenAPI)

Keep `nextCursor` and send it as `after` on the next call; with nothing new the same cursor comes back. Events appear a moment after they commit and stay for 30 days. Test events never appear. Scoped to the caller's environment like every other read.

Parameters

listEvents: Parameters
FieldDescription
afteroptionalIn: queryType: stringOpaque cursor from a previous page.

pattern ^[0-9]{1,19}$

typesoptionalIn: queryType: stringComma-separated event types to include.
limitoptionalIn: queryType: integer

>= 1<= 200default 100

Responses

listEvents: Responses
200OKPage of eventsWebhookEventPage
422Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
Response: WebhookEventPage

Field descriptions come from the OpenAPI contract; field names and values are identical in both languages.

listEvents: Response
FieldDescription
itemsrequiredType: array<WebhookEvent>
idrequiredType: uuid
typerequiredType: stringA WebhookEventType, or webhook-endpoint.test on a pushed test event.
timestamprequiredType: date-timeWhen the change happened, not when it was delivered.
environmentrequiredType: string

Valuessandboxproduction

datarequiredType: WebhookFiscalDocumentData | WebhookReceiptDeliveryData | WebhookSecurityElementData | WebhookLicenseData | WebhookTestData

One of: WebhookFiscalDocumentData | WebhookReceiptDeliveryData | WebhookSecurityElementData | WebhookLicenseData | WebhookTestData

WebhookFiscalDocumentData
fiscalDocumentIdrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
statusrequiredType: string

ValuesFISCALIZEDOUTCOME_UNKNOWN

invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

clientReferencerequiredType: string | null (nullable)
idempotencyKeyrequiredType: string
pfrInvoiceNumberrequiredType: string | null (nullable)
pfrSdcTimerequiredType: date-time | null (nullable)
totalAmountrequiredType: number | null (nullable)
verificationUrlrequiredType: uri | null (nullable)
failureCoderequiredType: string | null (nullable)
WebhookReceiptDeliveryData
receiptDeliveryIdrequiredType: uuid
fiscalDocumentIdrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
channelrequiredType: const "EMAIL"
statusrequiredType: string

ValuesDELIVEREDFAILED

attemptsrequiredType: integer

>= 1

deliveredAtrequiredType: date-time | null (nullable)
failureCoderequiredType: string | null (nullable)
WebhookSecurityElementData
securityElementIdrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
jidrequiredType: string
statusrequiredType: string

Valuesactivesuspendedretired

certificateNotAfterrequiredType: date-time
expiryStatusoptionalType: stringOnly on security-element.expiring.

Valueswarningcritical

daysRemainingoptionalType: integerWhole days until the certificate expires; only on security-element.expiring.

>= 0

WebhookLicenseData
statusrequiredType: string

Valuesactivesuspended

startsOnrequiredType: date
endsOnrequiredType: date | null (nullable)
advanceModuleEnabledrequiredType: boolean
emailModuleEnabledrequiredType: boolean
WebhookTestData
webhookEndpointIdrequiredType: uuid
nextCursorrequiredType: string | null (nullable)Send as after next time; null only before the first event.
hasMorerequiredType: boolean

Read an event

get/v1/events/{eventId}

Scopewebhooks:read

One event from the last 30 days, the same shape as the webhook body. Test events cannot be read here.

Parameters

getEvent: Parameters
FieldDescription
eventIdrequiredIn: pathType: uuid

Responses

getEvent: Responses
200OKEventWebhookEvent
404Not FoundResource does not exist within the authenticated tenant scopeErrorCode
Response: WebhookEvent

Field descriptions come from the OpenAPI contract; field names and values are identical in both languages.

getEvent: Response
FieldDescription
idrequiredType: uuid
typerequiredType: stringA WebhookEventType, or webhook-endpoint.test on a pushed test event.
timestamprequiredType: date-timeWhen the change happened, not when it was delivered.
environmentrequiredType: string

Valuessandboxproduction

datarequiredType: WebhookFiscalDocumentData | WebhookReceiptDeliveryData | WebhookSecurityElementData | WebhookLicenseData | WebhookTestData

One of: WebhookFiscalDocumentData | WebhookReceiptDeliveryData | WebhookSecurityElementData | WebhookLicenseData | WebhookTestData

WebhookFiscalDocumentData
fiscalDocumentIdrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
statusrequiredType: string

ValuesFISCALIZEDOUTCOME_UNKNOWN

invoiceTyperequiredType: InvoiceType

ValuesNORMALPROFORMACOPYTRAININGADVANCE

transactionTyperequiredType: TransactionType

ValuesSALEREFUND

clientReferencerequiredType: string | null (nullable)
idempotencyKeyrequiredType: string
pfrInvoiceNumberrequiredType: string | null (nullable)
pfrSdcTimerequiredType: date-time | null (nullable)
totalAmountrequiredType: number | null (nullable)
verificationUrlrequiredType: uri | null (nullable)
failureCoderequiredType: string | null (nullable)
WebhookReceiptDeliveryData
receiptDeliveryIdrequiredType: uuid
fiscalDocumentIdrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
channelrequiredType: const "EMAIL"
statusrequiredType: string

ValuesDELIVEREDFAILED

attemptsrequiredType: integer

>= 1

deliveredAtrequiredType: date-time | null (nullable)
failureCoderequiredType: string | null (nullable)
WebhookSecurityElementData
securityElementIdrequiredType: uuid
taxpayerIdrequiredType: uuid
businessPremiseIdrequiredType: uuid
jidrequiredType: string
statusrequiredType: string

Valuesactivesuspendedretired

certificateNotAfterrequiredType: date-time
expiryStatusoptionalType: stringOnly on security-element.expiring.

Valueswarningcritical

daysRemainingoptionalType: integerWhole days until the certificate expires; only on security-element.expiring.

>= 0

WebhookLicenseData
statusrequiredType: string

Valuesactivesuspended

startsOnrequiredType: date
endsOnrequiredType: date | null (nullable)
advanceModuleEnabledrequiredType: boolean
emailModuleEnabledrequiredType: boolean
WebhookTestData
webhookEndpointIdrequiredType: uuid

List webhook endpoints

get/v1/webhook-endpoints

Scopewebhooks:read

The endpoints of your credential's environment, with their state (enabled or disabled and why), the last success and failure, and who added them. Removed endpoints are not listed.

Contract notes (OpenAPI)

A machine credential sees the endpoints of its own environment. A customer Owner or Administrator sees both environments unless the organization hides its sandbox data. Deleted endpoints are not listed.

Responses

listWebhookEndpoints: Responses
200OKWebhook endpointsWebhookEndpointList
Response: WebhookEndpointList

Field descriptions come from the OpenAPI contract; field names and values are identical in both languages.

listWebhookEndpoints: Response
FieldDescription
itemsrequiredType: array<WebhookEndpoint>
idrequiredType: uuid
environmentrequiredType: string

Valuessandboxproduction

urlrequiredType: uri

max 2048

descriptionrequiredType: string | null (nullable)

max 200

eventTypesrequiredType: array<WebhookEventType>

Valuesfiscal-document.fiscalizedfiscal-document.outcome-unknownreceipt-delivery.deliveredreceipt-delivery.failedsecurity-element.activatedsecurity-element.suspendedsecurity-element.retiredsecurity-element.expiringlicense.updatedmin 1 items

enabledrequiredType: boolean
statusrequiredType: string

Valuesenableddisabled

disabledReasonrequiredType: string | null (nullable)failing means 72 hours of failed deliveries without a single success; revoked means the API key or AI connection that registered the endpoint was revoked, or the AI connection lost its webhooks permission. `PUT` with `enabled: true` switches it back on.

Valuesmanualfailingrevoked

failingSincerequiredType: date-time | null (nullable)
lastSuccessAtrequiredType: date-time | null (nullable)
lastFailureAtrequiredType: date-time | null (nullable)
createdByrequiredType: objectWho registered the endpoint. The name is returned to Owners and Administrators only, never to a machine credential.
kindrequiredType: string

Valuespersonapi-credentialai-connectionunknown

namerequiredType: string | null (nullable)

max 200

createdAtrequiredType: date-time
updatedAtrequiredType: date-time

Add a webhook endpoint

post/v1/webhook-endpoints

Scopewebhooks:write

Registers a public HTTPS address and the event types it receives. A credential always registers in its own environment, so it may omit `environment`. The same `url` exists only once per environment (`409` returns the existing endpoint), and an organization has at most ten endpoints per environment.

Contract notes (OpenAPI)

The URL must be absolute https without user information or a fragment and must resolve to a public address; it is checked again at every connection. A machine credential registers in its own environment and may omit `environment`; a human must name it. One live endpoint per URL and environment: registering the same URL again answers 409 with the existing `webhookEndpointId`. At most ten endpoints per organization and environment. Free in the base licence.

Request bodyapplication/json

createWebhookEndpoint: Request body
FieldDescription
urlrequiredType: uri

max 2048

descriptionoptionalType: string | null (nullable)

max 200

eventTypesrequiredType: array<WebhookEventType>

Valuesfiscal-document.fiscalizedfiscal-document.outcome-unknownreceipt-delivery.deliveredreceipt-delivery.failedsecurity-element.activatedsecurity-element.suspendedsecurity-element.retiredsecurity-element.expiringlicense.updatedmin 1 items

environmentoptionalType: string | null (nullable)Required for humans; a machine credential may omit it and always uses its own environment.

Valuessandboxproduction

Responses

createWebhookEndpoint: Responses
201CreatedEndpoint createdWebhookEndpoint
409ConflictThe URL is already registered in this environment, or the endpoint limit is reachedWebhookEndpointConflict
422Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
Response: WebhookEndpoint

Field descriptions come from the OpenAPI contract; field names and values are identical in both languages.

createWebhookEndpoint: Response
FieldDescription
idrequiredType: uuid
environmentrequiredType: string

Valuessandboxproduction

urlrequiredType: uri

max 2048

descriptionrequiredType: string | null (nullable)

max 200

eventTypesrequiredType: array<WebhookEventType>

Valuesfiscal-document.fiscalizedfiscal-document.outcome-unknownreceipt-delivery.deliveredreceipt-delivery.failedsecurity-element.activatedsecurity-element.suspendedsecurity-element.retiredsecurity-element.expiringlicense.updatedmin 1 items

enabledrequiredType: boolean
statusrequiredType: string

Valuesenableddisabled

disabledReasonrequiredType: string | null (nullable)failing means 72 hours of failed deliveries without a single success; revoked means the API key or AI connection that registered the endpoint was revoked, or the AI connection lost its webhooks permission. `PUT` with `enabled: true` switches it back on.

Valuesmanualfailingrevoked

failingSincerequiredType: date-time | null (nullable)
lastSuccessAtrequiredType: date-time | null (nullable)
lastFailureAtrequiredType: date-time | null (nullable)
createdByrequiredType: objectWho registered the endpoint. The name is returned to Owners and Administrators only, never to a machine credential.
kindrequiredType: string

Valuespersonapi-credentialai-connectionunknown

namerequiredType: string | null (nullable)

max 200

createdAtrequiredType: date-time
updatedAtrequiredType: date-time

Read a webhook endpoint

get/v1/webhook-endpoints/{webhookEndpointId}

Scopewebhooks:read

One endpoint by identifier, the same fields as the list.

Parameters

getWebhookEndpoint: Parameters
FieldDescription
webhookEndpointIdrequiredIn: pathType: uuid

Responses

getWebhookEndpoint: Responses
200OKWebhook endpointWebhookEndpoint
404Not FoundResource does not exist within the authenticated tenant scopeErrorCode
Response: WebhookEndpoint

Field descriptions come from the OpenAPI contract; field names and values are identical in both languages.

getWebhookEndpoint: Response
FieldDescription
idrequiredType: uuid
environmentrequiredType: string

Valuessandboxproduction

urlrequiredType: uri

max 2048

descriptionrequiredType: string | null (nullable)

max 200

eventTypesrequiredType: array<WebhookEventType>

Valuesfiscal-document.fiscalizedfiscal-document.outcome-unknownreceipt-delivery.deliveredreceipt-delivery.failedsecurity-element.activatedsecurity-element.suspendedsecurity-element.retiredsecurity-element.expiringlicense.updatedmin 1 items

enabledrequiredType: boolean
statusrequiredType: string

Valuesenableddisabled

disabledReasonrequiredType: string | null (nullable)failing means 72 hours of failed deliveries without a single success; revoked means the API key or AI connection that registered the endpoint was revoked, or the AI connection lost its webhooks permission. `PUT` with `enabled: true` switches it back on.

Valuesmanualfailingrevoked

failingSincerequiredType: date-time | null (nullable)
lastSuccessAtrequiredType: date-time | null (nullable)
lastFailureAtrequiredType: date-time | null (nullable)
createdByrequiredType: objectWho registered the endpoint. The name is returned to Owners and Administrators only, never to a machine credential.
kindrequiredType: string

Valuespersonapi-credentialai-connectionunknown

namerequiredType: string | null (nullable)

max 200

createdAtrequiredType: date-time
updatedAtrequiredType: date-time

Update a webhook endpoint

put/v1/webhook-endpoints/{webhookEndpointId}

Scopewebhooks:write

Replaces `url`, `description`, `eventTypes` and `enabled` at once; the environment never changes. With `enabled: true` it switches back on an endpoint that was disabled by hand, after 72 hours of failed deliveries or by revoking the credential that added it. When the record changed meanwhile, `409 WEBHOOK_ENDPOINT_CHANGED` asks you to read it again.

Contract notes (OpenAPI)

`enabled: true` re-enables an endpoint that was switched off by hand or after 72 hours of failed deliveries; delivery resumes with new events. The environment never changes.

Parameters

putWebhookEndpoint: Parameters
FieldDescription
webhookEndpointIdrequiredIn: pathType: uuid

Request bodyapplication/json

putWebhookEndpoint: Request body
FieldDescription
urlrequiredType: uri

max 2048

descriptionoptionalType: string | null (nullable)

max 200

eventTypesrequiredType: array<WebhookEventType>

Valuesfiscal-document.fiscalizedfiscal-document.outcome-unknownreceipt-delivery.deliveredreceipt-delivery.failedsecurity-element.activatedsecurity-element.suspendedsecurity-element.retiredsecurity-element.expiringlicense.updatedmin 1 items

enabledrequiredType: boolean

Responses

putWebhookEndpoint: Responses
200OKUpdated endpointWebhookEndpoint
404Not FoundResource does not exist within the authenticated tenant scopeErrorCode
409Conflict`WEBHOOK_ENDPOINT_URL_EXISTS` when another endpoint of this environment already uses the URL; `WEBHOOK_ENDPOINT_CHANGED` when the endpoint changed meanwhile (a delivery result is recorded on it after every attempt): read it again and repeat the change.Conflict
422Unprocessable ContentThe command violates a Boka or fiscal ruleErrorCode
Response: WebhookEndpoint

Field descriptions come from the OpenAPI contract; field names and values are identical in both languages.

putWebhookEndpoint: Response
FieldDescription
idrequiredType: uuid
environmentrequiredType: string

Valuessandboxproduction

urlrequiredType: uri

max 2048

descriptionrequiredType: string | null (nullable)

max 200

eventTypesrequiredType: array<WebhookEventType>

Valuesfiscal-document.fiscalizedfiscal-document.outcome-unknownreceipt-delivery.deliveredreceipt-delivery.failedsecurity-element.activatedsecurity-element.suspendedsecurity-element.retiredsecurity-element.expiringlicense.updatedmin 1 items

enabledrequiredType: boolean
statusrequiredType: string

Valuesenableddisabled

disabledReasonrequiredType: string | null (nullable)failing means 72 hours of failed deliveries without a single success; revoked means the API key or AI connection that registered the endpoint was revoked, or the AI connection lost its webhooks permission. `PUT` with `enabled: true` switches it back on.

Valuesmanualfailingrevoked

failingSincerequiredType: date-time | null (nullable)
lastSuccessAtrequiredType: date-time | null (nullable)
lastFailureAtrequiredType: date-time | null (nullable)
createdByrequiredType: objectWho registered the endpoint. The name is returned to Owners and Administrators only, never to a machine credential.
kindrequiredType: string

Valuespersonapi-credentialai-connectionunknown

namerequiredType: string | null (nullable)

max 200

createdAtrequiredType: date-time
updatedAtrequiredType: date-time

Remove a webhook endpoint

delete/v1/webhook-endpoints/{webhookEndpointId}

Scopewebhooks:write

Removes the endpoint and cancels its pending deliveries. The answer is `204` with no body; `409 WEBHOOK_ENDPOINT_CHANGED` means read the endpoint and repeat the removal.

Contract notes (OpenAPI)

Pending deliveries are cancelled; the delivery history is kept.

Parameters

deleteWebhookEndpoint: Parameters
FieldDescription
webhookEndpointIdrequiredIn: pathType: uuid

Responses

deleteWebhookEndpoint: Responses
204No ContentEndpoint removed
404Not FoundResource does not exist within the authenticated tenant scopeErrorCode
409Conflict`WEBHOOK_ENDPOINT_CHANGED`: the endpoint changed meanwhile; read it again and repeat the removal.Conflict
Response: ErrorCode

Field descriptions come from the OpenAPI contract; field names and values are identical in both languages.

deleteWebhookEndpoint: Response
FieldDescription
coderequiredType: string
messageoptionalType: string

Delivery history

get/v1/webhook-endpoints/{webhookEndpointId}/deliveries

Scopewebhooks:read

The latest 100 deliveries to the endpoint, newest first, with the attempt count, the next attempt and the outcome of the last one (`lastStatusCode`, `lastFailureCode`).

Parameters

listWebhookDeliveries: Parameters
FieldDescription
webhookEndpointIdrequiredIn: pathType: uuid

Responses

listWebhookDeliveries: Responses
200OKDeliveriesWebhookDeliveryList
404Not FoundResource does not exist within the authenticated tenant scopeErrorCode
Response: WebhookDeliveryList

Field descriptions come from the OpenAPI contract; field names and values are identical in both languages.

listWebhookDeliveries: Response
FieldDescription
itemsrequiredType: array<WebhookDelivery>
idrequiredType: uuid
eventIdrequiredType: uuid
eventTyperequiredType: string
statusrequiredType: string

Valuespendingsendingsucceededfailedcancelled

attemptsrequiredType: integer

>= 0

nextAttemptAtrequiredType: date-time | null (nullable)
lastAttemptAtrequiredType: date-time | null (nullable)
lastStatusCoderequiredType: integer | null (nullable)
lastFailureCoderequiredType: string | null (nullable)

ValuesHTTP_STATUSREDIRECT_NOT_FOLLOWEDTIMEOUTCONNECTION_FAILEDDNS_FAILEDTLS_FAILEDTARGET_NOT_PUBLICINVALID_TARGET

createdAtrequiredType: date-time
updatedAtrequiredType: date-time

Resend a delivery

post/v1/webhook-endpoints/{webhookEndpointId}/deliveries/{webhookDeliveryId}/resend

Scopewebhooks:write

One more attempt right away, outside the retry schedule, for a succeeded, failed or cancelled delivery of an enabled endpoint. A failed resend does not start a new retry series.

Contract notes (OpenAPI)

Allowed for succeeded, failed and cancelled deliveries of an enabled endpoint. A failed resend does not start a new retry series.

Parameters

resendWebhookDelivery: Parameters
FieldDescription
webhookEndpointIdrequiredIn: pathType: uuid
webhookDeliveryIdrequiredIn: pathType: uuid

Responses

resendWebhookDelivery: Responses
202AcceptedDelivery queued againWebhookDelivery
404Not FoundResource does not exist within the authenticated tenant scopeErrorCode
409Conflict`WEBHOOK_DELIVERY_IN_PROGRESS` while the delivery is still queued or sending, `WEBHOOK_ENDPOINT_DISABLED` when the endpoint is switched off, `WEBHOOK_DELIVERY_CHANGED` when the delivery changed meanwhile.Conflict
Response: WebhookDelivery

Field descriptions come from the OpenAPI contract; field names and values are identical in both languages.

resendWebhookDelivery: Response
FieldDescription
idrequiredType: uuid
eventIdrequiredType: uuid
eventTyperequiredType: string
statusrequiredType: string

Valuespendingsendingsucceededfailedcancelled

attemptsrequiredType: integer

>= 0

nextAttemptAtrequiredType: date-time | null (nullable)
lastAttemptAtrequiredType: date-time | null (nullable)
lastStatusCoderequiredType: integer | null (nullable)
lastFailureCoderequiredType: string | null (nullable)

ValuesHTTP_STATUSREDIRECT_NOT_FOLLOWEDTIMEOUTCONNECTION_FAILEDDNS_FAILEDTLS_FAILEDTARGET_NOT_PUBLICINVALID_TARGET

createdAtrequiredType: date-time
updatedAtrequiredType: date-time

Send a test event

post/v1/webhook-endpoints/{webhookEndpointId}/test-events

Scopewebhooks:write

Queues one `webhook-endpoint.test` event for this endpoint only, signed like every other. It never appears in the feed and never goes to another endpoint. The endpoint must be enabled.

Contract notes (OpenAPI)

The test event is never shown in the event feed and never sent to another endpoint.

Parameters

createWebhookTestEvent: Parameters
FieldDescription
webhookEndpointIdrequiredIn: pathType: uuid

Responses

createWebhookTestEvent: Responses
202AcceptedTest event queuedWebhookTestEvent
404Not FoundResource does not exist within the authenticated tenant scopeErrorCode
409ConflictThe endpoint is disabledConflict
Response: WebhookTestEvent

Field descriptions come from the OpenAPI contract; field names and values are identical in both languages.

createWebhookTestEvent: Response
FieldDescription
eventIdrequiredType: uuid

Signing public keys

get/v1/webhook-signing-keys

Scopewebhooks:read

The Ed25519 public keys that verify the signature of every webhook request. Trust every listed key: during a rotation there are two, and every delivery carries one signature per key.

Contract notes (OpenAPI)

Trust every listed key. During a rotation two keys are listed and every delivery carries one signature per key.

Responses

listWebhookSigningKeys: Responses
200OKActive public keysWebhookSigningKeyList
Response: WebhookSigningKeyList

Field descriptions come from the OpenAPI contract; field names and values are identical in both languages.

listWebhookSigningKeys: Response
FieldDescription
itemsrequiredType: array<WebhookSigningKey>
idrequiredType: string
algorithmrequiredType: const "ed25519"
publicKeyrequiredType: stringStandard Webhooks public key, whpk_ followed by the base64 raw 32-byte Ed25519 key.

pattern ^whpk_[A-Za-z0-9+/]{43}=$