Skip to main content

Quickstart

Get up and running with the Revelation 14 API in under 5 minutes.

Step 1: Authentication

First, you’ll need to authenticate with the API to get an access token.
curl -X POST https://rzqklwfhwqmviintncqh.supabase.co/functions/v1/auth/login \
  -H "Content-Type: application/json" \
  -H "apikey: your_supabase_anon_key" \
  -d '{
    "email": "your@email.com",
    "password": "your_password"
  }'
const response = await fetch('https://rzqklwfhwqmviintncqh.supabase.co/functions/v1/auth/login', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'apikey': 'your_supabase_anon_key'
  },
  body: JSON.stringify({
    email: 'your@email.com',
    password: 'your_password'
  })
});

const data = await response.json();
const accessToken = data.data.accessToken;
final response = await http.post(
  Uri.parse('https://rzqklwfhwqmviintncqh.supabase.co/functions/v1/auth/login'),
  headers: {
    'Content-Type': 'application/json',
    'apikey': 'your_supabase_anon_key',
  },
  body: jsonEncode({
    'email': 'your@email.com',
    'password': 'your_password',
  }),
);

final data = jsonDecode(response.body);
final accessToken = data['data']['accessToken'];

Step 2: Make Your First API Call

Now use your access token to create a note:
curl -X POST https://rzqklwfhwqmviintncqh.supabase.co/functions/v1/notes-create \
  -H "Authorization: Bearer your_access_token" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "My First Note",
    "content": "This is my first note created via the API!",
    "status": "DRAFT"
  }'
const response = await fetch('https://rzqklwfhwqmviintncqh.supabase.co/functions/v1/notes-create', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${accessToken}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    title: 'My First Note',
    content: 'This is my first note created via the API!',
    status: 'DRAFT'
  })
});

const note = await response.json();
final response = await http.post(
  Uri.parse('https://rzqklwfhwqmviintncqh.supabase.co/functions/v1/notes-create'),
  headers: {
    'Authorization': 'Bearer $accessToken',
    'Content-Type': 'application/json',
  },
  body: jsonEncode({
    'title': 'My First Note',
    'content': 'This is my first note created via the API!',
    'status': 'DRAFT',
  }),
);

final note = jsonDecode(response.body);

Step 3: Fetch Your Notes

Retrieve your notes with proper user filtering:
curl -X GET "https://rzqklwfhwqmviintncqh.supabase.co/functions/v1/notes-fetch?limit=10" \
  -H "Authorization: Bearer your_access_token"
const response = await fetch('https://rzqklwfhwqmviintncqh.supabase.co/functions/v1/notes-fetch?limit=10', {
  headers: {
    'Authorization': `Bearer ${accessToken}`
  }
});

const data = await response.json();
const notes = data.data.notes;
final response = await http.get(
  Uri.parse('https://rzqklwfhwqmviintncqh.supabase.co/functions/v1/notes-fetch?limit=10'),
  headers: {
    'Authorization': 'Bearer $accessToken',
  },
);

final data = jsonDecode(response.body);
final notes = data['data']['notes'];

Expected Response

{
  "message": "Notes fetched successfully",
  "data": {
    "notes": [
      {
        "id": "abc123...",
        "title": "My First Note",
        "content": "This is my first note created via the API!",
        "status": "DRAFT",
        "createdBy": "user_id",
        "createdAt": "2025-10-14T09:33:33.348Z",
        "updatedAt": "2025-10-14T09:33:33.348Z"
      }
    ],
    "pagination": {
      "total": 1,
      "limit": 10,
      "offset": 0,
      "hasMore": false
    },
    "userId": "user_id"
  },
  "success": true
}

Next Steps

Authentication Guide

Learn about JWT tokens, user roles, and security

API Reference

Explore all available endpoints and parameters
All API endpoints require valid authentication. Make sure to include your access token in the Authorization header.