# Webhooks

## Get webhook stats

> Get stats for a webhook

```json
{"openapi":"3.0.0","info":{"title":"TradeAware API","version":"0.44.2"},"servers":[{"url":"https://api.tradeaware.live-eo.com"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"GetWebhookStatsDto":{"type":"object","properties":{"successfulMessages":{"type":"number","description":"The number of successful messages"},"failedMessages":{"type":"number","description":"The number of failed messages"}},"required":["successfulMessages","failedMessages"]}}},"paths":{"/webhooks/{id}/stats":{"get":{"description":"Get stats for a webhook","operationId":"WebhooksController_getStats","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Stats for the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWebhookStatsDto"}}}},"401":{"description":""},"403":{"description":""}},"summary":"Get webhook stats","tags":["Webhooks"]}}}}
```

## Get all webhooks

> Get all webhooks for the current business

```json
{"openapi":"3.0.0","info":{"title":"TradeAware API","version":"0.44.2"},"servers":[{"url":"https://api.tradeaware.live-eo.com"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"GetWebhookDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the webhook"},"url":{"type":"string","description":"The URL where webhook events will be sent"},"description":{"type":"object","description":"Optional description for this webhook"},"events":{"type":"array","description":"Types of events subscribed to","items":{"$ref":"#/components/schemas/WebhookEventType"}},"isActive":{"type":"boolean","description":"Whether the webhook is active"},"createdAt":{"format":"date-time","type":"string","description":"When the webhook was created"},"updatedAt":{"format":"date-time","type":"string","description":"When the webhook was last updated"}},"required":["id","url","description","events","isActive","createdAt","updatedAt"]},"WebhookEventType":{"type":"string","enum":["transaction.updated","business_invitation.updated","analysis.precision.updated","supplier_risk_assessment.updated"],"description":"Types of events to subscribe to"}}},"paths":{"/webhooks":{"get":{"description":"Get all webhooks for the current business","operationId":"WebhooksController_findAll","parameters":[],"responses":{"200":{"description":"List of webhooks for the current business","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetWebhookDto"}}}}},"401":{"description":""},"403":{"description":""}},"summary":"Get all webhooks","tags":["Webhooks"]}}}}
```

## Delete a webhook

> Delete a webhook for the current business

```json
{"openapi":"3.0.0","info":{"title":"TradeAware API","version":"0.44.2"},"servers":[{"url":"https://api.tradeaware.live-eo.com"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}}},"paths":{"/webhooks/{id}":{"delete":{"description":"Delete a webhook for the current business","operationId":"WebhooksController_remove","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"The webhook has been successfully deleted"},"401":{"description":""},"403":{"description":""},"404":{"description":"The webhook with the given ID was not found"}},"summary":"Delete a webhook","tags":["Webhooks"]}}}}
```

## Update a webhook

> Update a webhook for the current business

```json
{"openapi":"3.0.0","info":{"title":"TradeAware API","version":"0.44.2"},"servers":[{"url":"https://api.tradeaware.live-eo.com"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"UpdateWebhookDto":{"type":"object","properties":{"url":{"type":"string","description":"The URL where webhook events will be sent. Must be a valid URL with a TLD.","maxLength":2048,"format":"url"},"description":{"type":"string","description":"Optional description for this webhook","maxLength":1000},"isActive":{"type":"boolean","description":"Whether the webhook is active"}},"required":["url"]},"GetWebhookDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the webhook"},"url":{"type":"string","description":"The URL where webhook events will be sent"},"description":{"type":"object","description":"Optional description for this webhook"},"events":{"type":"array","description":"Types of events subscribed to","items":{"$ref":"#/components/schemas/WebhookEventType"}},"isActive":{"type":"boolean","description":"Whether the webhook is active"},"createdAt":{"format":"date-time","type":"string","description":"When the webhook was created"},"updatedAt":{"format":"date-time","type":"string","description":"When the webhook was last updated"}},"required":["id","url","description","events","isActive","createdAt","updatedAt"]},"WebhookEventType":{"type":"string","enum":["transaction.updated","business_invitation.updated","analysis.precision.updated","supplier_risk_assessment.updated"],"description":"Types of events to subscribe to"}}},"paths":{"/webhooks/{id}":{"patch":{"description":"Update a webhook for the current business","operationId":"WebhooksController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookDto"}}}},"responses":{"200":{"description":"The webhook has been successfully updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWebhookDto"}}}},"401":{"description":""},"403":{"description":""},"404":{"description":"The webhook with the given ID was not found"}},"summary":"Update a webhook","tags":["Webhooks"]}}}}
```

## Get a webhook by id

> Get a webhook by id

