Get the claim window for a project
Read by the claim page in the browser to show how long is left to claim the
project. Unauthenticated by design: the claim page runs this before the
developer has signed in, and holding the challenge_id from the claim URL
is the authorization — the same capability claim/complete accepts. It
reveals only the window, never the project itself, and unlike
claim/complete it spends nothing, so a reload is free.
project_id*stringThe unique identifier of the project.
^[a-zA-Z0-9_-]+$challenge_id*stringThe challenge minted by the matching claim init, as 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. Derived from the project's creation time and the fixed 14-day claim window (ADR 046); 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. Reported alongside expires_at
rather than left to the client so a skewed browser clock cannot 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 claimWindow = await client.getClaimWindow( "proj_01KWH1P4MYS7F0N9WD3P2E4YM5", { challenge_id: "ch_01J0Z9KX7Y0Q2Y7JX5M9K2YF3C" },);{ "expires_at": "2019-08-24T14:15:22Z", "expired": true}Was this helpful?