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

# Connect Channel (Link)

> Create a link to a Postiz page where someone can connect a new channel. The page explains what connecting the account to Postiz means, and the person is sent to the platform to sign in and approve only after they choose to continue. The link works for one hour and the person opening it does not need a Postiz account. Only integrations that connect through a sign-in redirect are supported.

Create a link that lets someone connect a social account to your Postiz workspace. Unlike [Connect Channel (OAuth)](https://docs.postiz.com/public-api/integrations/connect.md), the link does not go straight to the platform. It opens a Postiz page that tells the person what they are agreeing to, and sends them to the platform only after they choose to continue.

Use it when the person connecting the account is not you: a client, a customer of your own product, or a teammate without a Postiz login.

## Example

```bash theme={null}
curl -X POST "https://api.postiz.com/public/v1/integrations/connect" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"integration": "linkedin", "redirectUrl": "https://app.example.com/connected"}'
```

```json theme={null}
{
  "url": "https://platform.postiz.com/integrations/connect/5f0c1e7a9b2d4c68..."
}
```

Send the person to `url`. It points at the frontend of the Postiz instance you called. The link works for one hour and can be opened again within that hour, so someone who cancels on the platform can retry. They do not need a Postiz account, and they do not need to be signed in.

## What the person sees

1. A Postiz page titled "Postiz wants to connect to your LinkedIn", with the name of the platform you asked for. It tells them to continue only if they trust whoever sent the link, that Postiz will be able to schedule and publish posts on the account, and that the account is added to a Postiz workspace and managed from there. When you passed a `redirectUrl`, it also names the website they are sent to afterwards.
2. After they press **Continue**, the platform's own sign-in and approval screen.
3. On platforms where one login manages several pages or channels, a Postiz screen to pick the one to connect. This applies to Facebook, Instagram, LinkedIn Page, YouTube, Google My Business and Tumblr.

Nothing is connected if they close the page before approving on the platform.

## Where they land afterwards

With a `redirectUrl`, the browser is sent there once the channel is connected, with two query parameters added:

| Parameter | Value |
| - | - |
| `added` | The integration identifier, for example `linkedin` |
| `msg` | A short status text, `Channel Updated` or `Channel Added` |

A `redirectUrl` that already has a query string keeps it. The URL must use `http` or `https` and cannot contain a `#fragment`.

Without a `redirectUrl`, a person who is signed in to Postiz lands on their calendar. Anyone else sees a confirmation that the channel is connected and that they can close the window.

> [!WARNING]
>
> The query parameters arrive through the person's browser, so they can be forged. A failed connection does not redirect at all: the person sees the error on Postiz. Confirm the result with [List Integrations](https://docs.postiz.com/public-api/integrations/list.md) before treating the account as connected.

## Supported platforms

Only integrations that connect through a sign-in redirect can be linked:

`x`, `linkedin`, `linkedin-page`, `facebook`, `instagram`, `instagram-standalone`, `threads`, `youtube`, `tiktok`, `tiktok-business`, `pinterest`, `reddit`, `discord`, `slack`, `mastodon`, `gmb`, `twitch`, `kick`, `dribbble`, `vk`, `tumblr`, `whop`, `mewe`

Platforms where the person types in credentials or an instance address, signs with a wallet, or needs the browser extension return `400`. Those are Bluesky, Lemmy, Nostr, Medium, Dev.to, Hashnode, WordPress, ListMonk, Telegram, Warpcast, Moltbook and Skool. Connect them from the Postiz app.

An integration that the instance hides from its Add Channel screen is refused as well.

## Channel limits

The request returns `402` when the plan has no channels left. The limit is checked a second time when the person presses **Continue**, so a link created earlier stops working once the workspace is full. The person is told that the workspace has to be upgraded before another channel can be added.

> [!NOTE]
>
> On self-hosted Postiz: there is no channel limit unless billing is set up, so neither check applies.


## OpenAPI

````yaml POST /integrations/connect
openapi: 3.1.0
info:
  title: Postiz Public API
  description: >-
    API for managing social media posts, integrations, and media uploads in
    Postiz.


    ## Authentication


    All endpoints require an API key passed in the `Authorization` header:


    ```

    Authorization: your-api-key

    ```


    Get your API key from Postiz Settings.


    ## Rate Limits


    There is a limit of **30 requests per hour**.


    ## Terminology


    The UI uses `channel`, but the API uses `integration`. They refer to the
    same thing.


    ## Supported Platforms (27)


    **Social Platforms:** X (Twitter), LinkedIn, LinkedIn Page, Facebook,
    Instagram, Instagram Standalone, Threads, Bluesky, Mastodon, Warpcast
    (Farcaster), Nostr, VK


    **Video Platforms:** YouTube, TikTok


    **Community Platforms:** Reddit, Lemmy, Discord, Slack, Telegram


    **Design Platforms:** Pinterest, Dribbble


    **Blogging Platforms:** Medium, Dev.to, Hashnode, WordPress


    **Business:** Google My Business (GMB), Listmonk (newsletters)
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.postiz.com/public/v1
    description: Postiz Cloud
  - url: https://{your-domain}/api/public/v1
    description: Self-hosted
    variables:
      your-domain:
        default: localhost:5000
        description: Your Postiz instance domain
security:
  - ApiKeyAuth: []
tags:
  - name: Integrations
    description: Manage connected social media channels
  - name: Posts
    description: Create, list, and delete posts
  - name: Uploads
    description: Upload media files
  - name: Notifications
    description: View organization notifications
  - name: Analytics
    description: View analytics for integrations and posts
  - name: Video Generation
    description: Generate videos with AI
  - name: Clipping
    description: Turn long YouTube videos into short vertical clips
paths:
  /integrations/connect:
    post:
      tags:
        - Integrations
      summary: Create a connect link for a channel
      description: >-
        Create a link to a Postiz page where someone can connect a new channel.
        The page explains what connecting the account to Postiz means, and the
        person is sent to the platform to sign in and approve only after they
        choose to continue. The link works for one hour and the person opening
        it does not need a Postiz account. Only integrations that connect
        through a sign-in redirect are supported.
      operationId: createConnectLink
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                integration:
                  type: string
                  description: >-
                    The integration identifier (e.g. x, linkedin, facebook,
                    instagram, youtube, reddit, etc.)
                redirectUrl:
                  type: string
                  format: uri
                  description: >-
                    Where the person is sent once the channel is connected. An
                    http or https URL without a fragment. When omitted, they
                    stay on Postiz.
              required:
                - integration
            example:
              integration: linkedin
              redirectUrl: https://app.example.com/connected
      responses:
        '201':
          description: Connect link
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    description: The Postiz page to send the person to
              example:
                url: >-
                  https://platform.postiz.com/integrations/connect/5f0c1e7a9b2d4c68a1f3e5d7c9b0a2e4f6d8c0b1a3e5f7d9c1b3a5e7f9d0c2b4
        '400':
          description: >-
            Integration not allowed, an integration that cannot be connected
            with a link, or an invalid redirectUrl
        '402':
          description: The plan has no channels left
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Your Postiz API key

````

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