Skip to main content
POST
/
sessionmanager
Create a new session
curl --request POST \
  --url https://app.npcbuilder.com/api/sessionmanager \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "session_key": "campaign_nightfall",
  "game_id": "game_12345",
  "player_id": "550e8400-e29b-41d4-a716-446655440000"
}'
{
  "message": "Session created for key: campaign_nightfall with id: ABC123 has been created",
  "session_key": "<string>",
  "session_id": "<string>",
  "player_id": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

The session details required to create a new session.

Schema for creating a new session. Contains session key, game identifier, and player identifier.

session_key
string
required

A unique key for the session.

Maximum length: 50
Example:

"campaign_nightfall"

game_id
string
required

The unique identifier for the game.

Maximum length: 50
Example:

"game_12345"

player_id
string<uuidv4>
required

The unique identifier for the player.

Example:

"550e8400-e29b-41d4-a716-446655440000"

Response

Session created successfully.

message
string

Confirmation message including session details.

Example:

"Session created for key: campaign_nightfall with id: ABC123 has been created"

session_key
string
session_id
string
player_id
string<uuidv4>
I