---
title: "Mint connect link"
method: POST
path: "/v1/connect-link"
tags: ["Connect"]
---

# Mint connect link

`POST /v1/connect-link`

## Request

- Base URL: `https://api.postlake.dev`
- URL: `https://api.postlake.dev/v1/connect-link`
- Auth: `bearerAuth` (a scheme the document does not define)

Mint a short-lived link to the hosted connect/manage page. Pass profile to scope the page to one tenant. Pass returnUrl to send the browser back to your app with connect_status after OAuth (the Upload-Post / Ayrshare JWT pattern). Pass platforms to show only those networks. Do not give end users POST /v1/app-link; that mints a 12-hour dashboard session.

## Request body

- object
  - `profile` string: Scope the hosted page and the new connection to this profile username. Required for tenant-safe handoffs; workspace API keys still access all profiles.
  - `returnUrl` string, uri: https callback URL without credentials or a fragment. http is allowed only for localhost. Outcome query parameters are unsigned display hints. Bind an expiring single-use state to your signed-in customer on your backend, then read their stored profile's accounts. Never authorize a tenant using the returned profile parameter.
  - `platforms` string[]: Optional non-empty allow-list enforced on connection and disconnection routes, not just page visibility. Omit for all available networks.

## Response `200`

Success

- object
  - `url` string, uri, required
  - `expiresInSeconds` integer, required

## Other responses

- `400`: Invalid return URL, platform allow-list, or request body
- `401`: Unauthorized
- `404`: The requested profile does not exist

---

[API](https://skmtc.dev/postlake/apis/postlake-api.md) · [All operations](https://skmtc.dev/postlake/apis/postlake-api/llms.txt) · [OpenAPI document](https://skmtc.dev/postlake/apis/postlake-api/revisions/f81060e31f69?raw)
