Getting started with PlanetScale API

Learn how to start using the PlanetScale API.


You can use the PlanetScale API to manage your PlanetScale databases programmatically. The PlanetScale API is currently in beta. You can integrate the PlanetScale API into your existing workflows and tools.

The PlanetScale API does not include direct access to the data in the database. Some endpoints will consist of database schema information or connection information.


While in beta, endpoints are subject to change as we make improvements and updates.


Before making your first API call, set up the proper authentication for the PlanetScale API using the Authorization header. There are two API authentication types: Service tokens and OAuth.

Service tokens

Most endpoints only need a service token for authentication, but some organization-specific endpoints also need OAuth. Each endpoint will state what types of authentication are allowed. See the Service tokens documentation for creating a service token and making your first API call with the PlanetScale API.

OAuth applications

All OAuth applications have a comprehensive list of scopes that the application can request from the PlanetScale user. See the OAuth documentation for more info.

OAuth applications are currently in beta. If you are interested in building on top of PlanetScale and allowing your users to authenticate with PlanetScale to gain management access to their organizations and databases, you can create an OAuth application in your PlanetScale organization's Settings > OAuth applications page.

If you build something you would like to share with us, please email us at education (at) We would love to hear about your experience building the application, and we may even feature your application in future blog posts, videos, or social media.