Based on this documentation:
https://my.opalstack.com/api/v0/redoc/#operation/MariaDB%20user%20create
You can do this:
curl --location --request GET 'https://my.opalstack.com/api/v0/mariadb/list/' \
--header 'Authorization: token <yourtoken>'
get your db id, then call
curl --location --request GET 'https://my.opalstack.com/api/v0/mariadb/read/<databaseid>' \
--header 'Authorization: token <yourtoken>'
from that get the server id, then call
curl --location --request POST 'https://my.opalstack.com/api/v0/mariauser/add/' \
--header 'Authorization: token <yourtoken>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "randocan",
"server": "<server id>"
}'
Which seems to create the user as sean suggested 🙂
hope this helps someone.