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.
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.
Current password (required when changing 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
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.
User role: owner, admin, or member
Permission to create new projects
Permission to delete projects
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.
Custom prefix for the API key
Expiration time in seconds
Metadata including organization informationOrganization ID for the API key
Enable rate limiting for this key
Rate limit time window in seconds
Maximum requests per time window
Total number of requests allowed
Number of requests to refill
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
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.
The invitation ID to send
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.
curl -X GET "https://your-dokploy-instance.com/api/user.checkUserOrganizations?userId=user_123" \
-H "Authorization: Bearer YOUR_TOKEN"
Example Response
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"
}
}
}