Mint an authenticated upgrade link
Mints a single-use, short-lived sign-in URL that opens the workspace’s upgrade page (Agents plan) or billing page (other plans) already authenticated — no sign-in step, even for workspaces created headlessly that have never had a browser session. The embedded ticket is consumed on first redemption and expires after 10 minutes; replaying it fails. Requires the write scope. Every mint is audit-logged with the org, user and request id.
Authorizations
Clerk API key. Create one in Settings → API Keys. Pass as Authorization: Bearer <key>.
Response
200 response
A one-time authenticated deep link into the upgrade/billing page. Minting one is audit-logged (org, user, request id).
Single-use, short-lived sign-in URL. Opening it in a browser lands on destination already authenticated as the calling workspace's user — no sign-in step. The embedded ticket is consumed on first redemption; replaying the URL fails.
"https://app.octolens.com/me/upgrade-auth?__clerk_ticket=sit_...&orgId=org_...&dest=%2Fme%2Fupgrade%3Fsrc%3Dagents"
The app path the link lands on: the Agents upgrade page (/me/upgrade?src=agents) on the Agents plan, the billing page (/me/subscription) on any other plan.
"/me/upgrade?src=agents"
The workspace's current plan (null when it has no active plan).
"Agents"
ISO-8601 instant after which the link can no longer be redeemed.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$Seconds the link stays redeemable from the moment it was minted.
-9007199254740991 <= x <= 9007199254740991600
