Docs

Initialize a project claim

POST
/projects/{project_id}/claim/init

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.

Authorization

oauth2 project.write
headerAuthorizationBearer <token>

Scope: project.write

Path Parameters

project_id*string

The unique identifier of the project.

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

Response Body

Claim challenge created.

application/json
  1. response

The claim challenge minted for a project.

claim_url*string

The browser URL a developer opens to complete the claim. It embeds the challenge_id so the browser leg does not need the project secret.

Formaturi
challenge_id*challenge-id

Unique identifier for this challenge (dialect-minted prefixed opaque string).

Match^ch_[a-zA-Z0-9_-]+$
expires_at*string

The time when the claim challenge expires.

Formatdate-time
Example 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?