---
title: "Reconnect a social account"
description: "PubNio API integrations.reconnect: reconnect a social account. Request fields, examples in five clients, errors, and idempotency."
---

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

# Reconnect a social account

Reconnect a social account with [`POST /api/v1/integrations/accounts/{accountId}/reconnect`](https://pubnio.com/api/v1/docs#tag/integrations/POST/api/v1/integrations/accounts/{accountId}/reconnect). Requires an API key with the `publish` scope or a signed-in workspace owner. A key's URL is a connect link: whoever holds it can connect an account until it is used or expires.

## Request

Start OAuth for an existing account. Bluesky opens the app-password form; use [`POST /api/v1/integrations/bluesky/session`](https://pubnio.com/api/v1/docs#tag/integrations/POST/api/v1/integrations/bluesky/session) with accountId for a one-call reconnect. Successful reconnection preserves its PubNio account ID.

| Parameter      | In    | Type                                                       | Required |
| -------------- | ----- | ---------------------------------------------------------- | -------- |
| `accountId`    | path  | UUID                                                       | Yes      |
| `workspaceId`  | query | UUID                                                       | Yes      |
| `profileId`    | query | UUID                                                       | No       |
| `loginMethod`  | query | `"instagram_login"`, `"facebook_login"`, `"unified_login"` | No       |
| `capabilities` | query | array of one of 7 strings                                  | No       |
| `redirectUrl`  | query | string                                                     | No       |
| `expiresIn`    | query | string                                                     | No       |

## Response

- HTTP 200: an object with `attemptId`, `url`, `expiresAt`.

The [OpenAPI document](https://pubnio.com/api/v1/openapi) has each field's type.

## Examples

### TypeScript

```ts
const launch = await workspace.accounts.reconnect(accountId);
```

### Python

```python
launch = workspace.accounts.reconnect(account_id)
```

### cURL

```sh
curl -X POST "https://pubnio.com/api/v1/integrations/accounts/$ACCOUNT_ID/reconnect?workspaceId=$WORKSPACE_ID" \
  -H "Authorization: Bearer $PUBNIO_API_KEY"
```

### CLI

```sh
pnio integrations reconnect "$ACCOUNT_ID"
```

### MCP execute

```js
async () => {
  const accountId = "<accountId>";
  const response = await codemode.request({
    method: "POST",
    path: `/api/v1/integrations/accounts/${accountId}/reconnect`,
    query: { workspaceId: codemode.workspaceId },
  });
  return response.data;
};
```

## Errors

It declares no problem of its own.

It declares the problems [most operations](https://pubnio.com/docs/reference/#shared-problems) declare.

## Idempotency

No key, so a retried `POST` is not deduplicated. Read the current state before you retry.

## Limits

- Field lengths and ranges are in the [OpenAPI document](https://pubnio.com/api/v1/openapi).

## Related

- [Connected accounts operations](https://pubnio.com/docs/reference/#connected-accounts)
- [Accounts and connections](https://pubnio.com/docs/accounts/)

Source: https://pubnio.com/docs/reference/integrations-reconnect/index.mdx
