# Switch LinkedIn account type

Switches a LinkedIn account type.

```http
PUT https://api.pozy.ai/v1/accounts/{accountId}/linkedin-organization
```

- Area: Accounts & connections / Connect
- Auth: Authorization: Bearer pz_live_...

## Path parameters

- `accountId` (string, required)

## Request body

Content type: `application/json`

- `accountType`, string, required: One of `personal`, `organization`
- `selectedOrganization`, object

## Example request

```bash
curl -X PUT "https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/linkedin-organization" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "accountType": "personal"
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/linkedin-organization", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    accountType: "personal"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.put(
    "https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/linkedin-organization",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "accountType": "personal",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `message`, string
- `accountType`, string: One of `personal`, `organization`
- `accountName`, string

```json
{
  "message": "Hello from Pozy",
  "accountType": "personal",
  "accountName": "Acme"
}
```
