Get the claim window for a project
Returns when a project's claim window closes and whether it has already closed.
The claim window is the 14 days after a project is created during which a team can claim it. The claim page in the browser calls this operation to show how long is left.
The request needs no credential, because the claim page calls it before the
developer has signed in. Holding the challenge_id from the claim URL that
createProjectClaim (POST /projects/{project_id}/claim/init) returns is the authorization, the same one completeProjectClaim (POST /projects/{project_id}/claim/complete)
accepts. The response reveals only the window, never the project itself.
Unlike completeProjectClaim it spends nothing, so reloading the page is safe.
project_id*stringThe project ID: the id that createProject (POST /projects) returns, which zitadel setup
also prints as project_id.
^[a-zA-Z0-9_-]+$challenge_id*stringThe challenge_id that createProjectClaim (POST /projects/{project_id}/claim/init) returns for this claim. The claim URL
carries it.
^ch_[a-zA-Z0-9_-]+$The project's claim window.
application/json- response
How long the project can still be claimed. It derives from the project's creation time and the fixed 14-day claim window. It does not depend on the challenge, which has its own much shorter expiry.
expires_at*stringThe time when the project's claim window closes.
date-timeexpired*booleanWhether the window has already closed. The server reports it alongside
expires_at, so a browser with a skewed clock does not show a claimable
project as expired, or the reverse.
import { createZitadelClient } from "@zitadel/api/client";const client = createZitadelClient({ baseUrl: process.env.ZITADEL_URL ?? "http://localhost:8080",});const projectClaimWindow = await client.getProjectClaimWindow( "proj_01KWH1P4MYS7F0N9WD3P2E4YM5", { challenge_id: "ch_01J0Z9KX7Y0Q2Y7JX5M9K2YF3C" },);{ "expires_at": "2019-08-24T14:15:22Z", "expired": true}Was this helpful?