On-demand database services that run inside your pod. Available services: MySQL, PostgreSQL, and Redis.
Services require the Build plan or higher. Pods on the Launch plan will receive a 403 error.
List Services
GET /api/pods/{name}/services
Response: 200 OK
[
{
"id": "svc_abc123",
"pod_name": "my-app",
"service_type": "mysql",
"status": "running",
"version": "8.0",
"port": 3306,
"host": "localhost",
"created_at": "2026-02-20T10:00:00Z",
"updated_at": "2026-02-20T10:05:00Z"
}
]
Returns [] when no services are installed. Failed services include an error_msg field.
Service statuses: installing, running, stopped, error
Install a Service
POST /api/pods/{name}/services
Request Body:
{
"service_type": "mysql"
}
Valid types: mysql, postgresql, redis
Response: 202 Accepted
Returns the service object with status: "installing". Installation runs in the background — poll the list endpoint until status changes to running.
| Defaults | MySQL | PostgreSQL | Redis |
|---|
| Port | 3306 | 5432 | 6379 |
| Version | 8.0 | 14 | 7 |
| Username | instapod | instapod | — |
| Database | instapod | instapod | — |
Errors:
| Code | Reason |
|---|
400 | Invalid service type, pod not running |
403 | Launch plan — upgrade required |
409 | Service already installed |
Remove a Service
DELETE /api/pods/{name}/services/{serviceType}
Response: 200 OK
Get Credentials
GET /api/pods/{name}/services/{serviceType}/credentials
Response: 200 OK
{
"service_type": "mysql",
"status": "running",
"host": "localhost",
"port": 3306,
"username": "instapod",
"password": "auto-generated-password",
"database": "instapod"
}
Credentials are auto-generated during installation. The password is randomly generated and stored in the database.
Connection Examples
MySQL:
mysql -u instapod -p'PASSWORD' -h localhost instapod
PostgreSQL:
psql -U instapod -h localhost instapod
Redis:
redis-cli -h localhost -p 6379