---
title: "Create Event"
method: POST
path: "/v2/storage/events"
tags: ["Events"]
---

# Create Event

`POST /v2/storage/events`

## Request

- Base URL: `https://connection.keboola.com`
- URL: `https://connection.keboola.com/v2/storage/events`
- Auth: one of:
  - API key in header `X-StorageApi-Token`
  - API key in header `X-KBC-ManageApiToken`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/keboola/apis/keboola-storage-api/docs/v2/storage/events/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new external event. The maximum allowed size of an event is 200KB. If this is exceeded,
the HTTP 400 response code is returned.

`params` and `results` may be sent either as JSON objects or as serialized JSON object strings.

The branch variant creates the event for the given [Development Branch](#tag/Development-Branches).

## Request body

- CreateEventRequest
  - `component` string, required: Name of a registered component the event belongs to.
  - `message` string, required: Event message.
  - `description` string, nullable: Event description.
  - `type` 'info' | 'success' | 'warn' | 'error', nullable: Type of the event. Unknown values fall back to `info`.
  - `configurationId` string, nullable: Id of a configuration executed by the component.
  - `params` object, nullable: Custom data.
  - `results` object, nullable: Custom data.
  - `duration` number, nullable: Duration of the associated task in seconds. Stored as an integer.
  - `runId` string, nullable: Id of the associated component job.

## Response `201`

Event created.

- CreateEventResponse
  - `id` string, required: Deprecated, will be removed in the future. Contains the same value as `uuid`.
  - `uuid` string, required: UUID v7 identifier of the created event.

## Other responses

- `400`: Missing `component` or `message` (`storage.storage.events.validation`), malformed event data such as invalid JSON in `params`/`results` (`malformedRequest`), or event larger than 200KB (`requestTooLarge`).

---

[API](https://skmtc.dev/keboola/apis/keboola-storage-api.md) - [All operations](https://skmtc.dev/keboola/apis/keboola-storage-api/llms.txt) - [OpenAPI document](https://skmtc.dev/keboola/apis/keboola-storage-api/revisions/34b5ceac0317?raw)
