Skip to main content

List All Users

Retrieve all users in the current organization.

GET /user.all

Requires admin privileges.

Authentication

Requires admin authentication.

Example Request

curl -X GET "https://your-dokploy-instance.com/api/user.all" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN"

Example Response

[
  {
    "userId": "user_123",
    "email": "[email protected]",
    "name": "John Doe",
    "role": "member",
    "createdAt": "2024-03-15T10:00:00.000Z",
    "user": {
      "email": "[email protected]",
      "name": "John Doe",
      "image": "https://avatar.example.com/john.jpg"
    }
  }
]

Get User

GET /user.one

Retrieve details of a specific user.
userId
string
required
The unique identifier of the user

Authorization

  • Users can access their own information
  • Admins can access any user in their organization

Example Request

curl -X GET "https://your-dokploy-instance.com/api/user.one?userId=user_123" \
  -H "Authorization: Bearer YOUR_TOKEN"

Get Current User

GET /user.get

Retrieve the currently authenticated user’s information including API keys.

Example Request

curl -X GET "https://your-dokploy-instance.com/api/user.get" \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

{
  "userId": "user_123",
  "email": "[email protected]",
  "role": "admin",
  "user": {
    "id": "user_123",
    "email": "[email protected]",
    "name": "John Doe",
    "image": "https://avatar.example.com/john.jpg",
    "apiKeys": [
      {
        "id": "key_abc123",
        "name": "Production API Key",
        "createdAt": "2024-03-15T10:00:00.000Z"
      }
    ]
  }
}

Update User

POST /user.update

Update user profile and password.
name
string
Updated user name
email
string
Updated email address
image
string
Profile image URL
currentPassword
string
Current password (required when changing password)
password
string
New password

Example Request

curl -X POST "https://your-dokploy-instance.com/api/user.update" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "name": "John Smith",
    "currentPassword": "oldPassword123",
    "password": "newSecurePassword456"
  }'

Remove User

POST /user.remove

Delete a user from the organization.
  • Only admins and owners can delete users
  • Cannot delete the organization owner
  • Admins cannot delete themselves
  • Only owners can delete other admins
userId
string
required
The unique identifier of the user to remove

Example Request

curl -X POST "https://your-dokploy-instance.com/api/user.remove" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  -d '{
    "userId": "user_123"
  }'

Assign Permissions

POST /user.assignPermissions

Update user permissions and role within the organization.
Only organization owners can assign permissions.
id
string
required
User ID to update
role
string
User role: owner, admin, or member
canCreateProjects
boolean
Permission to create new projects
canDeleteProjects
boolean
Permission to delete projects
canAccessAuditLog
boolean
Permission to view audit logs

Example Request

curl -X POST "https://your-dokploy-instance.com/api/user.assignPermissions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_OWNER_TOKEN" \
  -d '{
    "id": "user_123",
    "role": "admin",
    "canCreateProjects": true,
    "canDeleteProjects": false,
    "canAccessAuditLog": true
  }'

API Key Management

Create API Key

POST /user.createApiKey

Generate a new API key for programmatic access.
name
string
required
Name for the API key
prefix
string
Custom prefix for the API key
expiresIn
number
Expiration time in seconds
metadata
object
required
Metadata including organization information
organizationId
string
required
Organization ID for the API key
rateLimitEnabled
boolean
Enable rate limiting for this key
rateLimitTimeWindow
number
Rate limit time window in seconds
rateLimitMax
number
Maximum requests per time window
remaining
number
Total number of requests allowed
refillAmount
number
Number of requests to refill
refillInterval
number
Refill interval in seconds

Example Request

curl -X POST "https://your-dokploy-instance.com/api/user.createApiKey" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "name": "Production API Key",
    "prefix": "prod",
    "expiresIn": 31536000,
    "metadata": {
      "organizationId": "org_123"
    },
    "rateLimitEnabled": true,
    "rateLimitTimeWindow": 3600,
    "rateLimitMax": 1000
  }'

Example Response

{
  "id": "key_abc123",
  "name": "Production API Key",
  "key": "prod_live_1234567890abcdef",
  "prefix": "prod",
  "createdAt": "2024-03-15T10:00:00.000Z",
  "expiresAt": "2025-03-15T10:00:00.000Z"
}
Store the API key securely. It will only be shown once during creation.

Delete API Key

POST /user.deleteApiKey

apiKeyId
string
required
The unique identifier of the API key to delete
curl -X POST "https://your-dokploy-instance.com/api/user.deleteApiKey" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "apiKeyId": "key_abc123"
  }'

Invitations

Get User Invitations

GET /user.getInvitations

Retrieve pending invitations for the current user.
curl -X GET "https://your-dokploy-instance.com/api/user.getInvitations" \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

[
  {
    "id": "inv_123",
    "email": "[email protected]",
    "role": "member",
    "status": "pending",
    "expiresAt": "2024-03-22T10:00:00.000Z",
    "organization": {
      "id": "org_456",
      "name": "Acme Corporation",
      "createdAt": "2024-01-01T00:00:00.000Z"
    }
  }
]

Send Invitation

POST /user.sendInvitation

Send an invitation email to a user.
Admin privileges required. Disabled on Dokploy Cloud.
invitationId
string
required
The invitation ID to send
notificationId
string
required
Notification provider ID for sending the email
curl -X POST "https://your-dokploy-instance.com/api/user.sendInvitation" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  -d '{
    "invitationId": "inv_123",
    "notificationId": "notif_456"
  }'

User Organization Info

Check User Organizations

GET /user.checkUserOrganizations

Check how many organizations a user belongs to.
userId
string
required
The user ID to check
curl -X GET "https://your-dokploy-instance.com/api/user.checkUserOrganizations?userId=user_123" \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

{
  "count": 3
}

Metrics Access

Get Metrics Token

GET /user.getMetricsToken

Retrieve the token and configuration for accessing metrics.
curl -X GET "https://your-dokploy-instance.com/api/user.getMetricsToken" \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

{
  "serverIp": "203.0.113.42",
  "enabledFeatures": true,
  "metricsConfig": {
    "server": {
      "refreshRate": 5,
      "port": 9090,
      "token": "metrics-token-here"
    }
  }
}

Build docs developers (and LLMs) love