Skip to main content
POST
Mint an authenticated upgrade link

Authorizations

Authorization
string
header
required

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

url
string
required

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.

Example:

"https://app.octolens.com/me/upgrade-auth?__clerk_ticket=sit_...&orgId=org_...&dest=%2Fme%2Fupgrade%3Fsrc%3Dagents"

destination
string
required

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.

Example:

"/me/upgrade?src=agents"

plan
string | null
required

The workspace's current plan (null when it has no active plan).

Example:

"Agents"

expiresAt
string<date-time>
required

ISO-8601 instant after which the link can no longer be redeemed.

Pattern: ^(?:(?:\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))$
expiresInSeconds
integer
required

Seconds the link stays redeemable from the moment it was minted.

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

600