# Vision Events

The Vision Events API lets you record structured events from your computer vision deployments, then query and analyze them. Events can include images, detection annotations, custom metadata, and type-specific data for quality checks, inventory counts, safety alerts, and more.

With the Vision Events API, you can:

* [Upload a Vision Event Image](/developer/rest-api/vision-events/upload-a-vision-event-image.md)
* [Create a Vision Event](/developer/rest-api/vision-events/create-a-vision-event.md)
* [Batch Create Vision Events](/developer/rest-api/vision-events/batch-create-vision-events.md)
* [Query Vision Events](/developer/rest-api/vision-events/query-vision-events.md)
* [List Use Cases](/developer/rest-api/vision-events/list-use-cases.md)
* [Get Custom Metadata Schema](/developer/rest-api/vision-events/get-custom-metadata-schema.md)

## Authentication

All Vision Events endpoints use Bearer token authentication with your Roboflow API key:

```
Authorization: Bearer YOUR_API_KEY
```

Vision Events endpoints require specific [scoped API key](/developer/authentication/scoped-api-keys.md) permissions:

* **Read operations** (query, list, schema): `vision-events:read` or `device:read`
* **Write operations** (create, batch, upload): `vision-events:write` or `device:update`

## Use Cases

Each vision event is associated with a use case. To learn how to create and manage use cases, see the [Use Cases documentation](https://docs.roboflow.com/deploy/vision-events/use-cases).

You can also [list existing use cases](/developer/rest-api/vision-events/list-use-cases.md) that have recorded events via the API.

## Event Types

The API supports five event types, each with its own `eventData` schema:

| Event Type          | Description                         |
| ------------------- | ----------------------------------- |
| `quality_check`     | QA and inspection results           |
| `inventory_count`   | Inventory measurements              |
| `safety_alert`      | Safety incidents and alerts         |
| `custom`            | Freeform event data                 |
| `operator_feedback` | Human feedback on model predictions |

## Data Retention

Events are retained for a configurable lookback window (default: 14 days). The `lookbackDays` value is returned in query responses so you know the effective retention period for your workspace.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.roboflow.com/developer/rest-api/vision-events.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
