For the complete documentation index, see llms.txt. This page is also available as Markdown.

Change database password

Changes the password for the specified database user.

Change database password

patch

Changes the password for the specified database user.

The database name must be the full name returned by the list databases endpoint. The password must also be updated in any website configuration that uses this database.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
usernamestringRequiredExample: u123456789
namestringRequired

Full database name as returned by the list databases endpoint.

Example: u123456789_test_db
Body
passwordstring · passwordRequired

New database user password.

Example: Secu4ePa$$wor!D
Responses
200

Success empty response

application/json
messagestringOptionalExample: Request accepted
patch/api/hosting/v1/accounts/{username}/databases/{name}/change-password
PATCH /api/hosting/v1/accounts/{username}/databases/{name}/change-password HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 30

{
  "password": "Secu4ePa$$wor!D"
}
{
  "message": "Request accepted"
}

Last updated

Was this helpful?