Dokploy

auth

POST/auth.createAdmin

auth-createAdmin

Authorization

Authorization
Required
Bearer <token>

In: header

Request Body

email
Required
string

Format: "email"

password
Required
string

Minimum length: 8
Status codeDescription
200Successful response
defaultError response
curl -X POST "http://localhost:3000/api/auth.createAdmin" \
  -d '{
  "email": "[email protected]",
  "password": "stringst"
}'

{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}

POST/auth.createUser

auth-createUser

Authorization

Authorization
Required
Bearer <token>

In: header

Request Body

password
Required
string

Minimum length: 8

id
Required
string

token
Required
string

Minimum length: 1
Status codeDescription
200Successful response
defaultError response
curl -X POST "http://localhost:3000/api/auth.createUser" \
  -d '{
  "password": "stringst",
  "id": "string",
  "token": "string"
}'

{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}

POST/auth.login

auth-login

Authorization

Authorization
Required
Bearer <token>

In: header

Request Body

email
Required
string

Format: "email"

password
Required
string

Minimum length: 8
Status codeDescription
200Successful response
defaultError response
curl -X POST "http://localhost:3000/api/auth.login" \
  -d '{
  "email": "[email protected]",
  "password": "stringst"
}'

{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}

GET/auth.get

auth-get

Authorization

Authorization
Required
Bearer <token>

In: header

Status codeDescription
200Successful response
defaultError response
curl -X GET "http://localhost:3000/api/auth.get"

{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}

POST/auth.logout

auth-logout

Authorization

Authorization
Required
Bearer <token>

In: header

Status codeDescription
200Successful response
defaultError response
curl -X POST "http://localhost:3000/api/auth.logout"

{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}

POST/auth.update

auth-update

Authorization

Authorization
Required
Bearer <token>

In: header

Request Body

idstring

email
Required
string | null

password
Required
string | null

rolstring

Value in: "admin" | "user"

imagestring

secretstring | null

tokenstring | null

is2FAEnabledboolean

createdAtstring

Status codeDescription
200Successful response
defaultError response
curl -X POST "http://localhost:3000/api/auth.update" \
  -d '{
  "id": "string",
  "email": "string",
  "password": "string",
  "rol": "admin",
  "image": "string",
  "secret": "string",
  "token": "string",
  "is2FAEnabled": true,
  "createdAt": "string"
}'

{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}

POST/auth.generateToken

auth-generateToken

Authorization

Authorization
Required
Bearer <token>

In: header

Status codeDescription
200Successful response
defaultError response
curl -X POST "http://localhost:3000/api/auth.generateToken"

{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}

GET/auth.one

auth-one

Authorization

Authorization
Required
Bearer <token>

In: header

Query Parameters

id
Required
string

Status codeDescription
200Successful response
defaultError response
curl -X GET "http://localhost:3000/api/auth.one?id=string"

{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}

POST/auth.updateByAdmin

auth-updateByAdmin

Authorization

Authorization
Required
Bearer <token>

In: header

Request Body

id
Required
string

Minimum length: 1

email
Required
string | null

password
Required
string | null

rolstring

Value in: "admin" | "user"

imagestring

secretstring | null

tokenstring | null

is2FAEnabledboolean

createdAtstring

Status codeDescription
200Successful response
defaultError response
curl -X POST "http://localhost:3000/api/auth.updateByAdmin" \
  -d '{
  "id": "string",
  "email": "string",
  "password": "string",
  "rol": "admin",
  "image": "string",
  "secret": "string",
  "token": "string",
  "is2FAEnabled": true,
  "createdAt": "string"
}'

{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}

GET/auth.generate2FASecret

auth-generate2FASecret

Authorization

Authorization
Required
Bearer <token>

In: header

Status codeDescription
200Successful response
defaultError response
curl -X GET "http://localhost:3000/api/auth.generate2FASecret"

{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}

POST/auth.verify2FASetup

auth-verify2FASetup

Authorization

Authorization
Required
Bearer <token>

In: header

Request Body

pin
Required
string

Minimum length: 6

secret
Required
string

Minimum length: 1
Status codeDescription
200Successful response
defaultError response
curl -X POST "http://localhost:3000/api/auth.verify2FASetup" \
  -d '{
  "pin": "string",
  "secret": "string"
}'

{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}

POST/auth.verifyLogin2FA

auth-verifyLogin2FA

Authorization

Authorization
Required
Bearer <token>

In: header

Request Body

pin
Required
string

Minimum length: 6

id
Required
string

Status codeDescription
200Successful response
defaultError response
curl -X POST "http://localhost:3000/api/auth.verifyLogin2FA" \
  -d '{
  "pin": "string",
  "id": "string"
}'

{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}

POST/auth.disable2FA

auth-disable2FA

Authorization

Authorization
Required
Bearer <token>

In: header

Status codeDescription
200Successful response
defaultError response
curl -X POST "http://localhost:3000/api/auth.disable2FA"

{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}

POST/auth.verifyToken

auth-verifyToken

Authorization

Authorization
Required
Bearer <token>

In: header

Status codeDescription
200Successful response
defaultError response
curl -X POST "http://localhost:3000/api/auth.verifyToken"

{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}

On this page