# Create event `POST` `/events` Creates a new event ## Request body - **event** (`object`, required) - **timestamp** (`date-time | null`) — Date and time when the event was generated in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. If not sent, the current time will be used. The maximum period for retroactive submission (backfill) is 24 hours. Future timestamps are not allowed. - **id** (`string`, required) — Unique identifier code for the entity. Reuse the same code to send different events for the same entity. - **type** (`string`, required) — Event type ID - **attributes** (`object`, required) — Event data according to the configured fields. - **rule** (`object | null`) — Optionally specify the rule to be applied. - **name** (`string | null`) — Name of the rule, as previously registered. If the specified rule does not exist, has no published active version, or does not belong to this event type, the request will not fail and no rule will be executed. ```json { "event": { "timestamp": "2024-01-01T00:00:00Z", "id": "string", "type": "transaction", "attributes": { "amount": "120.50", "status": "paid" }, "rule": { "name": "minha_regra" } } } ``` ## Responses ### 201 — Event created successfully ### 401 — Invalid access credentials - **errors** (`array`) - **field** (`string`) — Request field where the error occurred - **type** (`string`) — Error type code - **message** (`string`) — Error message ```json { "errors": [ { "field": "string", "type": "string", "message": "string" } ] } ``` ### 422 — Invalid parameters - **errors** (`array`) - **field** (`string`) — Request field where the error occurred - **type** (`string`) — Error type code - **message** (`string`) — Error message ```json { "errors": [ { "field": "string", "type": "string", "message": "string" } ] } ```