Usage Events

Create a new Usage Event

Changed on

Create a new Usage Event

post/usage-events

Request

  • Base URL
    https://sandbox.sequencehq.com/api
  • URL
    https://sandbox.sequencehq.com/api/usage-events
  • Auth
    none declared. Required headers: Authorization

Headers

Authorizationstring required

Your API credentials. Eg. Basic {credentials}.

Sequence-Version'2024-07-30'

Use this header to select an API version

Request body

customerEventIdstring nullable

ID provided by customer. Another event with the same customer event ID will supersede this one.

customerAliasstring required

End-customer alias or ID

eventTypestring required

Event type. This can be referenced from a usage metric.

eventTimestampstring nullable

Event timestamp, in ISO 8601 format.

eventPropertiesobject

Event properties. These can be referenced by a usage metric.

Example request

{
  "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ",
  "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW",
  "eventType": "message-sent",
  "eventTimestamp": "2022-10-01T00:00:00Z",
  "eventProperties": {
    "length": 500,
    "type": "text_message"
  }
}

Response

Created

idstring required

Unique ID

customerEventIdstring required

ID provided by customer. Another event with the same customer event ID will supersede this one.

customerAliasstring required

End-customer alias or ID

eventTypestring required

Event type. This can be referenced from a usage metric.

sequenceAccountIdstring required

Sequence account ID

eventTimestampstring required

Event timestamp, in ISO 8601 format.

eventPropertiesobject required

Event properties. These can be referenced by a usage metric.

Example response

{
  "id": "0184421a-8202-70ea-a729-30308a40bbf7",
  "customerEventId": "event-id-H4twuTWpYx1rkd8OMTki2hTUcZ",
  "customerAlias": "customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW",
  "eventType": "message-sent",
  "sequenceAccountId": "0184421e-a9cc-711b-af93-bf0511d4d833",
  "eventTimestamp": "2022-10-01T00:00:00Z",
  "eventProperties": {
    "length": 500,
    "type": "text_message"
  }
}

Changes

    • info

      the request property became nullable

    • info

      the request property became nullable

    • warning

      deleted the header request parameter sequence-version

    • info

      added the new optional header request parameter Sequence-Version