We use cookies to understand how people use Depot.
API

Authentication

You need to generate an API token to authenticate with the Depot API. API tokens are scoped to a single organization and grant access to manage projects and builds within your Depot organization.

Generating an API token

You can generate an API token for an organization by going through the following steps:

  1. Open your Organization Settings
  2. Enter a description for your token under API Tokens
  3. Click Create token

This token can create, update, and delete projects and run builds within your organization. You can revoke this token at any time by clicking Remove API token in the token submenu.

Using the API token

To authenticate with the Depot API you must pass the token in the Authorization header of the request. For example, to list the projects in your organization you would make the following request via our Node SDK:

import {depot} from '@depot/sdk-node'
 
const headers = {
  Authorization: `Bearer ${process.env.DEPOT_API_TOKEN}`,
}
 
async function example() {
  const result = await depot.core.v1.ProjectService.listProjects({}, {headers})
  console.log(result.projects)
}