---
title: "Create event"
method: POST
path: "/_fabric/{fabric}/_api/events"
tags: ["Administration"]
---

# Create event

`POST /_fabric/{fabric}/_api/events`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/macrometa/apis/macrometa-api-reference/docs/_fabric/:fabric/_api/events/post.ts> (a function with typed inputs; its response is checked against the schema)

Create an event.

## Path parameters

- `fabric` string, string, required

## Request body

- EventCreate
  - `action` string: The activity of the event (CREATE/UPDATE/DELETE/EXECUTE/LOGIN).
  - `attributes` EventAttributes: Additional event attributes. If specified, *attributes* should be a JSON array containing key-value attributes
  - `description` string: Event description.
  - `details` string: Additional activity info.
  - `entityName` string, required: The entity name of the event.
  - `entityType` string: The entity type of the event (COLLECTION/GRAPH/CEP/AUTH/STREAM/GEOFABRIC).
  - `status` string: The activity status (OK/WARN/ERROR).

## Response `201`

Successfully created event

- AdministrationCreateEventRc201
  - `_id` string: ID of the event.
  - `_key` string: _key details of event.
  - `_rev` string: _rev details of event.

## Other responses

- `400`: Failed due to missing or malformed data. Verify that all parameters are complete.
- `401`: Failed because you do not have administrator permissions.
- `403`: Failed to validate because you do not have access to the server.
- `404`: Failed to find specified fabric.

---

[API](https://skmtc.dev/macrometa/apis/macrometa-api-reference.md) - [All operations](https://skmtc.dev/macrometa/apis/macrometa-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/macrometa/apis/macrometa-api-reference/revisions/2006b6d7f31d?raw)
