> ## Documentation Index
> Fetch the complete documentation index at: https://docs.legitmark.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Understand general concepts, response codes, and authentication strategies.

## 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:

```javascript theme={null}
const headers = {
  'Authorization': 'Bearer leo_xxxxxxxxx',
  'Content-Type': 'application/json'
};
```

See the complete [Authentication Setup](/partner/authentication) guide for registration and security requirements.

## Response Format

### Success Response

All successful API responses follow this structure:

```json theme={null}
{
  "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
