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

# Ingest Billable Events

<RequestExample>
  ```json Request theme={null}
  {
    "events": [
      {
        "uniqueId": "d73bcda34d42df7868a237615e4b028b",
        "account": "customerA",
        "eventName": "data_ingested",
        "properties": {
          "volume_kb": 312845,
          "dataset_id": "45jkhp"
        },
        "timestamp": "2023-03-09T15:03:17Z"
      },
      {
        "uniqueId": "fe6a12e264634b93ba440376354f1951",
        "account": "customerB",
        "eventName": "data_ingested",
        "properties": {
          "volume_kb": 564432,
          "dataset_id": "83fghw"
        },
        "timestamp": "2023-03-09T15:03:17Z"
      }
    ]
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "ingested": [
      "d73bcda34d42df7868a237615e4b028b",
      "fe6a12e264634b93ba440376354f1951"
    ],
    "failed": []
  }
  ```
</ResponseExample>

The event ingestion endpoint accepts a list of up to 100 events per request. Each event is passed
with a client-defined `uniqueId` which acts as an idempotency key, allowing you to send the same events
multiple times without worrying about duplicate data.

## Event Format

<ParamField body="uniqueId" type="string" required>
  Uniquely identifies the billable event, with a maximum length of 255
  characters. It is recommended to use an ID format that is collision resistant,
  such as a UUID.
</ParamField>

<ParamField body="account" type="string" required>
  Associates the billable event with a customer account. This can either be the
  Alguna account ID, or an alias that you have defined for the account.
</ParamField>

<ParamField body="eventName" type="string" required>
  The name of the event, used to logically group when creating a metric.
</ParamField>

<ParamField body="properties" type="object">
  An optional map of keys and values that further describe the event. These can
  either be used to segment the event when creating a metric through filtering,
  or describe attributes on which the metric is calculated. The properties
  object can contain up to 50 key-value pairs, all keys must be strings and
  values must be strings, integers or floats. Is is not possible to nest
  properties.
</ParamField>

<ParamField body="timestamp" type="datetime">
  The time at which the event occured, in RFC3339 format. If not provided, the
  current time will be used.
</ParamField>

## Response

<ResponseField name="ingested" type="[]string" required>
  The list of `uniqueId` values that were successfully ingested.
</ResponseField>

<ResponseField name="failed" type="[]string" required>
  The list of `uniqueId` values that were not ingested, if any.
</ResponseField>
