Skip to main content
PUT
Overwrite event

Authorizations

X-API-KEY
string
header
required

API Key Authentication.

Path Parameters

idempotencyKey
string
required

The key that you give the event, the same in all its versions.

Pattern: ^[a-zA-Z0-9_-]+$

Body

application/json

The event with the idempotencyKey: its properties, value included, replace those of the recorded event, and its eventName, customerExternalId and occurredAt are those of the recorded event, which stay the same in all its versions.

eventName
string
required

The event name, which the event filter of a resource matches to count the event.

Pattern: ^[a-zA-Z0-9_-]+$
Example:

"api_request"

customerExternalId
string
required

The external id of the customer of the event: the key that you give the customer.

Pattern: ^[a-zA-Z0-9_-]+$
Example:

"cust_1234567890abcdef"

properties
object
required

A dictionary of additional properties associated with the event.

Example:
occurredAt
string<date-time>
required

The moment when the event occurred, in ISO 8601 with its time zone: Z for UTC, or an offset such as -03:00 for Brasília time. Aira refuses a moment without a time zone. Aira always converts the moment to UTC, so 2024-01-01T09:00:00-03:00 becomes 2024-01-01T12:00:00Z.

Examples:

"2024-01-01T12:00:00Z"

"2024-01-01T09:00:00-03:00"

Response

An event: one usage record that you send for a customer, with an event name, properties and a time.

id
string<uuid>
required

The unique identifier of this version of the event in our system.

idempotencyKey
string
required

The key that you give the event, the same in all its versions.

Pattern: ^[a-zA-Z0-9_-]+$
Example:

"123e4567-e89b-12d3-a456-426614174000"

eventName
string
required

The event name, which the event filter of a resource matches to count the event.

Pattern: ^[a-zA-Z0-9_-]+$
Example:

"api_request"

customerExternalId
string
required

The external id of the customer of the event: the key that you give the customer.

Pattern: ^[a-zA-Z0-9_-]+$
Example:

"cust_1234567890abcdef"

properties
object
required

A dictionary of additional properties associated with the event.

Example:
occurredAt
string<date-time>
required

The moment when the event occurred, in ISO 8601 with its time zone: Z for UTC, or an offset such as -03:00 for Brasília time. Aira refuses a moment without a time zone. Aira always converts the moment to UTC, so 2024-01-01T09:00:00-03:00 becomes 2024-01-01T12:00:00Z.

Examples:

"2024-01-01T12:00:00Z"

"2024-01-01T09:00:00-03:00"

createdAt
string<date-time>
required

ISO 8601 timestamp in UTC indicating when Aira recorded this version of the event.

archivedAt
string<date-time> | null
required

ISO 8601 timestamp in UTC indicating when the event was archived, or null if it is active.

version
integer
required

The version of the event: 1 is the first record of its idempotency key, and each overwrite or archive adds one.