APIDocumentation

Integrate Forevr into your applications with our comprehensive REST API. Build secure, automated systems for digital legacy management.

Quick Start

🔑

1. Get API Key

Sign up for a Professional or Admin account to access the API

📚

2. Read Docs

Review our API endpoints and authentication methods

🚀

3. Start Building

Use our SDKs or make direct HTTP requests

API Endpoints

POST/api/auth/register

Create a new user account

Auth: NoneRate Limit: 5 requests per hour
POST/api/auth/login

Authenticate user and get access token

Auth: NoneRate Limit: 10 requests per hour
GET/api/messages

Get user's messages

Auth: Bearer TokenRate Limit: 100 requests per hour
POST/api/messages

Create a new message

Auth: Bearer TokenRate Limit: 50 requests per hour
PUT/api/messages/{id}

Update an existing message

Auth: Bearer TokenRate Limit: 50 requests per hour
DELETE/api/messages/{id}

Delete a message

Auth: Bearer TokenRate Limit: 50 requests per hour
POST/api/check-in

Perform a check-in

Auth: Bearer TokenRate Limit: 100 requests per hour
GET/api/public/message/{token}

Access a public message (for recipients)

Auth: NoneRate Limit: 1000 requests per hour

Code Examples

Create a new message

JavaScript
const response = await fetch('/api/messages', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    content: 'Your encrypted message content',
    recipients: ['recipient@example.com'],
    checkInInterval: 7,
    gracePeriod: 3
  })
});

const message = await response.json();

Authenticate and get messages

Python
import requests

# Login to get access token
auth_response = requests.post('https://api.yoursecretissafe.com/api/auth/login', {
    'email': 'user@example.com',
    'password': 'your_password'
})

token = auth_response.json()['access_token']

# Get user's messages
headers = {'Authorization': f'Bearer {token}'}
messages_response = requests.get('https://api.yoursecretissafe.com/api/messages', headers=headers)
messages = messages_response.json()

Perform a check-in

cURL
curl -X POST https://api.yoursecretissafe.com/api/check-in \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"messageId": "message-uuid-here"}'

SDK Features

Automatic Encryption

Client-side encryption handled automatically by our SDKs

Rate Limiting

Built-in rate limiting and retry logic for optimal performance

Offline Support

Queue operations when offline and sync when connection returns

Multi-Language

Official SDKs for JavaScript, Python, and more coming soon

Authentication

Bearer Token Authentication

All API requests require a valid Bearer token in the Authorization header. Tokens are obtained through the login endpoint and expire after 24 hours.

Authorization: Bearer YOUR_ACCESS_TOKEN

Include this header with every authenticated request to access protected endpoints.

Rate Limiting

API requests are rate-limited to ensure fair usage and system stability. Limits vary by endpoint and user tier.

Free Tier100 requests/hour
Professional1,000 requests/hour
Admin10,000 requests/hour

Error Handling

HTTP Status Codes

2xx Success
Request completed successfully
4xx Client Error
Invalid request or authentication
429 Rate Limited
Too many requests
5xx Server Error
Internal server error

Error Response Format

{
  "error": "error_type",
  "message": "Human readable error message",
  "details": {
    "field": "Additional error details"
  },
  "timestamp": "2025-01-01T00:00:00Z"
}

SDK Downloads

📦

JavaScript/Node.js

Official SDK for web and Node.js applications

🐍

Python

Python SDK for automation and scripting

🔧

REST API

Direct HTTP API for any programming language

Ready to Integrate?

Start building with our API today. Get access to professional features and higher rate limits.