Skip to main content
POST
/
conversations
Create a new conversation
curl --request POST \
  --url https://app.npcbuilder.com/api/conversations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "game_id": "tx65BrETVN2vMrrUIrlV",
  "character_id": "a96c6161-59f5-40f7-955e-459cd11",
  "session_id": "60Z5aZjIuFlyYbjbZZKe",
  "player_id": "550e8400-e29b-41d4-a716-446655440000",
  "metadata": {
    "location": "tavern"
  }
}
'
{
  "conversation_id": "conv_12345"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
game_id
string
required
Example:

"tx65BrETVN2vMrrUIrlV"

character_id
string
required
Example:

"a96c6161-59f5-40f7-955e-459cd11"

session_id
string
Example:

"60Z5aZjIuFlyYbjbZZKe"

player_id
string
Example:

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

metadata
object
Example:
{ "location": "tavern" }

Response

Conversation created.

conversation_id
string
Example:

"conv_12345"