Pinterest API Guide

How to Get Pinterest Board IDs via API

Retrieve Pinterest board IDs for your connected account using the PostFast API. Required for scheduling pins to specific boards.

Last updated: January 2025
Automate your Pinterest content strategyGet API Key

Every Pinterest pin must be published to a specific board. Before you can schedule pins via the PostFast API, you need to know the board ID for your target board.

Use the GET /social-media/{socialMediaId}/pinterest-boards endpoint to retrieve all boards for your connected Pinterest account. The response includes each board's name, description, and most importantly, the boardId value you'll use when creating pins.

Important: Use the boardId field from the response (e.g., "1234567890123456789"), not the internal id field. The boardId is Pinterest's native identifier that you'll pass as pinterestBoardId in your post controls.

API Parameters

ParameterTypeDescription
pinterestBoardIdstringThe Pinterest board ID to publish the pin to. Get available boards from GET /social-media/{socialMediaId}/pinterest-boards and use the boardId field.
pinterestLinkstringDestination URL when users click the pin. If omitted, the pin will not have a clickable destination.

Code Example

const response = await fetch('https://api.postfa.st/social-posts', {
  method: 'POST',
  headers: {
    'pf-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
        "posts": [
            {
                "content": "25 Easy Meal Prep Ideas for Busy Weeknights\n\nSave hours every week with these simple, healthy recipes. Perfect for batch cooking and portion control. Includes shopping list and storage tips!",
                "mediaItems": [
                    {
                        "key": "image/a1b2c3d4-e5f6-7890-1234-567890abcdef.jpg",
                        "type": "IMAGE",
                        "sortOrder": 0
                    }
                ],
                "scheduledAt": "2025-01-31T10:00:00.000Z",
                "socialMediaId": "ee4a6277-b1cd-20a3-f605-334544338010"
            }
        ],
        "controls": {
            "pinterestBoardId": "1234567890123456789",
            "pinterestLink": "https://yourblog.com/meal-prep-ideas"
        }
    })
});

const data = await response.json();

Did You Know?

Rate Limit
90 requests per hour
The pinterest-boards endpoint has its own rate limit separate from other endpoints
Board ID Field
Use boardId, not id
The response contains both id (internal) and boardId (Pinterest native) - use boardId
Account Required
Pinterest socialMediaId
You need your Pinterest account's socialMediaId from GET /social-media/my-social-accounts
Manual Sync
New boards need sync
Boards created on Pinterest after connecting won't appear until you sync in the dashboard

Tips

Cache your board IDs after fetching - they rarely change and this saves API calls

Call GET /social-media/my-social-accounts first to get your Pinterest socialMediaId

Board IDs are numeric strings like "1234567890123456789" - store them as strings, not numbers

If you create new boards on Pinterest, visit Accounts in your PostFast dashboard and click "Sync Boards"

The response includes board names and descriptions to help you identify the right board programmatically

Schedule pins to any board via API

7-day free trial
Try PostFast Free

Common Pitfalls

Using the wrong ID field

The API returns both id (PostFast internal UUID) and boardId (Pinterest native). Always use boardId when setting pinterestBoardId in your post controls.

New boards not appearing

Boards created on Pinterest after you connected your account won't show up automatically. Visit the Accounts page in PostFast and click "Sync Boards" to refresh.

Wrong socialMediaId

Make sure you're using the socialMediaId for your Pinterest account, not another platform. Check the platform field is "PINTEREST" in your accounts list.

Storing boardId as number

Pinterest board IDs are large numbers that may exceed JavaScript's safe integer limit. Always store and transmit them as strings.

Frequently Asked Questions

How do I get my Pinterest board IDs?

First, get your Pinterest socialMediaId from GET /social-media/my-social-accounts (look for platform: "PINTEREST"). Then call GET /social-media/{socialMediaId}/pinterest-boards. Use the boardId field from each board object when setting pinterestBoardId.

What's the difference between id and boardId in the response?

The id field is PostFast's internal UUID for the board record. The boardId field is Pinterest's native board identifier (like "1234567890123456789"). Always use boardId when creating pins.

Why don't I see my new Pinterest board?

Boards created on Pinterest after you connected your account aren't synced automatically. Go to your PostFast dashboard, find your Pinterest account on the Accounts page, and click "Sync Boards" to refresh the list.

Build your Pinterest presence with programmatic posting

Start Free Trial
7-day free trialCancel anytime