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

Create account database

Creates a database with a database user and password for the specified account. The database name and user are automatically prefixed with the account username when needed.

Create account database

post

Creates a database with a database user and password for the specified account.

The database name and user are automatically prefixed with the account username when needed.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
usernamestringRequiredExample: u123456789
Body
namestringRequired

Database name. If the account username prefix is omitted, it is added automatically.

Example: u123456789_test_db
userstringRequired

Database user. If the account username prefix is omitted, it is added automatically.

Example: u123456789_admin
passwordstring · passwordRequired

Database user password.

Example: Str0ngP@ssword!
website_domainstringRequired

Website domain assigned to the database.

Example: example.com
Responses
200

Success empty response

application/json
messagestringOptionalExample: Request accepted
post/api/hosting/v1/accounts/{username}/databases
POST /api/hosting/v1/accounts/{username}/databases HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 115

{
  "name": "u123456789_test_db",
  "user": "u123456789_admin",
  "password": "Str0ngP@ssword!",
  "website_domain": "example.com"
}
{
  "message": "Request accepted"
}

Last updated

Was this helpful?