Finalize a completed story
const url = 'https://api.hiddendoor.co/experience/v1/instances/da1cc53b-9d9e-4edb-83e4-d5a9ee713130/stories/b79d72ef-92fb-4bcd-917a-9886e62d41d8/complete';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"entityIdsToKeep":["79a3af39-c171-4dfb-b51b-5a684f61525d"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.hiddendoor.co/experience/v1/instances/da1cc53b-9d9e-4edb-83e4-d5a9ee713130/stories/b79d72ef-92fb-4bcd-917a-9886e62d41d8/complete \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "entityIdsToKeep": [ "79a3af39-c171-4dfb-b51b-5a684f61525d" ] }'Apply final story outcomes and storyline progress after the story has ended. Omit entityIdsToKeep to retain all newly introduced entities, or supply the subset to retain; an empty array retains none of the eligible new entities. Existing entities, hidden entities and the lead are preserved. This operation does not force an active story to end or start the next story.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Example
da1cc53b-9d9e-4edb-83e4-d5a9ee713130POST /instances/:instanceId/stories/:storyId/complete Parameter
Example
b79d72ef-92fb-4bcd-917a-9886e62d41d8POST /instances/:instanceId/stories/:storyId/complete Parameter
Request Body
Section titled “ Request Body ”POST /instances/:instanceId/stories/:storyId/complete Request body
object
Responses
Section titled “ Responses ”POST /instances/:instanceId/stories/:storyId/complete Positive response
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Applied world modifiers, including seed defaults.
The selected subset, excluding seed defaults.
object
object
object
Public events in order, including the complete history of earlier turns.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Ending text, when present. The event marks the story ending even when text is absent.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Entities selected as influences when setting up the story.
Entities active in the story context.
object
object
object
object
The complete resolved beat sequence, including upcoming beats, in order.
object
Canon identifiers, not instance entity UUIDs.
The offering window end; does not expire an existing storyline.
object
Instance-level override, not the resolved scene or story rating.
Public events produced by this operation, in order.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Ending text, when present. The event marks the story ending even when text is absent.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Outstanding input requests after this operation; empty when none are pending.
object
Generation prompts for the requested entity.
object
object
object
object
object
Example
{ "storyId": "b79d72ef-92fb-4bcd-917a-9886e62d41d8", "gameState": { "instanceId": "da1cc53b-9d9e-4edb-83e4-d5a9ee713130", "world": { "worldId": "51ca502e-b07b-4ad1-a43a-93d5434f59dc", "worldSeed": "oz", "name": "oz", "displayName": "The Land of Oz", "description": "A storybook fantasy filled with talking animals, witches, strange creatures, and more!", "characters": [], "items": [], "locations": [], "twistNames": [], "playerSelectedModifiers": [] }, "stories": [], "storylines": {}, "meta": { "currentLocale": "en-US" }, "createdAt": "2026-11-11T12:00:00Z", "updatedAt": "2026-11-12T12:00:00.000Z" }, "events": [], "inputRequests": []}Request parameters or the JSON body do not conform to this operation’s input schema. Correct the request before retrying.
object
The HTTP error category. Use the status code to handle failures.
A human-readable explanation. Do not parse this text for program logic.
Example
{ "error": "Bad Request", "message": "Request parameters or the JSON body do not conform to this operation’s input schema. Correct the request before retrying."}Authentication is missing or invalid. Supply a valid API key in the Authorization: Bearer header.
object
The HTTP error category. Use the status code to handle failures.
A human-readable explanation. Do not parse this text for program logic.
Example
{ "error": "Unauthorized", "message": "Authentication is missing or invalid. Supply a valid API key in the Authorization: Bearer header."}The authenticated account does not have access to the Experience API.
object
The HTTP error category. Use the status code to handle failures.
A human-readable explanation. Do not parse this text for program logic.
Example
{ "error": "Forbidden", "message": "The authenticated account does not have access to the Experience API."}The resource does not exist or is not accessible to your application.
object
The HTTP error category. Use the status code to handle failures.
A human-readable explanation. Do not parse this text for program logic.
Example
{ "error": "Not Found", "message": "The resource does not exist or is not accessible to your application."}The operation conflicts with the current instance or story state. Read the current state before choosing the next action.
object
The HTTP error category. Use the status code to handle failures.
A human-readable explanation. Do not parse this text for program logic.
Example
{ "error": "Conflict", "message": "The operation conflicts with the current instance or story state. Read the current state before choosing the next action."}The JSON request body exceeds 100 KB. Reduce its size before retrying.
object
The HTTP error category. Use the status code to handle failures.
A human-readable explanation. Do not parse this text for program logic.
Example
{ "error": "Payload Too Large", "message": "The JSON request body exceeds 100 KB. Reduce its size before retrying."}The server could not complete the request. Internal error details are not exposed.
object
The HTTP error category. Use the status code to handle failures.
A human-readable explanation. Do not parse this text for program logic.
Example
{ "error": "Internal Server Error", "message": "Internal server error"}