Skip to main content

Base URL

The Legitmark API is built on REST principles. We enforce HTTPS in every request to improve data security, integrity, and privacy. The API does not support HTTP. All requests contain the following base URL:
https://api.Legitmark.com

Authentication

Include your API key in the Authorization header for all requests:
const headers = {
  'Authorization': 'Bearer leo_xxxxxxxxx',
  'Content-Type': 'application/json'
};
See the complete Authentication Setup guide for registration and security requirements.

Response Format

Success Response

All successful API responses follow this structure:
{
  "success": true,
  "message": "Operation completed successfully",
  "data": {
    // Response data in snake_case format
  },
  "metadata": {
    // Pagination metadata (for list endpoints)
    "total_count": 100,
    "page_number": 1,
    "total_pages": 10,
    "page_size": 10
  }
}

Pagination

List endpoints support pagination using query parameters:
  • page_number: Page number (default: 1, minimum: 1)
  • page_size: Number of items per page (default: 20, maximum: 100)
  • sort_by: Field to sort by
  • sort_direction: Sort direction (asc or desc)
Example:
GET /api/users?page_number=1&page_size=20&sort_by=created_at&sort_direction=desc

Data Format

  • All request and response data uses snake_case formatting
  • Dates are in ISO 8601 format (e.g., 2024-01-01T00:00:00.000Z)
  • UUIDs are used for resource identifiers
  • Timestamps include created_at and updated_at fields

Content Types

  • Request Content-Type: application/json
  • Response Content-Type: application/json
  • All requests must include proper Content-Type headers