← Back to Marketplace

PlanetScale

Bearer

Serverless MySQL with branching, zero-downtime schema changes, and an API.

https://api.planetscale.com
OVERVIEW

PlanetScale provides a serverless MySQL-compatible database with Git-like branching for schema changes. The management API lets you create databases, manage branches, and trigger deploys programmatically.

Service tokens authenticate API calls. The API manages infrastructure. For querying data, use the PlanetScale connection string with any MySQL client. The branching workflow lets you test schema changes on a branch before deploying to production.

GET YOUR API KEY

Authentication setup

  1. Go to planetscale.com and open your organization
  2. Navigate to Settings → Service tokens
  3. Click New service token
  4. Grant the required database access permissions
  5. Copy the token ID and token value. Token starts with pscale_tkn_
Token format pscale_tkn_...
Auth type bearer
QUICK CONNECT

Create a connection in one request.

CONNECT PLANETSCALE
POST /connections Authorization: Bearer $TOKEN Content-Type: application/json { "name": "PlanetScale", "base_url": "https://api.planetscale.com", "auth_type": "bearer", "auth_config": {"token": "pscale_tkn_..."} } → {"id": "cn_xxxxxxxx", "name": "PlanetScale"}
KEY ENDPOINTS

What you can call via proxy.

MethodPathDescription
GET /v1/organizations/{org}/databases List all databases
POST /v1/organizations/{org}/databases Create a new database
GET /v1/organizations/{org}/databases/{db}/branches List branches
POST /v1/organizations/{org}/databases/{db}/branches Create a schema branch
POST /v1/organizations/{org}/databases/{db}/deploy-requests Create a deploy request (like a PR for schema)
GET /v1/organizations/{org}/databases/{db}/deploy-requests List deploy requests
EXAMPLE

List Databases

PROXY CALL
GET /proxy/cn_xxxxxxxx/v1/organizations/my-org/databases Authorization: Bearer $TOKEN { "data": [ { "id": "abc123", "name": "production-db", "region": {"slug": "us-east"}, "state": "ready", "created_at": "2026-01-15T08:00:00Z", "default_branch": "main" } ] }
USE CASES

What people build with PlanetScale.

Schema Branching

Create branches to test schema changes before deploying to production.

CI/CD Integration

Automate branch creation and deploy requests from your deployment pipeline.

Database Management

List, create, and monitor databases across your organization.

Deploy Automation

Create and merge deploy requests programmatically for zero-downtime migrations.

# PlanetScale > Serverless MySQL with branching, zero-downtime schema changes, and an API. ## Overview PlanetScale provides a serverless MySQL-compatible database with Git-like branching for schema changes. The management API lets you create databases, manage branches, and trigger deploys programmatically. Service tokens authenticate API calls. The API manages infrastructure. For querying data, use the PlanetScale connection string with any MySQL client. The branching workflow lets you test schema changes on a branch before deploying to production. - **Base URL:** https://api.planetscale.com - **Auth type:** bearer - **Token format:** pscale_tkn_... ## Get Your API Key 1. Go to planetscale.com and open your organization 2. Navigate to Settings → Service tokens 3. Click New service token 4. Grant the required database access permissions 5. Copy the token ID and token value. Token starts with pscale_tkn_ ## Quick Connect bashcurl -X POST https://api.liteio.dev/connections \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "PlanetScale", "base_url": "https://api.planetscale.com", "auth_type": "bearer", "auth_config": {"token": "pscale_tkn_..."} }' ## Key Endpoints MethodPathDescription GET/v1/organizations/{org}/databasesList all databases POST/v1/organizations/{org}/databasesCreate a new database GET/v1/organizations/{org}/databases/{db}/branchesList branches POST/v1/organizations/{org}/databases/{db}/branchesCreate a schema branch POST/v1/organizations/{org}/databases/{db}/deploy-requestsCreate a deploy request (like a PR for schema) GET/v1/organizations/{org}/databases/{db}/deploy-requestsList deploy requests ## Example: List Databases bashcurl https://api.liteio.dev/proxy/cn_xxx/v1/organizations/my-org/databases \ -H "Authorization: Bearer $TOKEN" ## Use Cases - **Schema Branching**: Create branches to test schema changes before deploying to production. - **CI/CD Integration**: Automate branch creation and deploy requests from your deployment pipeline. - **Database Management**: List, create, and monitor databases across your organization. - **Deploy Automation**: Create and merge deploy requests programmatically for zero-downtime migrations. ## Links - Back to Marketplace - Developer Guide - Get API Key