API Reference
- Introduction
- Authorization
- GETVersion
- GETHealthcheck
- GETEnable API
- GETDisable API
- Servers
- Teams
- Projects
- Private Keys
- Deployments
- Resources
- Applications
- Databases
- Services
Databases
Create (MySQL)
Create a new MySQL database.
POST
/
databases
/
mysql
Copy
curl --request POST \
--url https://app.coolify.io/api/v1/databases/mysql \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"server_uuid": "<string>",
"project_uuid": "<string>",
"environment_name": "<string>",
"destination_uuid": "<string>",
"mysql_root_password": "<string>",
"mysql_user": "<string>",
"mysql_database": "<string>",
"mysql_conf": "<string>",
"name": "<string>",
"description": "<string>",
"image": "<string>",
"is_public": true,
"public_port": 123,
"limits_memory": "<string>",
"limits_memory_swap": "<string>",
"limits_memory_swappiness": 123,
"limits_memory_reservation": "<string>",
"limits_cpus": "<string>",
"limits_cpuset": "<string>",
"limits_cpu_shares": 123,
"instant_deploy": true
}'
Copy
This response does not have an example.
Authorizations
Go to Keys & Tokens
/ API tokens
and create a new token. Use the token as the bearer token.
Body
application/json
Database data
The body is of type object
.
Response
200
Database updated
Copy
curl --request POST \
--url https://app.coolify.io/api/v1/databases/mysql \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"server_uuid": "<string>",
"project_uuid": "<string>",
"environment_name": "<string>",
"destination_uuid": "<string>",
"mysql_root_password": "<string>",
"mysql_user": "<string>",
"mysql_database": "<string>",
"mysql_conf": "<string>",
"name": "<string>",
"description": "<string>",
"image": "<string>",
"is_public": true,
"public_port": 123,
"limits_memory": "<string>",
"limits_memory_swap": "<string>",
"limits_memory_swappiness": 123,
"limits_memory_reservation": "<string>",
"limits_cpus": "<string>",
"limits_cpuset": "<string>",
"limits_cpu_shares": 123,
"instant_deploy": true
}'
Copy
This response does not have an example.
Assistant
Responses are generated using AI and may contain mistakes.