> ## Documentation Index
> Fetch the complete documentation index at: https://docs.postsyncer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Connect Link

> Get a link where someone connects social accounts without a PostSyncer login

## Create Connect Link

Creates a link where a person connects social accounts of one platform to your workspace. They don't need a PostSyncer login: they open the link, sign in to the platform and pick the accounts to add. Use it to connect your own account on another device, or send it to a client who owns the account. It is the same link as **Accounts → Invite** in the app.

* One link is for one platform.
* It works for one connect (one sign-in, any of that sign-in's accounts), then stops.
* It expires after 7 days (`expires_at`).

Requires the `accounts:create` permission, and a workspace role that can add accounts (owner or manager). At your plan's account limit the request is refused with `plan_limit_reached` and an `upgrade_url` instead of a link that would fail after the person signs in.

The MCP tool `create-account-connect-link` does the same.

### Request

**workspace\_id** `integer` *required*

The workspace the accounts are added to. See [List Workspaces](https://docs.postsyncer.com/api-reference/workspaces/list.md).

**provider** `string` *required*

The platform: `twitter` (X), `linkedin`, `instagram`, `facebook`, `tiktok`, `youtube`, `threads`, `pinterest`, `bluesky`, `telegram`, `mastodon` or `google_business` (Google Business Profile).

**mastodon\_instance** `string`

Mastodon only, and required for it: the server the account is on, e.g. `mastodon.social`.

```bash theme={null}
curl -X POST "https://postsyncer.com/api/v1/accounts/connect-links" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"workspace_id": 12, "provider": "linkedin"}'
```

### Response

**url** `string`

The page the person opens to connect. Send it as a link.

**provider** `string`

The platform the link connects.

**workspace\_id** `integer`

The workspace the accounts are added to.

**mastodon\_instance** `string | null`

Mastodon only: the server the link signs in to.

**expires\_at** `string`

When the link stops working (ISO 8601).

```json 201 theme={null}
{
  "url": "https://app.postsyncer.com/connect/invite?token=8f1c...&provider=linkedin",
  "provider": "linkedin",
  "workspace_id": 12,
  "mastodon_instance": null,
  "expires_at": "2026-11-22T10:00:00+00:00"
}
```

```json 403 (account limit) theme={null}
{
  "message": "You've connected 2 of 2 accounts on the free plan. Upgrade to connect more.",
  "error": "plan_limit_reached",
  "limit": "accounts",
  "used": 2,
  "allowed": 2,
  "plan": "free",
  "resets_at": null,
  "upgrade_url": "https://app.postsyncer.com/dashboard?action=settings&section=billing"
}
```

Once the person has connected, the accounts show up in [List Accounts](https://docs.postsyncer.com/api-reference/accounts/list.md).

### Error Codes

**401** `Unauthorized`

Missing or invalid API token

**403** `Forbidden`

The token does not have the `accounts:create` permission, your role in the workspace cannot add accounts, or the plan's account limit is reached (`plan_limit_reached`)

**422** `Unprocessable Entity`

A workspace you are not in, a platform a link cannot connect, or Mastodon without `mastodon_instance`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.