```json
{"openapi":"3.0.0","info":{"title":"TradeAware API","version":"0.44.2"},"servers":[{"url":"https://api.tradeaware.live-eo.com"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"GetWebhookDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the webhook"},"url":{"type":"string","description":"The URL where webhook events will be sent"},"description":{"type":"object","description":"Optional description for this webhook"},"events":{"type":"array","description":"Types of events subscribed to","items":{"$ref":"#/components/schemas/WebhookEventType"}},"isActive":{"type":"boolean","description":"Whether the webhook is active"},"createdAt":{"format":"date-time","type":"string","description":"When the webhook was created"},"updatedAt":{"format":"date-time","type":"string","description":"When the webhook was last updated"}},"required":["id","url","description","events","isActive","createdAt","updatedAt"]},"WebhookEventType":{"type":"string","enum":["transaction.updated","business_invitation.updated","analysis.precision.updated","supplier_risk_assessment.updated"],"description":"Types of events to subscribe to"}}},"paths":{"/webhooks/{id}":{"get":{"description":"Get a webhook by id","operationId":"WebhooksController_findById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns the webhook with the given ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWebhookDto"}}}},"401":{"description":""},"403":{"description":""},"404":{"description":"The webhook with the given ID was not found"}},"summary":"Get a webhook by id","tags":["Webhooks"]}}}}
```

## Create a new webhook

> Create a new webhook for the current business

```json
{"openapi":"3.0.0","info":{"title":"TradeAware API","version":"0.44.2"},"servers":[{"url":"https://api.tradeaware.live-eo.com"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"CreateWebhookDto":{"type":"object","properties":{"url":{"type":"string","description":"The URL where webhook events will be sent. Must be a valid URL with a TLD.","maxLength":2048,"format":"url"},"description":{"type":"string","description":"Optional description for this webhook","maxLength":1000},"events":{"type":"array","description":"Types of events to subscribe to","items":{"$ref":"#/components/schemas/WebhookEventType"}},"isActive":{"type":"boolean","description":"Whether the webhook is active","default":true}},"required":["url","events"]},"WebhookEventType":{"type":"string","enum":["transaction.updated","business_invitation.updated","analysis.precision.updated","supplier_risk_assessment.updated"],"description":"Types of events to subscribe to"},"GetWebhookDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the webhook"},"url":{"type":"string","description":"The URL where webhook events will be sent"},"description":{"type":"object","description":"Optional description for this webhook"},"events":{"type":"array","description":"Types of events subscribed to","items":{"$ref":"#/components/schemas/WebhookEventType"}},"isActive":{"type":"boolean","description":"Whether the webhook is active"},"createdAt":{"format":"date-time","type":"string","description":"When the webhook was created"},"updatedAt":{"format":"date-time","type":"string","description":"When the webhook was last updated"}},"required":["id","url","description","events","isActive","createdAt","updatedAt"]}}},"paths":{"/webhooks":{"post":{"description":"Create a new webhook for the current business","operationId":"WebhooksController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookDto"}}}},"responses":{"201":{"description":"The webhook has been successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWebhookDto"}}}},"401":{"description":""},"403":{"description":""}},"summary":"Create a new webhook","tags":["Webhooks"]}}}}
```

## Get all supported webhook events

> Get all supported webhook events

```json
{"openapi":"3.0.0","info":{"title":"TradeAware API","version":"0.44.2"},"servers":[{"url":"https://api.tradeaware.live-eo.com"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"GetWebhookListEventsDto":{"type":"object","properties":{"events":{"description":"List of supported webhook events","type":"array","items":{"type":"string"}}},"required":["events"]}}},"paths":{"/webhooks/events":{"get":{"description":"Get all supported webhook events","operationId":"WebhooksController_listSupportedEvents","parameters":[],"responses":{"200":{"description":"List of supported webhook events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWebhookListEventsDto"}}}},"401":{"description":""},"403":{"description":""}},"summary":"Get all supported webhook events","tags":["Webhooks"]}}}}
```

## Get all attempts for a webhook

> Get all attempts for a webhook

