v52

OpenAPI 3.0.0raw.githubusercontent.com2026-08-03269339953.6 KB
Agency Hosting: Databases

Create Agency Plan website database user

Creates a user for an existing database on an Agency Plan website.

Each database supports a single non-system user; creating a user for a database that already has one fails.

post/api/agency-hosting/v1/websites/{website_uid}/databases/{database_name}/users

Path parameters

website_uidstring required
Example:zpwlGlp19

Agency Plan website UID

database_namestring required
Example:my_database

Full database name as returned by the list databases endpoint.

Request body

database_userstring required

Database username to create (alphanumeric and underscores).

passwordstring password required

Password for the database user (requires mixed case, letters, and numbers).

hoststring nullable

Host the user connects from (IPv4, IPv6, % wildcard, or localhost). Defaults to localhost.

Example request

{
  "database_user": "my_user",
  "password": "Str0ngP@ssword!",
  "host": "localhost"
}

Response

Success response

namestring

Database username.

hoststring

Database host the user is allowed to connect from.

created_atstring date-time

Database user creation date in ISO 8601 format.

Example response

{
  "name": "my_user",
  "host": "localhost",
  "created_at": "2024-05-29T05:49:49+00:00"
}