PlanetScale REST API
Serverless MySQL database platform with branching
PlanetScale is a serverless MySQL-compatible database platform built on Vitess, offering database branching, automatic scaling, and non-blocking schema changes. Developers use PlanetScale for its Git-like workflow for database changes, allowing safe schema migrations without downtime, and its ability to scale horizontally while maintaining MySQL compatibility.
https://api.planetscale.com/v1
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /organizations | List all organizations accessible to the authenticated user |
| GET | /organizations/{organization}/databases | List all databases within an organization |
| POST | /organizations/{organization}/databases | Create a new database in an organization |
| GET | /organizations/{organization}/databases/{database} | Get details of a specific database |
| DELETE | /organizations/{organization}/databases/{database} | Delete a database from an organization |
| GET | /organizations/{organization}/databases/{database}/branches | List all branches of a database |
| POST | /organizations/{organization}/databases/{database}/branches | Create a new branch from an existing branch |
| DELETE | /organizations/{organization}/databases/{database}/branches/{branch} | Delete a branch from a database |
| GET | /organizations/{organization}/databases/{database}/deploy-requests | List all deploy requests for a database |
| POST | /organizations/{organization}/databases/{database}/deploy-requests | Create a deploy request to merge a branch |
| POST | /organizations/{organization}/databases/{database}/deploy-requests/{number}/deploy | Deploy a deploy request to apply schema changes |
| GET | /organizations/{organization}/databases/{database}/branches/{branch}/schema | Get the current schema of a database branch |
| GET | /organizations/{organization}/databases/{database}/passwords | List all passwords (connection credentials) for a database |
| POST | /organizations/{organization}/databases/{database}/passwords | Create a new password for database access |
| DELETE | /organizations/{organization}/databases/{database}/passwords/{password_id} | Delete a password from a database |
Sponsor this page
AvailableReach developers actively building with PlanetScale. See live pageview data and self-serve checkout — your slot goes live in minutes.
View inventory & pricing →Code Examples
curl -X GET https://api.planetscale.com/v1/organizations/my-org/databases \
-H 'Authorization: Bearer pscale_tkn_xxxxxxxxxxxxxxxxxxxxxx' \
-H 'Content-Type: application/json'
Use PlanetScale from Claude / Cursor / ChatGPT
Get a hosted MCP endpoint for PlanetScale. Paste your PlanetScale API key, copy back one URL, drop it into Claude Desktop, Cursor, or any AI client that supports remote MCP. Your AI calls PlanetScale directly with your credentials — no local install, works on mobile.
create_database_branch
Create a new database branch for safe schema experimentation and testing before merging to production
create_deploy_request
Create and manage deploy requests to apply schema changes from development branches to production
list_databases
List all databases in an organization with their configuration and status information
get_schema_diff
Compare schemas between branches to review changes before deployment
manage_database_credentials
Create, list, and revoke database connection credentials for secure access management
Connect in 60 seconds
Paste your PlanetScale key → get an MCP URL → paste into Claude/Cursor. Hosted by IOX, encrypted at rest.
Connect PlanetScale to your AI →