# Select Pinterest board

Selects a Pinterest board.

```http
POST https://api.pozy.ai/v1/connect/pinterest/select-board
```

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

## Request body

Content type: `application/json`

- `profileId`, string, required
- `boardId`, string, required
- `boardName`, string
- `tempToken`, string, required
- `userProfile`, object
- `refreshToken`, string
- `expiresIn`, integer
- `redirect_url`, string (URL)
- `oauthAppId`, string

## Example request

```bash
curl -X POST "https://api.pozy.ai/v1/connect/pinterest/select-board" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "profileId": "6a0b6573846efc28aaa9a3ff",
  "boardId": "61f823c07782cb6105482d17",
  "tempToken": "string"
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/connect/pinterest/select-board", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    profileId: "6a0b6573846efc28aaa9a3ff",
    boardId: "61f823c07782cb6105482d17",
    tempToken: "string"
  }),
});
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.post(
    "https://api.pozy.ai/v1/connect/pinterest/select-board",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "profileId": "6a0b6573846efc28aaa9a3ff",
        "boardId": "61f823c07782cb6105482d17",
        "tempToken": "string",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `message`, string
- `redirect_url`, string
- `account`, object
  - `accountId`, string
  - `platform`, string: One of `pinterest`
  - `username`, string
  - `displayName`, string
  - `profilePicture`, string
  - `isActive`, boolean
  - `defaultBoardName`, string

```json
{
  "message": "Hello from Pozy",
  "redirect_url": "https://pozy.ai/media/example-1.jpg",
  "account": {
    "accountId": "696e0b682d0a31188e7a2ba9",
    "platform": "pinterest",
    "username": "acme",
    "displayName": "Acme",
    "profilePicture": "string",
    "isActive": true,
    "defaultBoardName": "Acme"
  }
}
```
