post/auth/register

Register account

Create a new user account with email and password. Requires CAPTCHA verification. User account is created but must verify email before logging in.

register_account

Request body

application/json

json
{
  "type": "object",
  "properties": {
    "email": {
      "$ref": "#/components/schemas/EmailType"
    },
    "username": {
      "$ref": "#/components/schemas/UsernameType"
    },
    "global_name": {
      "type": "string",
      "description": "Display name shown to other users"
    },
    "password": {
      "$ref": "#/components/schemas/PasswordType"
    },
    "date_of_birth": {
      "type": "string",
      "description": "Date of birth in YYYY-MM-DD format"
    },
    "consent": {
      "type": "boolean",
      "description": "Whether user consents to terms of service"
    },
    "invite_code": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Guild invite code to join after registration"
    },
    "registration_url_code": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Admin-issued registration URL code to use for this registration"
    },
    "theme": {
      "type": "string",
      "enum": [
        "dark",
        "dark_legacy",
        "coal",
        "light",
        "system"
      ],
      "x-enumNames": [
        "DARK",
        "DARK_LEGACY",
        "COAL",
        "LIGHT",
        "SYSTEM"
      ],
      "x-enumDescriptions": [
        "Dark colour theme",
        "Legacy dark colour theme (original neutral grey palette)",
        "Coal/darker colour theme",
        "Light colour theme",
        "Follow system colour preference"
      ],
      "description": "Initial UI theme preference for the new account"
    }
  }
}

Responses

200

Success

json
{
  "oneOf": [
    {
      "$ref": "#/components/schemas/AuthTokenWithUserIdResponse"
    },
    {
      "type": "object",
      "properties": {
        "mfa": {
          "type": "boolean",
          "enum": [
            true
          ],
          "description": "Indicates MFA is required to complete authentication"
        },
        "ticket": {
          "type": "string",
          "description": "MFA ticket to use when completing MFA verification"
        },
        "allowed_methods": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "maxItems": 10,
          "description": "List of allowed MFA methods"
        },
        "totp": {
          "type": "boolean",
          "description": "Whether TOTP authenticator MFA is available"
        },
        "webauthn": {
          "type": "boolean",
          "description": "Whether WebAuthn security key MFA is available"
        }
      },
      "required": [
        "mfa",
        "ticket",
        "allowed_methods",
        "totp",
        "webauthn"
      ]
    },
    {
      "$ref": "#/components/schemas/AuthRegistrationPendingApprovalResponse"
    }
  ]
}
400

Bad Request - The request was malformed or contained invalid data

json
{
  "type": "object",
  "properties": {
    "code": {
      "$ref": "#/components/schemas/APIErrorCode"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "type": "array",
      "description": "Field-specific validation errors",
      "items": {
        "$ref": "#/components/schemas/ValidationErrorItem"
      }
    }
  },
  "required": [
    "code",
    "message"
  ]
}
429

Too Many Requests - You are being rate limited

json
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "enum": [
        "RATE_LIMITED"
      ]
    },
    "message": {
      "type": "string"
    },
    "retry_after": {
      "type": "number",
      "description": "Seconds to wait before retrying"
    },
    "global": {
      "type": "boolean",
      "description": "Whether this is a global rate limit"
    }
  },
  "required": [
    "code",
    "message",
    "retry_after"
  ]
}
500

Internal Server Error - An unexpected error occurred

json
{
  "type": "object",
  "properties": {
    "code": {
      "$ref": "#/components/schemas/APIErrorCode"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "type": "array",
      "description": "Field-specific validation errors",
      "items": {
        "$ref": "#/components/schemas/ValidationErrorItem"
      }
    }
  },
  "required": [
    "code",
    "message"
  ]
}