Skip to content
moxon home

Online Chat

The /chat endpoint provides a real-time messaging system with support for public and private channels. Messages are stored for 1 hour.

posthttps://api.moxon.dev/v5/chat
Try itpost/v5/chat

Parameters

  • usernamestringrequired

    The username of the user who sends the message

  • messagestringrequired

    The message to send

  • sessionstringrequired

    The session ID of the user

  • tokenstringoptional

    The key used to connect to a private chat. If not provided, the message will be sent to the global chat

Code Examples

Response Fields

  • messagestring

    Confirmation message

Error Responses

  • 429Global rate limit exceeded.Global API rate limit reached
  • 429You have exceeded the limit of X requests per hour.Hourly IP/token limit reached
  • 400Rate limit exceeded. Try again in X seconds.Per-user short-window limit
  • 400Session ID mismatchSession does not match the user

Error Handling

If parameters are missing or invalid, the API will return an error:

  • 400Please provide a username (?username={username})The username parameter is missing
  • 400Please provide a message (&message={message})The message parameter is missing
  • 400Please provide a valid session ID (&session={ID})The session parameter is missing or invalid