Docs

Create a project

POST
/projects

Creates a project and returns its project secret and preview secret, which no other endpoint returns.

A project is the top-level boundary that holds users, sessions and configuration. It has no owning team until someone claims it; see createProjectClaim (POST /projects/{project_id}/claim/init).

The request needs no credential and is rate-limited. On 429, wait and retry. Unless seed_defaults is false, the project starts with a default user schema and flow. The CLI sets it to false and uploads its own from .zitadel/.

Request Body

application/json
  1. body
name*string

The name of the project.

origins?array<>

The origins the project starts with. An omitted or empty list admits no origin except a loopback origin, which is admitted without a pattern.

seed_defaults?boolean

Whether the server creates a default user schema and flow for the project. CLI-managed projects set this to false and upload their local .zitadel/ files through the schema and flow APIs.

Defaulttrue

Response Body

The created project, with its project secret and preview secret.

application/json
  1. response
id*string

The unique identifier of the project.

name*string

The name of the project.

project_secret*string

The secret that authenticates requests that change the project. Only this response returns it.

preview_secret*string

The secret that authenticates previewing and testing the project. Only this response returns it.

origins*array<>

The project's origins. An empty list admits no origin except a loopback origin, which is admitted without a pattern.

created_at*string

The time when the project was created.

Formatdate-time
Example Request
import { createZitadelApi, ZitadelClient } from "@zitadel/api/client";const api = createZitadelApi(  new ZitadelClient({    baseUrl: process.env.ZITADEL_URL ?? "http://localhost:8080",  }),);const project = await api.createProject({ name: "string" });
Example Response
{  "id": "string",  "name": "string",  "project_secret": "string",  "preview_secret": "string",  "origins": [    {      "pattern": "string",      "kind": "primary"    }  ],  "created_at": "2019-08-24T14:15:22Z"}

Was this helpful?