PgBeam Docs
Projects

createProject

Create a project

Creates a new project within the specified organization.

Usage

const result = await api.projects.createProject({
    body: {
      name: "...",
      org_id: "...",
      database: { ... },
    },
  });

Parameters

ParameterTypeRequiredDescription
body.namestringYesHuman-readable project name.
body.org_idstringYesBetter Auth organization ID.
body.descriptionstringNoOptional project description.
body.tagsstring[]NoUser-defined labels to attach to the project.
body.cloud"aws" | "azure" | "gcp"NoCloud provider for the project.
body.databaseCreateDatabaseRequestYesPrimary database. Created atomically with the project.

Response

Promise<CreateProjectResponse> — project created.

Example

import { PgBeamClient } from "pgbeam";

const client = new PgBeamClient({
  token: "pbk_...",
  baseUrl: "https://api.pgbeam.com",
});

const result = await client.api.projects.createProject({
  body: {
      name: "...",
      org_id: "...",
      database: { ... },
    },
});

Errors

StatusDescription
400Invalid request parameters.
401Missing or invalid authentication.
403Operation not allowed by current plan limits.
409Resource already exists or conflicts with current state.
429Rate limited. Try again later.

On this page