Endpoint
GET /api/content/pinterest/boards returns the boards for one connected Pinterest account. Pass the connected accountId as a query parameter and authenticate with the X-API-Key header (a Bearer token also works for dashboard sessions). The data array lists each board with the id to use when publishing.
const API_BASE_URL = 'https://api.wahdx.com';
const API_KEY = process.env.WAHDX_API_KEY;
const accountId = 'PINTEREST_ACCOUNT_ID';
const url = API_BASE_URL + '/api/content/pinterest/boards?accountId=' + encodeURIComponent(accountId);
const response = await fetch(url, {
headers: { 'X-API-Key': API_KEY }
});
const { data: boards } = await response.json();
console.log(boards);import os
import requests
API_BASE_URL = 'https://api.wahdx.com'
API_KEY = os.environ['WAHDX_API_KEY']
account_id = 'PINTEREST_ACCOUNT_ID'
response = requests.get(
f'{API_BASE_URL}/api/content/pinterest/boards',
params={'accountId': account_id},
headers={'X-API-Key': API_KEY},
timeout=30,
)
boards = response.json()['data']
print(boards)curl -G "https://api.wahdx.com/api/content/pinterest/boards" \
-H "X-API-Key: $WAHDX_API_KEY" \
--data-urlencode "accountId=PINTEREST_ACCOUNT_ID"