Initialize a project claim
POST
Starts a claim challenge for an unclaimed project. Authenticated by the
project secret, this mints a single-use, short-lived challenge and returns
the claim_url the developer opens in a browser to complete the claim,
together with the challenge_id the CLI polls with. The exact expiry is
carried by expires_at on the response.
oauth2 project.writeheader
AuthorizationBearer <token>Scope: project.write
project_id*stringThe unique identifier of the project.
Match
^[a-zA-Z0-9_-]+$Claim challenge created.
application/json- response
The claim challenge minted for a project.
claim_url*stringThe browser URL a developer opens to complete the claim. It embeds the
challenge_id so the browser leg does not need the project secret.
Format
urichallenge_id*challenge-idUnique identifier for this challenge (dialect-minted prefixed opaque string).
Match
^ch_[a-zA-Z0-9_-]+$expires_at*stringThe time when the claim challenge expires.
Format
date-timeExample Request
import { createZitadelClient } from "@zitadel/api/client";const client = createZitadelClient({ baseUrl: process.env.ZITADEL_URL ?? "http://localhost:8080", token: process.env.ZITADEL_PROJECT_SECRET!, // server-side only});const claim = await client.initClaim("proj_01KWH1P4MYS7F0N9WD3P2E4YM5");Example Response
{ "claim_url": "http://example.com", "challenge_id": "string", "expires_at": "2019-08-24T14:15:22Z"}Was this helpful?