Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.rev14ministries.com/llms.txt

Use this file to discover all available pages before exploring further.

Authentication API

Login User

POST /auth/login

Authenticate a user with email and password
Base URL: https://rzqklwfhwqmviintncqh.supabase.co/functions/v1

Request

Content-Type
string
required
application/json
apikey
string
required
Your Supabase anon key
email
string
required
User’s email address
password
string
required
User’s password

Response

success
boolean
Indicates if the request was successful
statusCode
number
HTTP status code
message
string
Response message
data
object
curl -X POST https://rzqklwfhwqmviintncqh.supabase.co/functions/v1/auth/login \
  -H "Content-Type: application/json" \
  -H "apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
  -d '{
    "email": "user@example.com",
    "password": "userpassword"
  }'
{
  "success": true,
  "statusCode": 200,
  "message": "Welcome back",
  "data": {
    "payload": {
      "id": "f9cc094c-ba9c-4a0a-82b9-e40d589e97db",
      "name": "John Doe",
      "phoneNumber": null,
      "email": "user@example.com",
      "role": "STANDARD_USER",
      "status": "ACTIVE",
      "isVerified": true,
      "createdAt": "2025-08-15T13:53:15.974Z",
      "updatedAt": "2025-08-15T13:53:15.974Z"
    },
    "accessToken": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImY5Y2MwOTRjLWJhOWMtNGEwYS04MmI5LWU0MGQ1ODllOTdkYiIsInJvbGUiOiJTVEFOREFSRF9VU0VSIiwiaWF0IjoxNzYwNDI2MzI4LCJleHAiOjE3NjA0MzM1Mjh9.6iIAZ8awuIAvEGBRDGfAfN31DI8vB2MjcXpVRLbbH0I"
  }
}

Register User

POST /auth/register

Create a new user account

Request

Content-Type
string
required
application/json
apikey
string
required
Your Supabase anon key
name
string
required
User’s full name
email
string
required
User’s email address
password
string
required
User’s password (minimum 8 characters)

Response

Similar to login response with newly created user data.
curl -X POST https://rzqklwfhwqmviintncqh.supabase.co/functions/v1/auth/register \
  -H "Content-Type: application/json" \
  -H "apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
  -d '{
    "name": "John Doe",
    "email": "john@example.com",
    "password": "securepassword123"
  }'

Create Password

POST /auth/create-password

Set or update user password

Request

email
string
required
User’s email address
password
string
required
New password to set

Response

message
string
Success message
data
object
User data and new access token
curl -X POST https://rzqklwfhwqmviintncqh.supabase.co/functions/v1/auth/create-password \
  -H "Content-Type: application/json" \
  -H "apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
  -d '{
    "email": "user@example.com",
    "password": "newpassword123"
  }'

Error Codes

Status CodeErrorDescription
400Bad RequestInvalid request body or missing required fields
401UnauthorizedInvalid credentials
404Not FoundUser not found
500Internal Server ErrorServer error occurred
All authentication endpoints return JWT tokens that expire after 2 hours. Store tokens securely and handle expiration gracefully in your application.