Docs

Update project

PATCH
/projects/{project_id}

Updates the state of a project.

Authorization

headerAuthorizationBearer <token>

Scope: project.write

Path Parameters

project_id*string

The unique identifier of the project.

Match^[a-zA-Z0-9_-]+$

Request Body

The new state of the project.

application/json
  1. body
name?|

The name of the project.

password_hash?|

The method this project's passwords are hashed with. Send null to drop the project's own method and go back to the server default; leave the field out to keep whatever the project has.

Response Body

Updated project state.

application/json
  1. response

The current state of a project, as returned for that one project. It adds the owning team to the fields every project listing carries.

id*string

The unique identifier of the project.

name*string

The name of the project.

origins*array<>

The project's origins. An empty list means every origin is admitted until the first pattern is added. Loopback origins are admitted without a pattern.

created_at*string

The time when the project was created.

Formatdate-time
updated_at*string

The time when the project was last updated.

Formatdate-time
password_hash?|

The method this project's passwords are hashed with. Null when the project uses the server default.

owning_team_id*|

The team that owns the project (ADR 054 §2), which is how its members administer it. Null when no team owns the project, for example before it is claimed.

The team lives in the platform project, so its id is an opaque reference here. GET /projects/{project_id}/admins lists the people who administer the project through it.

Example Request
import { configureZitadel, getApi } from "@zitadel/api/config";import { setApiCsrfToken } from "@zitadel/api/runtime/auth";// In the browser, through the SDK proxy: the session cookie authenticates the call.const client = getApi(configureZitadel({ projectId: "proj_01KWH1P4MYS7F0N9WD3P2E4YM5" }));// A write the session cookie authenticates carries the session's CSRF token.setApiCsrfToken((await client.getMySessionCsrfToken()).csrf_token);const project = await client.patchProject("proj_01KWH1P4MYS7F0N9WD3P2E4YM5", {});
Example Response
{  "id": "string",  "name": "string",  "origins": [    {      "pattern": "string",      "kind": "primary"    }  ],  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "password_hash": {    "algorithm": "argon2i",    "params": {      "time": 0,      "memory": 0,      "threads": 0,      "cost": 0,      "rounds": 0,      "hash": "sha1"    }  },  "owning_team_id": "string"}

Was this helpful?