Skip to main content

DocGate API Documentation

Build integrations with the DocGate document sharing and analytics platform.

Authentication

All API requests require a Bearer token. Generate an API key in your workspace under Settings > Developer.

Authorization: Bearer dg_live_...

API keys use the dg_live_ prefix. Keep your key secret and never expose it in client-side code.

Base URL

https://docgate.app/api/v1

All endpoints are scoped under /api/v1. Requests are workspace-scoped based on the API key used.

Rate Limits

Rate limits are applied per API key using a sliding window:

  • Free: 100 requests per minute
  • Pro: 1,000 requests per minute
  • Business: 5,000 requests per minute

Rate limit headers (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset) are included in every response.

Pagination

List endpoints use cursor-based pagination with two parameters:

  • limit— Number of items (1–100, default 20)
  • starting_after — Cursor ID from the previous page

Responses include has_more and next_cursor fields to drive pagination.

Error Format

Errors follow a consistent envelope inspired by the Stripe API:

{
  "error": {
    "type": "invalid_request_error",
    "message": "Document not found",
    "code": "resource_not_found"
  }
}

Error types: authentication_error, invalid_request_error, rate_limit_error, api_error.

Try It Out

Use the interactive explorer below to browse endpoints, view schemas, and send test requests directly from this page.

OpenAPI Specification

The full machine-readable spec is available at /api/openapi (requires authentication). Import it into tools like Postman, Insomnia, or any OpenAPI-compatible client.

Endpoints

Health
GET/api/v1/health
Documents
GET/api/v1/documents
POST/api/v1/documents
GET/api/v1/documents/:id
PUT/api/v1/documents/:id
DELETE/api/v1/documents/:id
Links
GET/api/v1/documents/:id/links
POST/api/v1/documents/:id/links
GET/api/v1/links/:id
PUT/api/v1/links/:id
DELETE/api/v1/links/:id
Folders
GET/api/v1/folders
POST/api/v1/folders
PUT/api/v1/folders/:id
DELETE/api/v1/folders/:id
Analytics
GET/api/v1/documents/:id/analytics
GET/api/v1/documents/:id/analytics/pages
Views
GET/api/v1/links/:id/views
GET/api/v1/views
Data Rooms
GET/api/v1/data-rooms
POST/api/v1/data-rooms
GET/api/v1/data-rooms/:id
PUT/api/v1/data-rooms/:id
DELETE/api/v1/data-rooms/:id
GET/api/v1/data-rooms/:id/documents
POST/api/v1/data-rooms/:id/documents
DELETE/api/v1/data-rooms/:id/documents/:documentId
GET/api/v1/data-rooms/:id/analytics