---
title: "Create a connect link"
method: POST
path: "/v1/social-accounts/connect-link"
tags: ["Social Accounts"]
---

# Create a connect link

`POST /v1/social-accounts/connect-link`

## Request

- Base URL: `https://api.post-bridge.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.post-bridge.com/v1/social-accounts/connect-link`
- Auth: HTTP bearer

Returns a link that connects one social account under your Post Bridge account without the account owner logging in to Post Bridge. Give the link to the person (or open it inside your own app): they approve on the platform's own consent screen and are sent to your return_url with the new account ids. Use external_ref to tag the accounts with your own customer id, then filter GET /social-accounts by it. Every connected account counts against your plan's account cap; when the cap is reached this answers 402 with a link to raise it. Platforms: instagram, facebook, tiktok, youtube, twitter, linkedin, threads, pinterest, bluesky (google_business is dashboard-only). Instagram uses Instagram's own login (one professional account, no Facebook Page needed); Facebook connects every Page the login manages; LinkedIn connects the profile plus every company page it administers, so one link can return several account ids; Bluesky shows a short form for the handle and an app password.

## Request body

- CreateConnectLinkDto
  - `platform` 'instagram' | 'facebook' | 'tiktok' | 'youtube' | 'twitter' | 'linkedin' | 'threads' | 'pinterest' | 'bluesky', required: Platform the link connects. One link connects one platform.
  - `return_url` string, required: Where the person is sent after the platform consent screen. https only (http allowed for localhost). Query parameters are appended: status=connected with platform, account_ids (comma separated) and external_ref, or status=error with reason.
  - `external_ref` string: Your own reference for the person or client this link is for (a customer id, for example). Stored on every account the link connects and returned as external_ref on GET /social-accounts, so you can filter accounts by it.
  - `expires_in` number: How long the link stays valid, in seconds. Default 86400 (24 hours), minimum 60, maximum 604800 (7 days). Mint a fresh link whenever you need one; minting is free.

## Response `201`

Link created.

- ConnectLinkResponseDto
  - `url` string, required: Link to give to the person who owns the social account. They open it, approve on the platform, and are sent to your return_url.
  - `expires_at` string, required: ISO timestamp when the link stops working
  - `platform` string, required: Platform this link connects
  - `connected` number, required: Accounts connected under this API key right now
  - `included` object, nullable, required: Accounts included in the plan. When connected reaches this, minting answers 402 until the cap is raised on the billing page.

## Other responses

- `400`: Unsupported platform or return_url.
- `402`: Account cap reached, or no active plan. The body carries connected, included and raise_url (the billing page where the cap is raised).

## Changes

- **2026-10-11** `a2b41e16e62a`: 6 info
  - added the new `bluesky` enum value to the request property `platform`
  - added the new `linkedin` enum value to the request property `platform`
  - added the new `pinterest` enum value to the request property `platform`
  - added the new `threads` enum value to the request property `platform`
  - …2 more
- **2026-09-18** `d220211b11d2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/post-bridge/apis/post-bridge-api/changes/v1/social-accounts/connect-link/post.md)

---

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