Update a project
Updates a project's name or password hashing method.
Fields you leave out keep their value. Sending password_hash: null drops
the project's own method and returns to the server default. A change of
method rewrites no stored password: each moves to the new method when its
owner next signs in or sets a new password.
Authenticate with the project secret, or with the session of a signed-in person who can act on the project.
AuthorizationBearer <token>Scope: project.write
project_id*stringThe project ID: the id that createProject (POST /projects) returns, which zitadel setup
also prints as project_id.
^[a-zA-Z0-9_-]+$The new state of the project.
application/json- 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.
The updated project.
application/json- response
The current state of one project. It adds the owning team to the fields every project listing carries.
id*stringThe unique identifier of the project.
name*stringThe name of the project.
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-timeupdated_at*stringThe time when the project was last updated.
date-timepassword_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, 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 treat this ID as opaque.
GET /projects/{project_id}/admins lists the people who administer
the project through it.
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.updateProject( "proj_01KWH1P4MYS7F0N9WD3P2E4YM5", {},);{ "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?