Create a project
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/.
application/json- body
name*stringThe 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?booleanWhether 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.
trueThe created project, with its project secret and preview secret.
application/json- response
id*stringThe unique identifier of the project.
name*stringThe name of the project.
project_secret*stringThe secret that authenticates requests that change the project. Only this response returns it.
preview_secret*stringThe 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*stringThe time when the project was created.
date-timeimport { 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" });{ "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?