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

# Connect creator accounts with CreatorLink

> Let creators connect their Instagram, TikTok and YouTube accounts from your own app, then read their connection status and verified audience.

CreatorLink lets a creator connect their social accounts so you get **verified** audience data straight from the platform instead of a public estimate. You can send creators to the hosted CreatorLink page, or run the whole flow from your own app with the API. This guide covers the API.

## How it works

1. You create a CreatorLink for a creator.
2. When the creator clicks "Connect Instagram" (or TikTok, or YouTube) in your app, you ask CreatorCore for a **connect URL** and redirect their browser to it.
3. The creator signs in on the platform and approves read-only access to their analytics.
4. CreatorCore saves the connected account and sends the browser back to your `returnUrl` with the result.
5. You read the creator's connection status and verified audience whenever you need them.

## Before you start

* An [API key](https://docs.creatorcore.co/authentication.md) with the **Creators** operations (`creators.connect.create`, `creator_connects.*`, `creators.verified_audience.read`).
* Your organization has audience demographics turned on.
* An HTTPS page in your app to return creators to, for example `https://app.example.com/creatorlink/done`.

## Run the flow

**1. Create a CreatorLink**

```bash theme={null}
curl -X POST https://beta.creatorcore.co/api/v2/creators/<creator id>/connect \
  -H "Authorization: Bearer $CREATORCORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "returnUrl": "https://app.example.com/creatorlink/done" }'
```

The response's `connect.id` identifies the CreatorLink. Calling this again returns the same CreatorLink (and updates `returnUrl` if you send one). `connect.url` is the hosted CreatorLink page, if you'd rather send the creator there.

> [!WARNING]
>
> `connect.id` and `connect.url` act as a credential: anyone with them can connect accounts to this creator. Don't expose them publicly.

**2. Mint a connect URL when the creator clicks**

```bash theme={null}
curl -X POST https://beta.creatorcore.co/api/v2/creator-connects/<connect id>/connect-url \
  -H "Authorization: Bearer $CREATORCORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "platform": "instagram" }'
```

```json theme={null}
{
  "success": true,
  "url": "https://…",
  "expiresAt": "2026-11-10T12:55:00.000Z",
  "reconnect": false
}
```

Redirect the creator's browser to `url` right away with a full-page redirect (not an iframe or pop-up). Mint a new URL for every click: each one is single use and expires around `expiresAt`. Never store it or send it by email.

Pass `returnUrl` here to override the stored one for this and later connects.

**3. Handle the return**

When the creator finishes, their browser lands on your `returnUrl` with these query parameters added:

| Parameter | Value |
| - | - |
| `status` | `connected` or `error` |
| `platform` | `instagram`, `tiktok` or `youtube` |
| `connectId` | The CreatorLink id |
| `code` | Only when `status=error`, see below |

The redirect only tells you the flow finished. Confirm the result from your server with `GET /api/v2/creator-connects/{id}` before you rely on it.

**4. Read connection status**

```bash theme={null}
curl https://beta.creatorcore.co/api/v2/creator-connects/<connect id> \
  -H "Authorization: Bearer $CREATORCORE_API_KEY"
```

`connect.platforms` has one entry per platform:

```json theme={null}
{
  "platform": "instagram",
  "status": "connected",
  "username": "creator",
  "connectedAt": "2026-11-10T12:01:00.000Z",
  "lastSyncedAt": "2026-11-10T12:01:00.000Z"
}
```

**5. Read the verified audience**

```bash theme={null}
curl https://beta.creatorcore.co/api/v2/creators/<creator id>/verified-audience \
  -H "Authorization: Bearer $CREATORCORE_API_KEY"
```

Each platform has `age`, `gender`, `countries` and `cities`, each with a `source`: `verified` when the connected account reported it, or `estimated` when it didn't and the public estimate fills in. `asOf` is when the verified data was last pulled. Platforms usually take up to 48 hours after connecting to report audience data.

## Connection statuses

| `status` | Meaning | What to do |
| - | - | - |
| `connected` | Linked and healthy. | Nothing. |
| `expiring_soon` | Linked, but access expires soon. | Ask the creator to reconnect: mint a connect URL for that platform. |
| `needs_reconnect` | Access expired or was revoked. Stored data is kept but stops updating. | Ask the creator to reconnect. |
| `disconnected` | The account was disconnected. | Mint a connect URL if the creator wants to connect again. |
| `not_connected` | Never connected. | Mint a connect URL. |

When a platform is `expiring_soon` or `needs_reconnect`, a new connect URL refreshes the existing account in place, so its history is kept. Send `"reconnect": false` to connect a different account instead.

## Error codes

| `code` | Meaning |
| - | - |
| `account_mismatch` | The creator signed in to a different account than the one being reconnected. |
| `permissions_incomplete` | The creator didn't approve every permission requested. Ask them to try again and allow all of them. |
| `cancelled` | The creator backed out of the platform's consent screen. |
| `unavailable` | New connections are temporarily unavailable. Try again later. |
| `link_expired` | The connect URL expired. Mint a new one. |
| `not_linked` | The flow finished but no account was connected. |
| `connection_failed` | Anything else. Try again. |

`POST /api/v2/creator-connects/{id}/connect-url` itself can return `503` with code `connection_capacity_reached` when new connections are temporarily unavailable.

## Re-sync and disconnect

* `POST /api/v2/creator-connects/{id}/sync` re-checks the creator's accounts now and refreshes verified audience data that is out of date. It returns the updated CreatorLink.
* `DELETE /api/v2/creator-connects/{id}/accounts/{platform}` disconnects one platform. Verified data already stored is kept. It returns `204` whether or not the platform was connected.

## Get notified

Subscribe a [webhook](https://docs.creatorcore.co/guides/webhooks.md) to `creator_connect:%` to hear about `creator_connect:account_connected`, `creator_connect:account_disconnected` and `creator_connect:needs_reconnect` without polling.


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