# Default

## GET /api/ping

> Health check

```json
{"openapi":"3.0.0","info":{"title":"Story WebUI API","version":"1.0.0"},"servers":[{"url":"http://localhost:7777"}],"paths":{"/api/ping":{"get":{"summary":"Health check","responses":{"200":{"description":"Plugin status and version","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"version":{"type":"string"}}}}}}}}}}}
```

## POST /api/create-session

> Create a new session

```json
{"openapi":"3.0.0","info":{"title":"Story WebUI API","version":"1.0.0"},"servers":[{"url":"http://localhost:7777"}],"paths":{"/api/create-session":{"post":{"summary":"Create a new session","responses":{"200":{"description":"Returns a session ID","content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string"}}}}}}}}}}}
```

## GET /api/plugin-state

> Get current plugin state

```json
{"openapi":"3.0.0","info":{"title":"Story WebUI API","version":"1.0.0"},"servers":[{"url":"http://localhost:7777"}],"paths":{"/api/plugin-state":{"get":{"summary":"Get current plugin state","parameters":[{"name":"session","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Plugin state snapshot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginStateDTO"}}}}}}}},"components":{"schemas":{"PluginStateDTO":{"type":"object","properties":{"conversations":{"type":"array","items":{"type":"object"}},"npcs":{"type":"array","items":{"type":"object"}}}}}}}
```

## POST /api/plugin-state

> Update plugin state

```json
{"openapi":"3.0.0","info":{"title":"Story WebUI API","version":"1.0.0"},"servers":[{"url":"http://localhost:7777"}],"paths":{"/api/plugin-state":{"post":{"summary":"Update plugin state","parameters":[{"name":"session","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginStateDTO"}}}},"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"components":{"schemas":{"PluginStateDTO":{"type":"object","properties":{"conversations":{"type":"array","items":{"type":"object"}},"npcs":{"type":"array","items":{"type":"object"}}}}}}}
```
