Skip to main content
POST
Create a new usage event

Authorizations

Authorization
string
header
required

Use the /v1/oauth2/token endpoint to obtain an access token and pass it as a Bearer token in the Authorization header.

Body

application/json
transaction_id
string
required

Unique identifier for the transaction associated with the event

Example:

"txn_1234567890abcdef"

external_subscription_id
string
required

External subscription ID associated with the event

Example:

"sub_1234567890abcdef"

metric_code
string
required

Identifier for the targeted metric. This value must match the code property of an active metric; otherwise, it will be disregarded during processing.

Example:

"event_code_123456"

timestamp
string<date-time>

Timestamp when the event occurred

Example:

"2023-01-01T00:00:00Z"

properties
object

Response

Event created successfully

transaction_id
string
required

Unique identifier for the transaction associated with the event

Example:

"txn_1234567890abcdef"

external_subscription_id
string
required

External subscription ID associated with the event

Example:

"sub_1234567890abcdef"

metric_code
string
required

Identifier for the targeted metric. This value must match the code property of an active metric; otherwise, it will be disregarded during processing.

Example:

"event_code_123456"

timestamp
string<date-time>

Timestamp when the event occurred

Example:

"2023-01-01T00:00:00Z"

properties
object
id
string

Unique identifier for the event

Example:

"evt_1234567890abcdef"

created_at
string<date-time>

Timestamp when the event was created

Example:

"2023-01-01T00:00:00Z"