Skip to main content
POST
/
account_links
Create account link
curl --request POST \
  --url https://api.whop.com/api/v1/account_links \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "company_id": "biz_xxxxxxxxxxxxxx",
  "refresh_url": "<string>",
  "return_url": "<string>",
  "use_case": "account_onboarding"
}'
{
  "url": "<string>",
  "expires_at": "2023-12-01T05:00:00.401Z"
}

Authorizations

Authorization
string
header
required

The app API key from an app from the /dashboard/developer page

Body

application/json

Parameters for CreateAccountLink

company_id
string
required

The ID of the Company to generate the url for. The company must be a sub-merchant of the API key's company.

Example:

"biz_xxxxxxxxxxxxxx"

refresh_url
string
required

The URL to redirect to if the session expires and needs to be re-authenticated due to the token expiring.

return_url
string
required

The URL to redirect to when the customer wants to return to your site.

use_case
enum<string>
required

The use case for which the link will be used.

Available options:
account_onboarding,
payouts_portal

Response

A successful response

An object representing a url that a user can be directed to to access their account.

url
string
required

The URL to navigate the user to.

expires_at
string<date-time>
required

The expiration timestamp of the url.

Example:

"2023-12-01T05:00:00.401Z"