Auth

Register with access code

post/api/auth/register

Request

  • Base URL
    https://api.rewritelifestyle.ai (the document declares no server; this is the origin it was published from)
  • URL
    https://api.rewritelifestyle.ai/api/auth/register
  • Auth
    none declared

Request body

emailstring required
passwordstring required
accessCodestring required
firstNamestring
lastNamestring
phonestring required
countrystring

ISO 3166-1 alpha-2 country code. Falls back to a code derived from the request timezone if omitted (back-compat for older app versions).

isEnrolledboolean
termsAcceptedboolean required

User must accept Terms & Conditions to register

privacyAcceptedboolean required

User must accept Privacy Policy to register

aiDisclosureAcceptedboolean required

User must acknowledge AI-powered features disclosure

ageConfirmedboolean required

User confirms they are 18 years of age or older

healthDataConsentAcceptedboolean required

User must consent to collection and use of health and wellness data

coachDataConsentAcceptedboolean

User consents to sharing their data with their assigned coach

Example request

{
  "email": "user@example.com",
  "password": "Password1",
  "accessCode": "ABC123",
  "firstName": "Jane",
  "lastName": "Doe",
  "phone": "+15551234567",
  "country": "US",
  "termsAccepted": true,
  "privacyAccepted": true,
  "aiDisclosureAccepted": true,
  "ageConfirmed": true,
  "healthDataConsentAccepted": true,
  "coachDataConsentAccepted": true
}

Response

unknown required

Example response

{
  "success": true,
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "user": {
    "id": 6,
    "email": "new@example.com",
    "role": "user",
    "name": "John Doe"
  }
}

Changes

No recorded changes to this operation across all 34 revisions of this API.