---
title: "Create account link"
method: POST
path: "/account_links"
tags: ["Account links"]
---

# Create account link

`POST /account_links`

Generate a URL that directs a sub-merchant to their account portal, such as the hosted payouts dashboard or the KYC onboarding flow.

## Request body

- object — Parameters for CreateAccountLink
  - `company_id` string, required — The unique identifier of the company to generate the link for, starting with 'biz_'. Must be a sub-merchant of the API key's company.
  - `refresh_url` string, required — The URL to redirect the user to if the session expires and needs to be re-authenticated, such as 'https://example.com/refresh'.
  - `return_url` string, required — The URL to redirect the user to when they want to return to your site, such as 'https://example.com/return'.
  - `use_case` 'account_onboarding' | 'payouts_portal', required — The different use cases for generating an account link.

## Response `200`

A successful response

- AccountLink — A temporary, time-limited URL that grants a user access to an external account management page.
  - `expires_at` string, date-time, required — The timestamp after which this account link URL is no longer valid.
  - `url` string, required — The temporary URL to redirect the user to for account access. Expires at the time specified by expires_at.

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `422` — Verification required
- `429` — Too many requests
- `500` — Internal server error

---

[API](https://skmtc.net/whop/apis/whop-api.md) · [All operations](https://skmtc.net/whop/apis/whop-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/whop/whop-api/revisions/db0883548bc5/schema)