```json
{"openapi":"3.0.0","info":{"title":"TradeAware API","version":"0.44.2"},"servers":[{"url":"https://api.tradeaware.live-eo.com"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"GetWebhookAttemptDto":{"type":"object","properties":{"url":{"type":"string","description":"The URL where the webhook was sent"},"response":{"type":"string","description":"Response body from the webhook endpoint"},"responseStatusCode":{"type":"number","description":"HTTP status code of the response"},"status":{"description":"Status of the webhook attempt","allOf":[{"$ref":"#/components/schemas/WebhookAttemptStatus"}]},"msgId":{"type":"string","description":"Message ID"},"id":{"type":"string","description":"Unique identifier for the attempt"},"timestamp":{"format":"date-time","type":"string","description":"Timestamp when the attempt was made"},"msg":{"description":"Message details","allOf":[{"$ref":"#/components/schemas/WebhookMessageDto"}]}},"required":["url","response","responseStatusCode","status","msgId","id","timestamp","msg"]},"WebhookAttemptStatus":{"type":"string","enum":["SUCCESS","PENDING","FAILED","SENDING"],"description":"Status of the webhook attempt"},"WebhookMessageDto":{"type":"object","properties":{"eventType":{"description":"Type of the event","allOf":[{"$ref":"#/components/schemas/WebhookEventType"}]},"payload":{"type":"object","description":"Event payload data"},"id":{"type":"string","description":"Unique identifier for the message"},"timestamp":{"format":"date-time","type":"string","description":"Timestamp when the message was created"}},"required":["eventType","payload","id","timestamp"]},"WebhookEventType":{"type":"string","enum":["transaction.updated","business_invitation.updated","analysis.precision.updated","supplier_risk_assessment.updated"],"description":"Types of events to subscribe to"}}},"paths":{"/webhooks/{id}/attempts":{"get":{"description":"Get all attempts for a webhook","operationId":"WebhooksController_findAllAttempts","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"List of attempts for a webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWebhookAttemptDto"}}}},"401":{"description":""},"403":{"description":""}},"summary":"Get all attempts for a webhook","tags":["Webhooks"]}}}}
```

## Send example message

> Send example message to a webhook

```json
{"openapi":"3.0.0","info":{"title":"TradeAware API","version":"0.44.2"},"servers":[{"url":"https://api.tradeaware.live-eo.com"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"WebhookSendExampleDto":{"type":"object","properties":{"eventType":{"type":"string","description":"The event type to send"}},"required":["eventType"]},"WebhookSendExampleResponseDto":{"type":"object","properties":{"messageId":{"type":"string","description":"The message ID"}},"required":["messageId"]}}},"paths":{"/webhooks/{id}/send-example":{"post":{"description":"Send example message to a webhook","operationId":"WebhooksController_sendExampleMessage","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSendExampleDto"}}}},"responses":{"201":{"description":"The message ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSendExampleResponseDto"}}}},"401":{"description":""},"403":{"description":""}},"summary":"Send example message","tags":["Webhooks"]}}}}
```

## Get endpoint secret

> Get the secret for a webhook endpoint

```json
{"openapi":"3.0.0","info":{"title":"TradeAware API","version":"0.44.2"},"servers":[{"url":"https://api.tradeaware.live-eo.com"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}}},"paths":{"/webhooks/{id}/secret":{"get":{"description":"Get the secret for a webhook endpoint","operationId":"WebhooksController_getEndpointSecret","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"The secret for the webhook endpoint","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":""},"403":{"description":""}},"summary":"Get endpoint secret","tags":["Webhooks"]}}}}
```

## The WebhookMessageDto object

```json
{"openapi":"3.0.0","info":{"title":"TradeAware API","version":"0.44.2"},"components":{"schemas":{"WebhookMessageDto":{"type":"object","properties":{"eventType":{"description":"Type of the event","allOf":[{"$ref":"#/components/schemas/WebhookEventType"}]},"payload":{"type":"object","description":"Event payload data"},"id":{"type":"string","description":"Unique identifier for the message"},"timestamp":{"format":"date-time","type":"string","description":"Timestamp when the message was created"}},"required":["eventType","payload","id","timestamp"]},"WebhookEventType":{"type":"string","enum":["transaction.updated","business_invitation.updated","analysis.precision.updated","supplier_risk_assessment.updated"],"description":"Types of events to subscribe to"}}}}
```

## The WebhookSendExampleDto object

```json
{"openapi":"3.0.0","info":{"title":"TradeAware API","version":"0.44.2"},"components":{"schemas":{"WebhookSendExampleDto":{"type":"object","properties":{"eventType":{"type":"string","description":"The event type to send"}},"required":["eventType"]}}}}
```

## The WebhookSendExampleResponseDto object

```json
{"openapi":"3.0.0","info":{"title":"TradeAware API","version":"0.44.2"},"components":{"schemas":{"WebhookSendExampleResponseDto":{"type":"object","properties":{"messageId":{"type":"string","description":"The message ID"}},"required":["messageId"]}}}}
```

## The GetWebhookDto object

