Create a User

To create a new user in your PostgreSQL cluster, send a POST request and set the login password.

Note: The sample UUID in all following request examples is 498ae72f-411f-11eb-9d07-046c59cc737e.

Endpoint

Use the following endpoint to create a new user in your PostgreSQL cluster:

https://api.ionos.com/databases/postgresql/clusters/{clusterId}/users

Request

curl --request POST \
    --user "[email protected]:Mb2.r5oHf-0t" \
    --header "Content-Type: application/json" \
    --data-binary '{
        "properties":{
            "username": "newuser",
            "password": "pwMin10Chars"
        }
    }' \
    https://api.ionos.com/databases/postgresql/clusters/498ae72f-411f-11eb-9d07-046c59cc737e/users

Response

The created user is returned.

Last updated

Was this helpful?