Pinterest API integration
MegaToolBox connects Pinterest accounts through OAuth. The user starts connection from the dashboard, Pinterest redirects back to the callback URL, and the platform stores encrypted token data with expiry monitoring.
GET /pinterest/connect
GET /pinterest/callback?code=AUTH_CODE&state=CSRF_STATEInternal endpoints
POST /pins/ai-generateGenerate Pinterest title, description, hashtags, alt text, keywords, slug, and CTA from a destination URL.
POST /csv-import/uploadUpload a CSV campaign and create import reports.
POST /queue/actionPause, resume, retry, or prioritize queue jobs.
GET /analytics/dataReturn Chart.js-ready publishing analytics for the authenticated workspace.
JSON examples
{
"website_id": 12,
"pinterest_account_id": 4,
"board_id": 88,
"title": "Pinterest Marketing Checklist for 2026",
"description": "Save this guide for building a scalable Pinterest workflow.",
"destination_url": "https://example.com/pinterest-marketing",
"scheduled_at": "2026-07-07 14:00:00"
}Webhook docs
Webhook receivers should validate a shared secret, log payloads, and enqueue internal actions instead of publishing directly during the request.
{
"event": "pin.published",
"pin_id": 1024,
"status": "published",
"published_at": "2026-07-07T14:00:00Z"
}Security notes
Use HTTPS, CSRF tokens for browser actions, encrypted secrets, strict OAuth redirect URLs, audit logs, and role-based permissions for all write operations.