HTTP API

Narrative

GET/api/v1/narrative/universes
GET
/api/v1/narrative/universes

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Query Parameters

q?string

Full-text search query

page?integer

1-indexed page number

Formatint64
Range0 <= value
page_size?integer

Items per page

Formatint64
Range0 <= value
sort_by?string

Sort field (e.g. "created_at", "name")

sort_order?string

Sort direction

Value in

  • "asc"
  • "desc"

Response Body

application/json

curl -X GET "https://example.com/api/v1/narrative/universes"
{  "items": [    {      "actor_id": "string",      "created_at": "2019-08-24T14:15:22Z",      "event_id": "string",      "event_key": "string",      "metadata": {        "property1": null,        "property2": null      },      "session_id": "string",      "story_id": "string",      "universe_id": "string",      "value_json": null    }  ],  "pagination": {    "has_more": true,    "page": 0,    "page_size": 0,    "total": 0  }}
POST/api/v1/narrative/universes
POST
/api/v1/narrative/universes

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/narrative/universes" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "created_at": "2019-08-24T14:15:22Z",  "description": "string",  "metadata": {    "property1": null,    "property2": null  },  "name": "string",  "settings": {    "allow_session_creation": true,    "allow_story_creation": true,    "max_concurrent_sessions": 0,    "max_stories": 0  },  "stats": null,  "universe_id": "string",  "updated_at": "2019-08-24T14:15:22Z"}
GET/api/v1/narrative/universes/{universe_id}
GET
/api/v1/narrative/universes/{universe_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

Response Body

application/json

curl -X GET "https://example.com/api/v1/narrative/universes/string"
{  "created_at": "2019-08-24T14:15:22Z",  "description": "string",  "metadata": {    "property1": null,    "property2": null  },  "name": "string",  "settings": {    "allow_session_creation": true,    "allow_story_creation": true,    "max_concurrent_sessions": 0,    "max_stories": 0  },  "stats": null,  "universe_id": "string",  "updated_at": "2019-08-24T14:15:22Z"}
PATCH/api/v1/narrative/universes/{universe_id}
PATCH
/api/v1/narrative/universes/{universe_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/api/v1/narrative/universes/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "created_at": "2019-08-24T14:15:22Z",  "description": "string",  "metadata": {    "property1": null,    "property2": null  },  "name": "string",  "settings": {    "allow_session_creation": true,    "allow_story_creation": true,    "max_concurrent_sessions": 0,    "max_stories": 0  },  "stats": null,  "universe_id": "string",  "updated_at": "2019-08-24T14:15:22Z"}
DELETE/api/v1/narrative/universes/{universe_id}
DELETE
/api/v1/narrative/universes/{universe_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

Response Body

curl -X DELETE "https://example.com/api/v1/narrative/universes/string"
Empty
GET/api/v1/narrative/universes/{universe_id}/actor-templates
GET
/api/v1/narrative/universes/{universe_id}/actor-templates

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

Query Parameters

actor_type?string

Value in

  • "character"
  • "item"
  • "location"
publish_state?string

Value in

  • "draft"
  • "published"
  • "archived"
tags?string

Comma-separated tag filter

q?string

Full-text search query

page?integer

1-indexed page number

Formatint64
Range0 <= value
page_size?integer

Items per page

Formatint64
Range0 <= value
sort_by?string

Sort field (e.g. "created_at", "name")

sort_order?string

Sort direction

Value in

  • "asc"
  • "desc"

Response Body

application/json

curl -X GET "https://example.com/api/v1/narrative/universes/string/actor-templates"
{  "items": [    {      "actor_id": "string",      "created_at": "2019-08-24T14:15:22Z",      "event_id": "string",      "event_key": "string",      "metadata": {        "property1": null,        "property2": null      },      "session_id": "string",      "story_id": "string",      "universe_id": "string",      "value_json": null    }  ],  "pagination": {    "has_more": true,    "page": 0,    "page_size": 0,    "total": 0  }}
POST/api/v1/narrative/universes/{universe_id}/actor-templates
POST
/api/v1/narrative/universes/{universe_id}/actor-templates

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/narrative/universes/string/actor-templates" \  -H "Content-Type: application/json" \  -d '{    "actor_type": "character",    "name": "string"  }'
{  "actor_type": "character",  "color": "string",  "created_at": "2019-08-24T14:15:22Z",  "default_attribute_ids": [    "string"  ],  "default_properties": {    "avatar_image_name": "string",    "description": "string",    "display_name": "string",    "image_name": "string"  },  "description": "string",  "image_name": "string",  "metadata": {    "property1": null,    "property2": null  },  "name": "string",  "publish_state": "draft",  "tags": [    "string"  ],  "template_id": "string",  "universe_id": "string",  "updated_at": "2019-08-24T14:15:22Z",  "version": 0}
GET/api/v1/narrative/universes/{universe_id}/actor-templates/{template_id}
GET
/api/v1/narrative/universes/{universe_id}/actor-templates/{template_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

template_id*string

Template ID

Response Body

application/json

curl -X GET "https://example.com/api/v1/narrative/universes/string/actor-templates/string"
{  "actor_type": "character",  "color": "string",  "created_at": "2019-08-24T14:15:22Z",  "default_attribute_ids": [    "string"  ],  "default_properties": {    "avatar_image_name": "string",    "description": "string",    "display_name": "string",    "image_name": "string"  },  "description": "string",  "image_name": "string",  "metadata": {    "property1": null,    "property2": null  },  "name": "string",  "publish_state": "draft",  "tags": [    "string"  ],  "template_id": "string",  "universe_id": "string",  "updated_at": "2019-08-24T14:15:22Z",  "version": 0}
PATCH/api/v1/narrative/universes/{universe_id}/actor-templates/{template_id}
PATCH
/api/v1/narrative/universes/{universe_id}/actor-templates/{template_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

template_id*string

Template ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/api/v1/narrative/universes/string/actor-templates/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "actor_type": "character",  "color": "string",  "created_at": "2019-08-24T14:15:22Z",  "default_attribute_ids": [    "string"  ],  "default_properties": {    "avatar_image_name": "string",    "description": "string",    "display_name": "string",    "image_name": "string"  },  "description": "string",  "image_name": "string",  "metadata": {    "property1": null,    "property2": null  },  "name": "string",  "publish_state": "draft",  "tags": [    "string"  ],  "template_id": "string",  "universe_id": "string",  "updated_at": "2019-08-24T14:15:22Z",  "version": 0}
DELETE/api/v1/narrative/universes/{universe_id}/actor-templates/{template_id}
DELETE
/api/v1/narrative/universes/{universe_id}/actor-templates/{template_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

template_id*string

Template ID

Response Body

curl -X DELETE "https://example.com/api/v1/narrative/universes/string/actor-templates/string"
Empty
GET/api/v1/narrative/universes/{universe_id}/actors
GET
/api/v1/narrative/universes/{universe_id}/actors

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

Query Parameters

actor_type?string

Value in

  • "character"
  • "item"
  • "location"
scope?string

Value in

  • "universe"
  • "story"
  • "session"
story_id?string

Filter by story ID (returns story-scoped actors for this story)

session_id?string

Filter by session ID (returns session-scoped actors for this session)

tags?string
q?string

Full-text search query

page?integer

1-indexed page number

Formatint64
Range0 <= value
page_size?integer

Items per page

Formatint64
Range0 <= value
sort_by?string

Sort field (e.g. "created_at", "name")

sort_order?string

Sort direction

Value in

  • "asc"
  • "desc"

Response Body

application/json

curl -X GET "https://example.com/api/v1/narrative/universes/string/actors"
{  "items": [    {      "actor_id": "string",      "created_at": "2019-08-24T14:15:22Z",      "event_id": "string",      "event_key": "string",      "metadata": {        "property1": null,        "property2": null      },      "session_id": "string",      "story_id": "string",      "universe_id": "string",      "value_json": null    }  ],  "pagination": {    "has_more": true,    "page": 0,    "page_size": 0,    "total": 0  }}
POST/api/v1/narrative/universes/{universe_id}/actors
POST
/api/v1/narrative/universes/{universe_id}/actors

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Unified actor creation request. Handles:

  • Direct creation (no source_actor_id)
  • Import from another actor (source_actor_id set)
  • Template instantiation (template_id set)

Response Body

application/json

curl -X POST "https://example.com/api/v1/narrative/universes/string/actors" \  -H "Content-Type: application/json" \  -d '{}'
{  "actor_id": "string",  "actor_type": "character",  "attributes": [    {      "attribute_id": "string",      "name": "string",      "override_properties": null,      "template_id": "string",      "updated_at": "2019-08-24T14:15:22Z",      "value": {        "type": "number",        "value": 0.1      },      "version": 0    }  ],  "control_id": "string",  "created_at": "2019-08-24T14:15:22Z",  "last_modified_by": "string",  "metadata": {    "property1": null,    "property2": null  },  "name": "string",  "player_controlled": true,  "properties": {    "avatar_image_name": "string",    "description": "string",    "display_name": "string",    "image_name": "string"  },  "publish_state": "draft",  "scope": "universe",  "session_id": "string",  "source_actor_id": "string",  "source_version": 0,  "story_id": "string",  "tags": [    "string"  ],  "template_id": "string",  "template_snapshot": null,  "universe_id": "string",  "updated_at": "2019-08-24T14:15:22Z",  "version": 0}
POST/api/v1/narrative/universes/{universe_id}/actors/query
POST
/api/v1/narrative/universes/{universe_id}/actors/query

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/narrative/universes/string/actors/query" \  -H "Content-Type: application/json" \  -d '{}'
{  "items": [    {      "actor_id": "string",      "created_at": "2019-08-24T14:15:22Z",      "event_id": "string",      "event_key": "string",      "metadata": {        "property1": null,        "property2": null      },      "session_id": "string",      "story_id": "string",      "universe_id": "string",      "value_json": null    }  ],  "pagination": {    "has_more": true,    "page": 0,    "page_size": 0,    "total": 0  }}
GET/api/v1/narrative/universes/{universe_id}/actors/{actor_id}
GET
/api/v1/narrative/universes/{universe_id}/actors/{actor_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

actor_id*string

Actor ID

Response Body

application/json

curl -X GET "https://example.com/api/v1/narrative/universes/string/actors/string"
{  "actor_id": "string",  "actor_type": "character",  "attributes": [    {      "attribute_id": "string",      "name": "string",      "override_properties": null,      "template_id": "string",      "updated_at": "2019-08-24T14:15:22Z",      "value": {        "type": "number",        "value": 0.1      },      "version": 0    }  ],  "control_id": "string",  "created_at": "2019-08-24T14:15:22Z",  "last_modified_by": "string",  "metadata": {    "property1": null,    "property2": null  },  "name": "string",  "player_controlled": true,  "properties": {    "avatar_image_name": "string",    "description": "string",    "display_name": "string",    "image_name": "string"  },  "publish_state": "draft",  "scope": "universe",  "session_id": "string",  "source_actor_id": "string",  "source_version": 0,  "story_id": "string",  "tags": [    "string"  ],  "template_id": "string",  "template_snapshot": null,  "universe_id": "string",  "updated_at": "2019-08-24T14:15:22Z",  "version": 0}
PATCH/api/v1/narrative/universes/{universe_id}/actors/{actor_id}
PATCH
/api/v1/narrative/universes/{universe_id}/actors/{actor_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

actor_id*string

Actor ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/api/v1/narrative/universes/string/actors/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "actor_id": "string",  "actor_type": "character",  "attributes": [    {      "attribute_id": "string",      "name": "string",      "override_properties": null,      "template_id": "string",      "updated_at": "2019-08-24T14:15:22Z",      "value": {        "type": "number",        "value": 0.1      },      "version": 0    }  ],  "control_id": "string",  "created_at": "2019-08-24T14:15:22Z",  "last_modified_by": "string",  "metadata": {    "property1": null,    "property2": null  },  "name": "string",  "player_controlled": true,  "properties": {    "avatar_image_name": "string",    "description": "string",    "display_name": "string",    "image_name": "string"  },  "publish_state": "draft",  "scope": "universe",  "session_id": "string",  "source_actor_id": "string",  "source_version": 0,  "story_id": "string",  "tags": [    "string"  ],  "template_id": "string",  "template_snapshot": null,  "universe_id": "string",  "updated_at": "2019-08-24T14:15:22Z",  "version": 0}
DELETE/api/v1/narrative/universes/{universe_id}/actors/{actor_id}
DELETE
/api/v1/narrative/universes/{universe_id}/actors/{actor_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

actor_id*string

Actor ID

Response Body

curl -X DELETE "https://example.com/api/v1/narrative/universes/string/actors/string"
Empty
PATCH/api/v1/narrative/universes/{universe_id}/actors/{actor_id}/attributes/{attribute_id}
PATCH
/api/v1/narrative/universes/{universe_id}/actors/{actor_id}/attributes/{attribute_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

actor_id*string

Actor ID

attribute_id*string

Attribute ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/api/v1/narrative/universes/string/actors/string/attributes/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "actor_id": "string",  "actor_type": "character",  "attributes": [    {      "attribute_id": "string",      "name": "string",      "override_properties": null,      "template_id": "string",      "updated_at": "2019-08-24T14:15:22Z",      "value": {        "type": "number",        "value": 0.1      },      "version": 0    }  ],  "control_id": "string",  "created_at": "2019-08-24T14:15:22Z",  "last_modified_by": "string",  "metadata": {    "property1": null,    "property2": null  },  "name": "string",  "player_controlled": true,  "properties": {    "avatar_image_name": "string",    "description": "string",    "display_name": "string",    "image_name": "string"  },  "publish_state": "draft",  "scope": "universe",  "session_id": "string",  "source_actor_id": "string",  "source_version": 0,  "story_id": "string",  "tags": [    "string"  ],  "template_id": "string",  "template_snapshot": null,  "universe_id": "string",  "updated_at": "2019-08-24T14:15:22Z",  "version": 0}
GET/api/v1/narrative/universes/{universe_id}/actors/{actor_id}/control
GET
/api/v1/narrative/universes/{universe_id}/actors/{actor_id}/control

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

actor_id*string

Actor ID

Response Body

application/json

curl -X GET "https://example.com/api/v1/narrative/universes/string/actors/string/control"
{  "actor_id": "string",  "allowed_mutations": {    "property1": true,    "property2": true  },  "control_id": "string",  "control_mode": "exclusive",  "created_at": "2019-08-24T14:15:22Z",  "expires_at": "2019-08-24T14:15:22Z",  "is_expired": true,  "on_release": {    "action": "discard",    "notify_webhook": "string"  },  "player_id": "string",  "session_id": "string",  "source_scope": "universe",  "universe_id": "string"}
POST/api/v1/narrative/universes/{universe_id}/actors/{actor_id}/control
POST
/api/v1/narrative/universes/{universe_id}/actors/{actor_id}/control

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

actor_id*string

Actor ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/narrative/universes/string/actors/string/control" \  -H "Content-Type: application/json" \  -d '{    "player_id": "string",    "session_id": "string"  }'
{  "actor_id": "string",  "allowed_mutations": {    "property1": true,    "property2": true  },  "control_id": "string",  "control_mode": "exclusive",  "created_at": "2019-08-24T14:15:22Z",  "expires_at": "2019-08-24T14:15:22Z",  "is_expired": true,  "on_release": {    "action": "discard",    "notify_webhook": "string"  },  "player_id": "string",  "session_id": "string",  "source_scope": "universe",  "universe_id": "string"}
DELETE/api/v1/narrative/universes/{universe_id}/actors/{actor_id}/control
DELETE
/api/v1/narrative/universes/{universe_id}/actors/{actor_id}/control

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

actor_id*string

Actor ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X DELETE "https://example.com/api/v1/narrative/universes/string/actors/string/control" \  -H "Content-Type: application/json" \  -d '{}'
Empty
GET/api/v1/narrative/universes/{universe_id}/actors/{actor_id}/events/{event_key}
GET
/api/v1/narrative/universes/{universe_id}/actors/{actor_id}/events/{event_key}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

actor_id*string

Actor ID

event_key*string

Event Key

Response Body

application/json

curl -X GET "https://example.com/api/v1/narrative/universes/string/actors/string/events/string"
{  "actor_id": "string",  "created_at": "2019-08-24T14:15:22Z",  "event_id": "string",  "event_key": "string",  "metadata": {    "property1": null,    "property2": null  },  "session_id": "string",  "story_id": "string",  "universe_id": "string",  "value_json": null}
PATCH/api/v1/narrative/universes/{universe_id}/actors/{actor_id}/events/{event_key}
PATCH
/api/v1/narrative/universes/{universe_id}/actors/{actor_id}/events/{event_key}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

actor_id*string

Actor ID

event_key*string

Event Key (idempotent)

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/api/v1/narrative/universes/string/actors/string/events/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "actor_id": "string",  "created_at": "2019-08-24T14:15:22Z",  "event_id": "string",  "event_key": "string",  "metadata": {    "property1": null,    "property2": null  },  "session_id": "string",  "story_id": "string",  "universe_id": "string",  "value_json": null}
DELETE/api/v1/narrative/universes/{universe_id}/actors/{actor_id}/events/{event_key}
DELETE
/api/v1/narrative/universes/{universe_id}/actors/{actor_id}/events/{event_key}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

actor_id*string

Actor ID

event_key*string

Event Key

Response Body

curl -X DELETE "https://example.com/api/v1/narrative/universes/string/actors/string/events/string"
Empty
POST/api/v1/narrative/universes/{universe_id}/actors/{actor_id}/promote
POST
/api/v1/narrative/universes/{universe_id}/actors/{actor_id}/promote

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

actor_id*string

Actor ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/narrative/universes/string/actors/string/promote" \  -H "Content-Type: application/json" \  -d '{    "from_scope": "universe",    "to_scope": "universe"  }'
{  "actor": {    "actor_id": "string",    "actor_type": "character",    "attributes": [      {        "attribute_id": "string",        "name": "string",        "override_properties": null,        "template_id": "string",        "updated_at": "2019-08-24T14:15:22Z",        "value": {          "type": "number",          "value": 0.1        },        "version": 0      }    ],    "control_id": "string",    "created_at": "2019-08-24T14:15:22Z",    "last_modified_by": "string",    "metadata": {      "property1": null,      "property2": null    },    "name": "string",    "player_controlled": true,    "properties": {      "avatar_image_name": "string",      "description": "string",      "display_name": "string",      "image_name": "string"    },    "publish_state": "draft",    "scope": "universe",    "session_id": "string",    "source_actor_id": "string",    "source_version": 0,    "story_id": "string",    "tags": [      "string"    ],    "template_id": "string",    "template_snapshot": null,    "universe_id": "string",    "updated_at": "2019-08-24T14:15:22Z",    "version": 0  },  "conflicts_resolved": 0,  "fields_promoted": [    "string"  ],  "from_scope": "universe",  "source_actor_id": "string",  "success": true,  "target_actor_id": "string",  "to_scope": "universe"}
POST/api/v1/narrative/universes/{universe_id}/actors/{actor_id}/replicate
POST
/api/v1/narrative/universes/{universe_id}/actors/{actor_id}/replicate

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

actor_id*string

Actor ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/narrative/universes/string/actors/string/replicate" \  -H "Content-Type: application/json" \  -d '{    "new_actor_id": "string",    "to_scope": "universe"  }'
{  "actor": {    "actor_id": "string",    "actor_type": "character",    "attributes": [      {        "attribute_id": "string",        "name": "string",        "override_properties": null,        "template_id": "string",        "updated_at": "2019-08-24T14:15:22Z",        "value": {          "type": "number",          "value": 0.1        },        "version": 0      }    ],    "control_id": "string",    "created_at": "2019-08-24T14:15:22Z",    "last_modified_by": "string",    "metadata": {      "property1": null,      "property2": null    },    "name": "string",    "player_controlled": true,    "properties": {      "avatar_image_name": "string",      "description": "string",      "display_name": "string",      "image_name": "string"    },    "publish_state": "draft",    "scope": "universe",    "session_id": "string",    "source_actor_id": "string",    "source_version": 0,    "story_id": "string",    "tags": [      "string"    ],    "template_id": "string",    "template_snapshot": null,    "universe_id": "string",    "updated_at": "2019-08-24T14:15:22Z",    "version": 0  },  "new_actor_id": "string",  "source_actor_id": "string",  "success": true}
GET/api/v1/narrative/universes/{universe_id}/attribute-templates
GET
/api/v1/narrative/universes/{universe_id}/attribute-templates

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

Query Parameters

attribute_type?string

Value in

  • "number"
  • "string"
  • "boolean"
publish_state?string

Value in

  • "draft"
  • "published"
  • "archived"
q?string

Full-text search query

page?integer

1-indexed page number

Formatint64
Range0 <= value
page_size?integer

Items per page

Formatint64
Range0 <= value
sort_by?string

Sort field (e.g. "created_at", "name")

sort_order?string

Sort direction

Value in

  • "asc"
  • "desc"

Response Body

application/json

curl -X GET "https://example.com/api/v1/narrative/universes/string/attribute-templates"
{  "items": [    {      "actor_id": "string",      "created_at": "2019-08-24T14:15:22Z",      "event_id": "string",      "event_key": "string",      "metadata": {        "property1": null,        "property2": null      },      "session_id": "string",      "story_id": "string",      "universe_id": "string",      "value_json": null    }  ],  "pagination": {    "has_more": true,    "page": 0,    "page_size": 0,    "total": 0  }}
POST/api/v1/narrative/universes/{universe_id}/attribute-templates
POST
/api/v1/narrative/universes/{universe_id}/attribute-templates

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/narrative/universes/string/attribute-templates" \  -H "Content-Type: application/json" \  -d '{    "attribute_type": "number",    "name": "string"  }'
{  "attribute_type": "number",  "color": "string",  "created_at": "2019-08-24T14:15:22Z",  "default_value": null,  "description": "string",  "image_name": "string",  "max_value": 0,  "metadata": {    "property1": null,    "property2": null  },  "min_value": 0,  "name": "string",  "publish_state": "draft",  "suggested_values": [    "string"  ],  "template_id": "string",  "universe_id": "string",  "updated_at": "2019-08-24T14:15:22Z"}
GET/api/v1/narrative/universes/{universe_id}/attribute-templates/{template_id}
GET
/api/v1/narrative/universes/{universe_id}/attribute-templates/{template_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

template_id*string

Template ID

Response Body

application/json

curl -X GET "https://example.com/api/v1/narrative/universes/string/attribute-templates/string"
{  "attribute_type": "number",  "color": "string",  "created_at": "2019-08-24T14:15:22Z",  "default_value": null,  "description": "string",  "image_name": "string",  "max_value": 0,  "metadata": {    "property1": null,    "property2": null  },  "min_value": 0,  "name": "string",  "publish_state": "draft",  "suggested_values": [    "string"  ],  "template_id": "string",  "universe_id": "string",  "updated_at": "2019-08-24T14:15:22Z"}
PATCH/api/v1/narrative/universes/{universe_id}/attribute-templates/{template_id}
PATCH
/api/v1/narrative/universes/{universe_id}/attribute-templates/{template_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

template_id*string

Template ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/api/v1/narrative/universes/string/attribute-templates/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "attribute_type": "number",  "color": "string",  "created_at": "2019-08-24T14:15:22Z",  "default_value": null,  "description": "string",  "image_name": "string",  "max_value": 0,  "metadata": {    "property1": null,    "property2": null  },  "min_value": 0,  "name": "string",  "publish_state": "draft",  "suggested_values": [    "string"  ],  "template_id": "string",  "universe_id": "string",  "updated_at": "2019-08-24T14:15:22Z"}
DELETE/api/v1/narrative/universes/{universe_id}/attribute-templates/{template_id}
DELETE
/api/v1/narrative/universes/{universe_id}/attribute-templates/{template_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

template_id*string

Template ID

Response Body

curl -X DELETE "https://example.com/api/v1/narrative/universes/string/attribute-templates/string"
Empty
GET/api/v1/narrative/universes/{universe_id}/events
GET
/api/v1/narrative/universes/{universe_id}/events

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

Query Parameters

actor_id?string

Filter by actor ID

event_key?string

Filter by event key

story_id?string

Filter by story ID

session_id?string

Filter by session ID

page?integer

1-indexed page number

Formatint64
Range0 <= value
page_size?integer

Items per page

Formatint64
Range0 <= value
sort_by?string

Sort field (e.g. "created_at", "event_key")

sort_order?string

Sort direction

Value in

  • "asc"
  • "desc"

Response Body

application/json

curl -X GET "https://example.com/api/v1/narrative/universes/string/events"
{  "items": [    {      "actor_id": "string",      "created_at": "2019-08-24T14:15:22Z",      "event_id": "string",      "event_key": "string",      "metadata": {        "property1": null,        "property2": null      },      "session_id": "string",      "story_id": "string",      "universe_id": "string",      "value_json": null    }  ],  "pagination": {    "has_more": true,    "page": 0,    "page_size": 0,    "total": 0  }}
POST/api/v1/narrative/universes/{universe_id}/events/aggregate
POST
/api/v1/narrative/universes/{universe_id}/events/aggregate

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/narrative/universes/string/events/aggregate" \  -H "Content-Type: application/json" \  -d '{    "event_key": "string"  }'
{  "event_key": "string",  "total_count": 0}
POST/api/v1/narrative/universes/{universe_id}/events/batch
POST
/api/v1/narrative/universes/{universe_id}/events/batch

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

A batch of events to upsert under one universe (high-volume event ingestion). Each is upserted independently and fail-fast; the server enforces a cap.

Response Body

application/json

curl -X POST "https://example.com/api/v1/narrative/universes/string/events/batch" \  -H "Content-Type: application/json" \  -d '{    "events": [      {        "actor_id": "string",        "event": {},        "event_key": "string"      }    ]  }'
{  "count": 0,  "results": [    {      "actor_id": "string",      "created_at": "2019-08-24T14:15:22Z",      "event_id": "string",      "event_key": "string",      "metadata": {        "property1": null,        "property2": null      },      "session_id": "string",      "story_id": "string",      "universe_id": "string",      "value_json": null    }  ]}
GET/api/v1/narrative/universes/{universe_id}/sessions
GET
/api/v1/narrative/universes/{universe_id}/sessions

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

Query Parameters

player_id?string
story_id?string
active_only?boolean
q?string

Full-text search query

page?integer

1-indexed page number

Formatint64
Range0 <= value
page_size?integer

Items per page

Formatint64
Range0 <= value
sort_by?string

Sort field (e.g. "created_at", "name")

sort_order?string

Sort direction

Value in

  • "asc"
  • "desc"

Response Body

application/json

curl -X GET "https://example.com/api/v1/narrative/universes/string/sessions"
{  "items": [    {      "actor_id": "string",      "created_at": "2019-08-24T14:15:22Z",      "event_id": "string",      "event_key": "string",      "metadata": {        "property1": null,        "property2": null      },      "session_id": "string",      "story_id": "string",      "universe_id": "string",      "value_json": null    }  ],  "pagination": {    "has_more": true,    "page": 0,    "page_size": 0,    "total": 0  }}
POST/api/v1/narrative/universes/{universe_id}/sessions
POST
/api/v1/narrative/universes/{universe_id}/sessions

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/narrative/universes/string/sessions" \  -H "Content-Type: application/json" \  -d '{    "player_id": "string"  }'
{  "context": {    "property1": null,    "property2": null  },  "created_at": "2019-08-24T14:15:22Z",  "expires_at": "2019-08-24T14:15:22Z",  "is_expired": true,  "player_id": "string",  "session_id": "string",  "settings": {    "auto_save": true,    "save_interval_seconds": 0,    "ttl_seconds": 0  },  "story_id": "string",  "universe_id": "string",  "updated_at": "2019-08-24T14:15:22Z"}
GET/api/v1/narrative/universes/{universe_id}/sessions/{session_id}
GET
/api/v1/narrative/universes/{universe_id}/sessions/{session_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

session_id*string

Session ID

Response Body

application/json

curl -X GET "https://example.com/api/v1/narrative/universes/string/sessions/string"
{  "context": {    "property1": null,    "property2": null  },  "created_at": "2019-08-24T14:15:22Z",  "expires_at": "2019-08-24T14:15:22Z",  "is_expired": true,  "player_id": "string",  "session_id": "string",  "settings": {    "auto_save": true,    "save_interval_seconds": 0,    "ttl_seconds": 0  },  "story_id": "string",  "universe_id": "string",  "updated_at": "2019-08-24T14:15:22Z"}
PATCH/api/v1/narrative/universes/{universe_id}/sessions/{session_id}
PATCH
/api/v1/narrative/universes/{universe_id}/sessions/{session_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

session_id*string

Session ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/api/v1/narrative/universes/string/sessions/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "context": {    "property1": null,    "property2": null  },  "created_at": "2019-08-24T14:15:22Z",  "expires_at": "2019-08-24T14:15:22Z",  "is_expired": true,  "player_id": "string",  "session_id": "string",  "settings": {    "auto_save": true,    "save_interval_seconds": 0,    "ttl_seconds": 0  },  "story_id": "string",  "universe_id": "string",  "updated_at": "2019-08-24T14:15:22Z"}
DELETE/api/v1/narrative/universes/{universe_id}/sessions/{session_id}
DELETE
/api/v1/narrative/universes/{universe_id}/sessions/{session_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

session_id*string

Session ID

Response Body

curl -X DELETE "https://example.com/api/v1/narrative/universes/string/sessions/string"
Empty
GET/api/v1/narrative/universes/{universe_id}/stories
GET
/api/v1/narrative/universes/{universe_id}/stories

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

Query Parameters

story_type?string
tags?string

Comma-separated tag filter

q?string

Full-text search query

page?integer

1-indexed page number

Formatint64
Range0 <= value
page_size?integer

Items per page

Formatint64
Range0 <= value
sort_by?string

Sort field (e.g. "created_at", "name")

sort_order?string

Sort direction

Value in

  • "asc"
  • "desc"

Response Body

application/json

curl -X GET "https://example.com/api/v1/narrative/universes/string/stories"
{  "items": [    {      "actor_id": "string",      "created_at": "2019-08-24T14:15:22Z",      "event_id": "string",      "event_key": "string",      "metadata": {        "property1": null,        "property2": null      },      "session_id": "string",      "story_id": "string",      "universe_id": "string",      "value_json": null    }  ],  "pagination": {    "has_more": true,    "page": 0,    "page_size": 0,    "total": 0  }}
POST/api/v1/narrative/universes/{universe_id}/stories
POST
/api/v1/narrative/universes/{universe_id}/stories

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/narrative/universes/string/stories" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "created_at": "2019-08-24T14:15:22Z",  "description": "string",  "graph_data": null,  "lore_compiled": null,  "lore_compiler_version": "string",  "lore_source": "string",  "metadata": {    "property1": null,    "property2": null  },  "name": "string",  "publish_state": "draft",  "settings": {    "actor_import_mode": "copy_on_write",    "allow_sessions": true,    "divergence_point": null,    "max_sessions": 0  },  "stats": null,  "story_id": "string",  "story_type": "string",  "tags": [    "string"  ],  "universe_id": "string",  "updated_at": "2019-08-24T14:15:22Z"}
GET/api/v1/narrative/universes/{universe_id}/stories/{story_id}
GET
/api/v1/narrative/universes/{universe_id}/stories/{story_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

story_id*string

Story ID

Response Body

application/json

curl -X GET "https://example.com/api/v1/narrative/universes/string/stories/string"
{  "created_at": "2019-08-24T14:15:22Z",  "description": "string",  "graph_data": null,  "lore_compiled": null,  "lore_compiler_version": "string",  "lore_source": "string",  "metadata": {    "property1": null,    "property2": null  },  "name": "string",  "publish_state": "draft",  "settings": {    "actor_import_mode": "copy_on_write",    "allow_sessions": true,    "divergence_point": null,    "max_sessions": 0  },  "stats": null,  "story_id": "string",  "story_type": "string",  "tags": [    "string"  ],  "universe_id": "string",  "updated_at": "2019-08-24T14:15:22Z"}
PATCH/api/v1/narrative/universes/{universe_id}/stories/{story_id}
PATCH
/api/v1/narrative/universes/{universe_id}/stories/{story_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

story_id*string

Story ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/api/v1/narrative/universes/string/stories/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "created_at": "2019-08-24T14:15:22Z",  "description": "string",  "graph_data": null,  "lore_compiled": null,  "lore_compiler_version": "string",  "lore_source": "string",  "metadata": {    "property1": null,    "property2": null  },  "name": "string",  "publish_state": "draft",  "settings": {    "actor_import_mode": "copy_on_write",    "allow_sessions": true,    "divergence_point": null,    "max_sessions": 0  },  "stats": null,  "story_id": "string",  "story_type": "string",  "tags": [    "string"  ],  "universe_id": "string",  "updated_at": "2019-08-24T14:15:22Z"}
DELETE/api/v1/narrative/universes/{universe_id}/stories/{story_id}
DELETE
/api/v1/narrative/universes/{universe_id}/stories/{story_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

story_id*string

Story ID

Response Body

curl -X DELETE "https://example.com/api/v1/narrative/universes/string/stories/string"
Empty
GET/api/v1/narrative/universes/{universe_id}/tags
GET
/api/v1/narrative/universes/{universe_id}/tags

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

Query Parameters

q?string

Full-text search query

page?integer

1-indexed page number

Formatint64
Range0 <= value
page_size?integer

Items per page

Formatint64
Range0 <= value
sort_by?string

Sort field (e.g. "created_at", "name")

sort_order?string

Sort direction

Value in

  • "asc"
  • "desc"

Response Body

application/json

curl -X GET "https://example.com/api/v1/narrative/universes/string/tags"
{  "items": [    {      "actor_id": "string",      "created_at": "2019-08-24T14:15:22Z",      "event_id": "string",      "event_key": "string",      "metadata": {        "property1": null,        "property2": null      },      "session_id": "string",      "story_id": "string",      "universe_id": "string",      "value_json": null    }  ],  "pagination": {    "has_more": true,    "page": 0,    "page_size": 0,    "total": 0  }}
POST/api/v1/narrative/universes/{universe_id}/tags
POST
/api/v1/narrative/universes/{universe_id}/tags

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/narrative/universes/string/tags" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "color": "string",  "created_at": "2019-08-24T14:15:22Z",  "name": "string",  "tag_id": "string",  "universe_id": "string",  "updated_at": "2019-08-24T14:15:22Z"}
PATCH/api/v1/narrative/universes/{universe_id}/tags/{tag_id}
PATCH
/api/v1/narrative/universes/{universe_id}/tags/{tag_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

tag_id*string

Tag ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/api/v1/narrative/universes/string/tags/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "color": "string",  "created_at": "2019-08-24T14:15:22Z",  "name": "string",  "tag_id": "string",  "universe_id": "string",  "updated_at": "2019-08-24T14:15:22Z"}
DELETE/api/v1/narrative/universes/{universe_id}/tags/{tag_id}
DELETE
/api/v1/narrative/universes/{universe_id}/tags/{tag_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

universe_id*string

Universe ID

tag_id*string

Tag ID

Response Body

curl -X DELETE "https://example.com/api/v1/narrative/universes/string/tags/string"
Empty

On this page