Skip to main content
POST
Create a link

Body

application/json
app
string
required

Your app id, as Circuit registered it. The user sees your app's name when they approve.

Example:

"pinewood"

public_key
string
required

Your X25519 public key as 64 hex characters. Circuit encrypts the permit to this key.

Example:

"8f2c1d6e4b3a59078c1e2d3f4a5b6c7d8e9f00112233445566778899aabbccdd"

return_url
string | null

Where Circuit sends the user after they approve. It must start with one of the URLs registered for your app. Optional.

Example:

"https://yourapp.com/linked"

Response

OK

A page where the user approves your app. Once they do, it holds their permit.

id
string
required

The link's id, starting with lnk_.

url
string
required

Open this in a real browser so the user can sign in, pick wallets and approve.

status
required

The user has not approved yet.

Allowed value: "waiting"
expires_at
string<date-time>
required

When the link expires, five minutes after it was created.

permit
string | null

The user's permit, encrypted to your public key, once status is approved. It is base64url of a 32-byte ephemeral X25519 public key, a 12-byte IV and the AES-256-GCM ciphertext. Null until then.