Skip to main content

Documentation Index

Fetch the complete documentation index at: https://fileguard.dev/docs/llms.txt

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

Base URL

https://api.fileguard.io/api/v1

Authentication

All requests require an API key in the Authorization header:
Authorization: Bearer fg_your_api_key
See Authentication for details on creating and managing API keys.

Request Format

  • Content-Type: application/json for most endpoints
  • File uploads: multipart/form-data
  • Timestamps: ISO 8601 format (UTC)

Response Format

All responses follow a consistent structure:

Success Response

{
  "status": "SUCCESS",
  "message": "Operation successful",
  "data": { ... },
  "timestamp": "2026-01-04T10:00:00Z"
}

Error Response

{
  "status": "ERROR",
  "message": "Error description",
  "errors": ["Detailed error message 1", "Detailed error message 2"],
  "timestamp": "2026-01-04T10:00:00Z"
}

HTTP Status Codes

CodeDescription
200Success
201Created
400Bad Request - Invalid input
401Unauthorized - Invalid or missing API key
403Forbidden - Insufficient permissions
404Not Found - Resource doesn’t exist
409Conflict - Resource already exists
429Too Many Requests - Rate limit exceeded
500Internal Server Error

Pagination

List endpoints support pagination:
ParameterTypeDefaultDescription
pageinteger1Page number (1-indexed)
page_sizeinteger20Items per page (max 100)

Paginated Response

{
  "status": "SUCCESS",
  "data": {
    "data": [...],
    "pagination": {
      "page": 1,
      "page_size": 20,
      "total_items": 150,
      "total_pages": 8,
      "has_next": true,
      "has_previous": false
    }
  }
}

Rate Limiting

Rate limits vary by endpoint and tenant configuration. When exceeded:
HTTP 429 Too Many Requests
Retry-After: 45
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 0

API Endpoints

Files

MethodEndpointDescription
POST/files/uploadUpload a file
GET/files/{file_id}Get download URL
GET/files/{file_id}/metadataGet file metadata
GET/filesList files
DELETE/files/{file_id}Delete a file

File Contexts

MethodEndpointDescription
POST/contextsCreate context
GET/contextsList contexts
GET/contexts/{context_key}Get context details
PATCH/contexts/{context_key}Update context

API Keys

MethodEndpointDescription
POST/api-keysCreate API key
GET/api-keysList API keys
GET/api-keys/simpleList API keys (minimal)
GET/api-keys/{api_key_id}Get API key details
PATCH/api-keys/{api_key_id}Update API key
POST/api-keys/{api_key_id}/enableEnable API key
POST/api-keys/{api_key_id}/disableDisable API key
DELETE/api-keys/{api_key_id}Revoke API key

Statistics

MethodEndpointDescription
GET/statsDashboard statistics
GET/stats/charts/api-callsAPI calls chart data
GET/stats/charts/storageStorage chart data
GET/stats/charts/uploadsUploads chart data
GET/stats/logsAPI call logs
GET/stats/logs/exportExport logs

Audit Logs

MethodEndpointDescription
GET/audit-logsList audit logs
GET/audit-logs/entity/{type}/{id}Get entity audit history