---
title: "Add event to session"
method: POST
path: "/session/{session_id}/events"
tags: ["session"]
---

# Add event to session

`POST /session/{session_id}/events`

Add a structured event to a session. Events are stored alongside messages and can be retrieved chronologically.

## Path parameters

- `session_id` string, uuid, required

## Request body

- HandlerAddEventReq

## Response `200`

OK

- object
  - `code` integer
  - `error` string
  - `msg` string
  - `data` ModelSessionEvent
    - `created_at` string
    - `data` object
    - `id` string
    - `project_id` string
    - `session_id` string
    - `type` string
    - `updated_at` string

## Other responses

- `400` — Invalid request
- `404` — Session not found

## Changes

> 50 revisions in range; 1 could not be searched.

- **2026-03-15** `39a157a0bcb0` — 1 info
  - endpoint added
- **2025-11-12** `a1c1bcb0e2ee` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/memodb-io/apis/acontext-api/changes/session/:session_id/events/post.md)

---

[API](https://skmtc.dev/memodb-io/apis/acontext-api.md) · [All operations](https://skmtc.dev/memodb-io/apis/acontext-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/memodb-io/acontext-api/revisions/c8775333b1ed/schema)
