Skip to main content

Introduction

The Dokploy API provides programmatic access to all features available in the Dokploy platform. You can use the API to deploy applications, manage databases, configure servers, monitor resources, and orchestrate your entire infrastructure.

API Architecture

Dokploy uses tRPC (TypeScript Remote Procedure Call) for its API architecture. tRPC provides end-to-end type safety and excellent developer experience, particularly when working with TypeScript clients.

What is tRPC?

tRPC allows you to build fully type-safe APIs without schemas or code generation. The API definitions are written in TypeScript and automatically shared between the server and client, ensuring type safety across your entire stack.

Key Benefits

  • Type Safety: Full TypeScript type inference from server to client
  • No Code Generation: API types are automatically derived
  • Runtime Validation: Input validation using Zod schemas
  • Modern DX: Excellent developer experience with autocomplete and inline documentation

Base URL

All API requests should be made to your Dokploy instance:
https://your-dokploy-instance.com/api
Replace your-dokploy-instance.com with your actual Dokploy domain.

Endpoint Structure

Dokploy API endpoints follow the tRPC naming convention:
/api/{router}.{procedure}
Components:
  • router: The service category (e.g., application, project, docker)
  • procedure: The specific action to perform (e.g., create, one, all, update)

Example Endpoints

# Get all projects
GET /api/project.all

# Create an application
POST /api/application.create

# Get Docker containers
GET /api/docker.getContainers

# Restart a container
POST /api/docker.restartContainer

Available Routers

Dokploy organizes its API into the following routers:
RouterDescription
adminAdministrative operations and monitoring setup
applicationApplication management and deployment
backupBackup configuration and management
certificatesSSL certificate management
clusterMulti-node cluster operations
composeDocker Compose stack management
deploymentDeployment history and operations
destinationDeployment destination configuration
dockerDocker container and image management
domainDomain and routing configuration
environmentEnvironment variable management
mariadbMariaDB database operations
mongoMongoDB database operations
mysqlMySQL database operations
notificationNotification settings and alerts
organizationOrganization and team management
postgresPostgreSQL database operations
projectProject management operations
redisRedis database operations
registryDocker registry configuration
serverServer management and configuration
settingsGlobal settings management
userUser management and authentication

Request Types

Query Procedures (GET)

Used for retrieving data. Parameters are passed as query strings.
GET /api/project.one?projectId=abc123

Mutation Procedures (POST)

Used for creating, updating, or deleting resources. Data is sent in the request body as JSON.
POST /api/application.create
Content-Type: application/json

{
  "name": "my-app",
  "environmentId": "env-123"
}

Response Format

All API responses return JSON data: Success Response:
{
  "result": {
    "data": {
      // Response data here
    }
  }
}
Error Response:
{
  "error": {
    "message": "Error description",
    "code": "ERROR_CODE",
    "data": {
      // Additional error details
    }
  }
}

HTTP Status Codes

Status CodeDescription
200Success - Request completed successfully
400Bad Request - Invalid parameters or request body
401Unauthorized - Missing or invalid authentication
403Forbidden - Insufficient permissions
404Not Found - Resource does not exist
500Internal Server Error - Server-side error occurred

Rate Limiting

Rate limiting policies depend on your Dokploy instance configuration. Check with your administrator for specific limits.

Next Steps

Authentication

Learn how to authenticate your API requests

Application API

Explore application management endpoints

Project API

Manage projects programmatically

Docker API

Control Docker containers and images

Build docs developers (and LLMs) love