---
title: "Add an event to an instance"
method: POST
path: "/instances/{instance_id}/events"
tags: ["Private"]
---

# Add an event to an instance

`POST /instances/{instance_id}/events`

Add a new event into an instance. Events can be for information or error messages.
Each event must contain a type of event (Info or Error), a message to explain
the event, time of the event and finally the message offset in kafka

## Path parameters

- `instance_id` string, required

## Headers

- `If-Match` string

## Request body

- Event
  - `message` string — A description of the event
  - `message_offset` string — The kafka message offset (Used to locate the kafka message)
  - `time` string — The time of the event in ISO 8601 format
  - `type` string — The type of event, this can be; * Info - for an information event * Error - for an error event

## Response `201`

The event was added to the instance

## Other responses

- `400` — Failed to process the request due to invalid request
- `401` — The token provided is unauthorised to carry out this operation
- `404` — InstanceId does not match any instances
- `409` — Failed to process the request due to a conflict
- `500` — Failed to process the request due to an internal error

---

[API](https://skmtc.net/office-of-national-statistics/apis/explore-our-data.md) · [All operations](https://skmtc.net/office-of-national-statistics/apis/explore-our-data/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/office-of-national-statistics/explore-our-data/revisions/269ed359fb27/schema)