```json
{"openapi":"3.0.0","info":{"title":"TradeAware API","version":"0.44.2"},"components":{"schemas":{"GetWebhookDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the webhook"},"url":{"type":"string","description":"The URL where webhook events will be sent"},"description":{"type":"object","description":"Optional description for this webhook"},"events":{"type":"array","description":"Types of events subscribed to","items":{"$ref":"#/components/schemas/WebhookEventType"}},"isActive":{"type":"boolean","description":"Whether the webhook is active"},"createdAt":{"format":"date-time","type":"string","description":"When the webhook was created"},"updatedAt":{"format":"date-time","type":"string","description":"When the webhook was last updated"}},"required":["id","url","description","events","isActive","createdAt","updatedAt"]},"WebhookEventType":{"type":"string","enum":["transaction.updated","business_invitation.updated","analysis.precision.updated","supplier_risk_assessment.updated"],"description":"Types of events to subscribe to"}}}}
```

## The GetWebhookListEventsDto object

```json
{"openapi":"3.0.0","info":{"title":"TradeAware API","version":"0.44.2"},"components":{"schemas":{"GetWebhookListEventsDto":{"type":"object","properties":{"events":{"description":"List of supported webhook events","type":"array","items":{"type":"string"}}},"required":["events"]}}}}
```

## The GetWebhookStatsDto object

```json
{"openapi":"3.0.0","info":{"title":"TradeAware API","version":"0.44.2"},"components":{"schemas":{"GetWebhookStatsDto":{"type":"object","properties":{"successfulMessages":{"type":"number","description":"The number of successful messages"},"failedMessages":{"type":"number","description":"The number of failed messages"}},"required":["successfulMessages","failedMessages"]}}}}
```

## The GetWebhookAttemptDto object

```json
{"openapi":"3.0.0","info":{"title":"TradeAware API","version":"0.44.2"},"components":{"schemas":{"GetWebhookAttemptDto":{"type":"object","properties":{"url":{"type":"string","description":"The URL where the webhook was sent"},"response":{"type":"string","description":"Response body from the webhook endpoint"},"responseStatusCode":{"type":"number","description":"HTTP status code of the response"},"status":{"description":"Status of the webhook attempt","allOf":[{"$ref":"#/components/schemas/WebhookAttemptStatus"}]},"msgId":{"type":"string","description":"Message ID"},"id":{"type":"string","description":"Unique identifier for the attempt"},"timestamp":{"format":"date-time","type":"string","description":"Timestamp when the attempt was made"},"msg":{"description":"Message details","allOf":[{"$ref":"#/components/schemas/WebhookMessageDto"}]}},"required":["url","response","responseStatusCode","status","msgId","id","timestamp","msg"]},"WebhookAttemptStatus":{"type":"string","enum":["SUCCESS","PENDING","FAILED","SENDING"],"description":"Status of the webhook attempt"},"WebhookMessageDto":{"type":"object","properties":{"eventType":{"description":"Type of the event","allOf":[{"$ref":"#/components/schemas/WebhookEventType"}]},"payload":{"type":"object","description":"Event payload data"},"id":{"type":"string","description":"Unique identifier for the message"},"timestamp":{"format":"date-time","type":"string","description":"Timestamp when the message was created"}},"required":["eventType","payload","id","timestamp"]},"WebhookEventType":{"type":"string","enum":["transaction.updated","business_invitation.updated","analysis.precision.updated","supplier_risk_assessment.updated"],"description":"Types of events to subscribe to"}}}}
```

## The CreateWebhookDto object

```json
{"openapi":"3.0.0","info":{"title":"TradeAware API","version":"0.44.2"},"components":{"schemas":{"CreateWebhookDto":{"type":"object","properties":{"url":{"type":"string","description":"The URL where webhook events will be sent. Must be a valid URL with a TLD.","maxLength":2048,"format":"url"},"description":{"type":"string","description":"Optional description for this webhook","maxLength":1000},"events":{"type":"array","description":"Types of events to subscribe to","items":{"$ref":"#/components/schemas/WebhookEventType"}},"isActive":{"type":"boolean","description":"Whether the webhook is active","default":true}},"required":["url","events"]},"WebhookEventType":{"type":"string","enum":["transaction.updated","business_invitation.updated","analysis.precision.updated","supplier_risk_assessment.updated"],"description":"Types of events to subscribe to"}}}}
```

## The UpdateWebhookDto object

```json
{"openapi":"3.0.0","info":{"title":"TradeAware API","version":"0.44.2"},"components":{"schemas":{"UpdateWebhookDto":{"type":"object","properties":{"url":{"type":"string","description":"The URL where webhook events will be sent. Must be a valid URL with a TLD.","maxLength":2048,"format":"url"},"description":{"type":"string","description":"Optional description for this webhook","maxLength":1000},"isActive":{"type":"boolean","description":"Whether the webhook is active"}},"required":["url"]}}}}
```

{% embed url="<https://www.svix.com/event-types/eu/org_2wD7FG4kBiHZO91LjCvYOvuagYT/>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.live-eo.com/tradeaware/using-the-tradeaware-api/api-reference/webhooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
