---
title: "An error has been detected on an event"
method: POST
path: "event_error"
deprecated: true
---

# An error has been detected on an event

`POST event_error` (webhook)

> **Deprecated.**

An error has been detected on an event

## Headers

- `X-Lago-Signature` string, required
- `X-Lago-Signature-Algorithm` 'jwt' | 'hmac', required
- `X-Lago-Unique-Key` string, uuid, required

## Payload

- object
  - `webhook_type` 'event.error', required
  - `object_type` 'event_error', required
  - `organization_id` string, uuid, required: Unique identifier of the organization, created by Lago.
  - `event_error` EventErrorsObject, required
    - `status` integer, required: HTTP status code. It will always be 422
    - `error` string, required: HTTP error description. It will always be "Unprocessable entity"
    - `message` string, required: The validation errors that were detected on the event, serialized as a JSON string.
    - `event` EventObject, required
      - `lago_id` string, nullable: Unique identifier assigned to the event within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the event's record within the Lago system. It is an opaque identifier and is not guaranteed to be a UUID; on organizations using the ClickHouse events store it is a composite string.
      - `transaction_id` string, required: This field represents a unique identifier for the event. It is crucial for ensuring idempotency, meaning that each event can be uniquely identified and processed without causing any unintended side effects.
      - `lago_customer_id` string, uuid, nullable, required: Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system
      - `code` string, required: The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process.
      - `timestamp` string, date-time, required: The date and time at which the event occurred, in ISO 8601 format with millisecond precision and expressed in Coordinated Universal Time (UTC). When no timestamp is sent on the event, it is set to the time of event reception.
      - `precise_total_amount_cents` string, nullable: The precise total amount that was sent in the event payload. This field is used by the `dynamic` pricing model.
      - `properties` object: This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required.
        - `operation_type` 'add' | 'remove', nullable: The `operation_type` field is only necessary when adding or removing a specific unit when the targeted billable metric adopts a `unique_count_agg` aggregation method. In other cases, the `operation_type` field is not required. The valid values for the `operation_type` field are `add` or `remove`, which indicate whether the unit is being added or removed from the unique count aggregation, respectively.
      - `lago_subscription_id` string, uuid, nullable, required: Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription's record within the Lago system
      - `external_subscription_id` string, required: The unique identifier of the subscription within your application, as sent on the event. It is the value Lago uses to attach the event to a subscription.
      - `created_at` string, date-time, nullable: The creation date of the event's record in the Lago application, presented in the ISO 8601 datetime format, specifically in Coordinated Universal Time (UTC). It provides the precise timestamp of when the event's record was created within the Lago application

## Acknowledgement `200`

Return a 200 status to indicate that the data was received successfully

---

[API](https://skmtc.dev/getlago/apis/lago-api-documentation.md) - [All operations](https://skmtc.dev/getlago/apis/lago-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/getlago/apis/lago-api-documentation/revisions/b216574b9612?raw)
