npm-packages/docs/docs/management-api.mdx
You can provision and manage Convex projects and deployments with the Management API.
A client wrapping the Management API is available in the
@convex-dev/platform package.
The Management API uses a Bearer token Authorization header.
const token = "ey...0=";
const response = await fetch(
"https://api.convex.dev/v1/teams/41/list_projects",
{
headers: {
Authorization: `Bearer ${token}`,
},
},
);
console.log(await response.json());
Team Access Tokens and OAuth Application Tokens can be used in Bearer tokens depending on whether you are using the Management API on behalf of your own team or on behalf of the team of a user of a Convex integration you've built.
Most Management APIs require a team ID or project ID.
When creating a Team Access Token the team ID will be available in the Convex dashboard.
OAuth applications may request the team (or project, if using project-scoped tokens) ID by calling the Token Details endpoint.
When using a team token, projects will be assigned IDs upon creation. The List Projects endpoint may also be used to retrieve the ID for a project.
All API responses are in JSON format.
An OpenAPI spec for the Management API is available at https://api.convex.dev/v1/openapi.json.