Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/JanContrerasDev/gestor-contrasenas/llms.txt

Use this file to discover all available pages before exploring further.

POST /api/createPassword

Creates a new password entry in the system. All three fields (password, sistema, usuario) are required.

Request Body

password
string
required
The password value to store
sistema
string
required
System or application name associated with this password
usuario
string
required
Username associated with this password

Validation Rules

  • password - Required field
  • sistema - Required field
  • usuario - Required field

Request

curl -X POST http://your-domain.com/api/createPassword \
  -H "Content-Type: application/json" \
  -d '{
    "password": "securePass123",
    "sistema": "Production Database",
    "usuario": "admin"
  }'

Response

message
string
Success or error message
status
integer
HTTP status code
errors
object
Validation errors (only present when status is 400)

Response Codes

  • 200 - Success - Password created successfully
  • 400 - Bad Request - Validation failed (missing required fields)
  • 500 - Internal Server Error - Failed to create password

Example Response (200 OK)

{
  "message": "SE CREÓ UNA NUEVA CONTRASEÑA",
  "status": 200
}

Example Response (400 Bad Request)

{
  "message": "Invalid data",
  "errors": {
    "password": [
      "The password field is required."
    ],
    "sistema": [
      "The sistema field is required."
    ]
  },
  "status": 400
}

Example Response (500 Internal Server Error)

{
  "message": "Error creating password",
  "status": 500
}

Build docs developers (and LLMs) love