---
title: "Create event"
method: POST
path: "/events/"
tags: ["event"]
---

# Create event

`POST /events/`

## Request

- Base URL: `https://api.angelcam.com/v1`
- URL: `https://api.angelcam.com/v1/events/`
- Auth: none required
- TypeScript: <https://skmtc.dev/angelcam/apis/angelcam-api/docs/events/post.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint has rate limiting in place. The endpoint will accept at most 10 requests per minute
for a given hash (see [Nuts and bolts](#section/Angelcam-API/Nuts-and-bolts) for more details).

## Request body

- object
  - `hash` string, required: Event API hash (a unique token for each sensor found in My Angelcam dashboard or obtained via Sensor Resource) - used to authenticate the request and pair the event with corresponding sensor.
  - `title` string
  - `occurred_at` string, datetime

## Response `201`

Event was received

- EventObject
  - `camera` integer, nullable, required: Camera ID
  - `location` integer, nullable, required: Location ID
  - `site` integer, nullable, required: Location ID. **Deprecated:** use `location` instead.
  - `title` string, nullable, required: Event title
  - `category` string, required: event category
  - `source` string, required: Name of event source
  - `occurred_at` string, datetime, required: Time when event occurred or was received by Angelcam
  - `received_at` string, datetime, required: Time when event was received by Angelcam

## Other responses

- `400`: The event hash is invalid or there's another error in the request
- `429`: The rate limit has been reached

---

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