API Documentation | ChatRPG (1.0.0)

Download OpenAPI specification:

API fro ChatRPG

User

Create

New user registration

Request Body schema: application/json
name
required
string

Name of new user

email
required
string <email>

Email address of new user

password
required
string

Password for user

confirm_password
required
string

Confirmation password

url
string <url>

User validation. Create hidden input, empty by default. Fails if it is anything other than an empty string.

time
string <date>

User validation. Create hidden input and autofill a date on page load. Server checks time from page load.

Responses

Request samples

Content type
application/json
{
  • "name": "John Smith",
  • "email": "john.smith@mail.com",
  • "password": "password123",
  • "confirm_password": "password123",
  • "url": "",
  • "time": "2026-05-24T15:33:03.365Z"
}

Response samples

Content type
applicaton/json
{
  • "success": true
}

Get One

Retrieve the user data for a user

Authorizations:
UserAuth

Responses

Response samples

Content type
application/json
{
  • "id": "019e5a61-2977-773c-aeb4-d9be192ec0c4",
  • "name": "John Smith",
  • "email": "john.smith@mail.com"
}

Login

User login

Request Body schema: application/json
email
required
string <email>

User email

password
required
string <password>

User password

Responses

Request samples

Content type
application/json
{
  • "email": "john.smith@mail.com",
  • "password": "password123"
}

Response samples

Content type
application/json
{
  • "success": true
}

Log out

User log out

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Payment Intent

Create the Stripe payment intent for the user

Authorizations:
UserAuth
Request Body schema: application/json
token_packs
required
number >= 5

Number of token packs for the user to purchase

Responses

Request samples

Content type
application/json
{
  • "token_packs": 8
}

Response samples

Content type
application/json
{
  • "client-secret": "pi_3MtwBwLkdIwHu7ix28a3tqPa_secret_YrKJUKribcBjcG8HVhfZluoGH"
}

Game

Create

Create a new game

Authorizations:
UserAuth
Request Body schema: application/json
title
required
string

Title for the game

game_context
required
string

Any information/context that the user wants to provide for the running of the overall game.

Responses

Request samples

Content type
application/json
{
  • "title": "Demon Barber of Fleet Street",
  • "game_context": "Lorem Ipsum, etc..."
}

Response samples

Content type
application/json
{
  • "id": "019eb747-4371-7230-b3f0-53550cd253c6",
  • "title": "Demon Barber of Fleet Street",
  • "world_context": "Lorem Ipsum, etc...",
  • "created_at": "2026-06-11T15:26:34.176Z"
}