> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequencehq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a new Usage Event

> Create a new Usage Event



## OpenAPI

````yaml usage.2024-07-30.product.live POST /usage-events
openapi: 3.0.0
info:
  title: Usage
  description: Manage usage events and metrics
  version: '0.1'
servers:
  - url: https://dev.seqhq.io/api
    description: DEV
  - url: https://sandbox.sequencehq.com/api
    description: SANDBOX
  - url: https://eu.sequencehq.com/api
    description: PRODUCTION
security: []
tags: []
paths:
  /usage-events:
    servers: []
    parameters: []
    post:
      tags:
        - Usage Events
      summary: Create a new Usage Event
      description: Create a new Usage Event
      operationId: postUsageEvents
      parameters:
        - name: Authorization
          in: header
          description: >-
            Your [API credentials](/reference/authentication). Eg. `Basic
            {credentials}`.
          required: true
          schema:
            type: string
        - name: Sequence-Version
          in: header
          description: Use this header to select an API version
          required: false
          schema:
            type: string
            enum:
              - '2024-07-30'
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/CreateUsageEventEndpointCreateUsageEventRequestModel
              example:
                customerEventId: event-id-H4twuTWpYx1rkd8OMTki2hTUcZ
                customerAlias: customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW
                eventType: message-sent
                eventTimestamp: '2022-10-01T00:00:00Z'
                eventProperties:
                  length: 500
                  type: text_message
            examples:
              CreateUsageEventEndpointCreateUsageEventRequestModel:
                summary: ''
                value:
                  customerEventId: event-id-H4twuTWpYx1rkd8OMTki2hTUcZ
                  customerAlias: customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW
                  eventType: message-sent
                  eventTimestamp: '2022-10-01T00:00:00Z'
                  eventProperties:
                    length: 500
                    type: text_message
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CreateUsageEventEndpointProductCreateUsageEventResponseModel
                example:
                  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
              examples:
                CreateUsageEventEndpointProductCreateUsageEventResponseModel:
                  summary: ''
                  value:
                    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
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '500':
          description: Internal Server Error
          content: {}
components:
  schemas:
    CreateUsageEventEndpointCreateUsageEventRequestModel:
      required:
        - customerAlias
        - eventType
      type: object
      example:
        customerEventId: event-id-H4twuTWpYx1rkd8OMTki2hTUcZ
        customerAlias: customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW
        eventType: message-sent
        eventTimestamp: '2022-10-01T00:00:00Z'
        eventProperties:
          length: 500
          type: text_message
      properties:
        customerEventId:
          type: string
          description: >-
            ID provided by customer. Another event with the same customer event
            ID will supersede this one.
          example: event-id-H4twuTWpYx1rkd8OMTki2hTUcZ
        customerAlias:
          type: string
          description: End-customer alias or ID
          example: customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW
        eventType:
          type: string
          description: Event type. This can be referenced from a usage metric.
          example: message-sent
        eventTimestamp:
          type: string
          description: Event timestamp, in ISO 8601 format.
          example: '2022-10-01T00:00:00Z'
        eventProperties:
          type: object
          description: Event properties. These can be referenced by a usage metric.
          additionalProperties: {}
    CreateUsageEventEndpointProductCreateUsageEventResponseModel:
      required:
        - customerAlias
        - customerEventId
        - eventProperties
        - eventTimestamp
        - eventType
        - id
        - sequenceAccountId
      type: object
      example:
        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
      properties:
        id:
          type: string
          description: Unique ID
          example: 0184421a-8202-70ea-a729-30308a40bbf7
        customerEventId:
          type: string
          description: >-
            ID provided by customer. Another event with the same customer event
            ID will supersede this one.
          example: event-id-H4twuTWpYx1rkd8OMTki2hTUcZ
        customerAlias:
          type: string
          description: End-customer alias or ID
          example: customer-id-2H4u5BBwBWsS5V2sroRFqJfTXpW
        eventType:
          type: string
          description: Event type. This can be referenced from a usage metric.
          example: message-sent
        sequenceAccountId:
          type: string
          description: Sequence account ID
          example: 0184421e-a9cc-711b-af93-bf0511d4d833
        eventTimestamp:
          type: string
          description: Event timestamp, in ISO 8601 format.
          example: '2022-10-01T00:00:00Z'
        eventProperties:
          type: object
          description: Event properties. These can be referenced by a usage metric.
          additionalProperties: {}

````