Docs

Get the claim window for a project

GET
/projects/{project_id}/claim/window

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.

Path Parameters

project_id*string

The project ID: the id that createProject (POST /projects) returns, which zitadel setup also prints as project_id.

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

Query Parameters

challenge_id*string

The challenge_id that createProjectClaim (POST /projects/{project_id}/claim/init) returns for this claim. The claim URL carries it.

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

Response Body

The project's claim window.

application/json
  1. 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*string

The time when the project's claim window closes.

Formatdate-time
expired*boolean

Whether 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.

Example Request
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" },);
Example Response
{  "expires_at": "2019-08-24T14:15:22Z",  "expired": true}

Was this helpful?