Skip to content

Pinterest API

Schedule and automate Pinterest Pins with Zernio API - Image pins, video pins, boards, destination links, and cover images

Quick Reference

PropertyValue
Title limit100 characters
Description limit500 characters
Images per pin1
Videos per pin1
Image formatsJPEG, PNG, WebP, GIF
Image max size32 MB
Video formatsMP4, MOV
Video max size2 GB
Video duration4 sec - 15 min
SchedulingYes
InboxNo (Pinterest has no API-accessible inbox)
AnalyticsNo (via Zernio)

Before You Start

Pinterest is a search engine, not a social feed. Pins are discovered through search and browse, not by followers. This means SEO (title, description, board name) matters more than posting time. Pins have a 3-6 month lifespan, unlike hours on other platforms. Also: boardId is effectively required -- always provide it.

Additional requirements:

  • A Pinterest Board is required to pin to
  • No text-only pins (media is required)
  • No carousels or multi-image posts (1 image or 1 video per pin)
  • The link field is critical for driving traffic

Quick Start

Create a Pin on Pinterest:

typescript
const { post } = await zernio.posts.createPost({
  content: '10 Tips for Better Photography',
  mediaItems: [
    { type: 'image', url: 'https://cdn.example.com/pin-image.jpg' }
  ],
  platforms: [{
    platform: 'pinterest',
    accountId: 'YOUR_ACCOUNT_ID',
    platformSpecificData: {
      title: '10 Tips for Better Photography',
      boardId: 'YOUR_BOARD_ID',
      link: 'https://myblog.com/photography-tips'
    }
  }],
  publishNow: true
});
console.log('Pin created!', post._id);
python
result = client.posts.create_post(
    content="10 Tips for Better Photography",
    media_items=[
        {"type": "image", "url": "https://cdn.example.com/pin-image.jpg"}
    ],
    platforms=[{
        "platform": "pinterest",
        "accountId": "YOUR_ACCOUNT_ID",
        "platformSpecificData": {
            "title": "10 Tips for Better Photography",
            "boardId": "YOUR_BOARD_ID",
            "link": "https://myblog.com/photography-tips"
        }
    }],
    publish_now=True
)
post = result.post
print(f"Pin created! {post['_id']}")
bash
curl -X POST https://zernio.com/api/v1/posts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "10 Tips for Better Photography",
    "mediaItems": [
      {"type": "image", "url": "https://cdn.example.com/pin-image.jpg"}
    ],
    "platforms": [{
      "platform": "pinterest",
      "accountId": "YOUR_ACCOUNT_ID",
      "platformSpecificData": {
        "title": "10 Tips for Better Photography",
        "boardId": "YOUR_BOARD_ID",
        "link": "https://myblog.com/photography-tips"
      }
    }],
    "publishNow": true
  }'

Content Types

Image Pin

A single image pinned to a board. The most common pin type. Use 2:3 aspect ratio (1000x1500 px) for optimal display in the Pinterest feed.

typescript
const { post } = await zernio.posts.createPost({
  content: 'Modern kitchen renovation ideas for small spaces',
  mediaItems: [
    { type: 'image', url: 'https://cdn.example.com/kitchen-ideas.jpg' }
  ],
  platforms: [{
    platform: 'pinterest',
    accountId: 'YOUR_ACCOUNT_ID',
    platformSpecificData: {
      title: 'Modern Kitchen Renovation Ideas',
      boardId: 'YOUR_BOARD_ID',
      link: 'https://myblog.com/kitchen-renovation'
    }
  }],
  publishNow: true
});
console.log('Image pin created!', post._id);
python
result = client.posts.create_post(
    content="Modern kitchen renovation ideas for small spaces",
    media_items=[
        {"type": "image", "url": "https://cdn.example.com/kitchen-ideas.jpg"}
    ],
    platforms=[{
        "platform": "pinterest",
        "accountId": "YOUR_ACCOUNT_ID",
        "platformSpecificData": {
            "title": "Modern Kitchen Renovation Ideas",
            "boardId": "YOUR_BOARD_ID",
            "link": "https://myblog.com/kitchen-renovation"
        }
    }],
    publish_now=True
)
post = result.post
print(f"Image pin created! {post['_id']}")
bash
curl -X POST https://zernio.com/api/v1/posts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Modern kitchen renovation ideas for small spaces",
    "mediaItems": [
      {"type": "image", "url": "https://cdn.example.com/kitchen-ideas.jpg"}
    ],
    "platforms": [{
      "platform": "pinterest",
      "accountId": "YOUR_ACCOUNT_ID",
      "platformSpecificData": {
        "title": "Modern Kitchen Renovation Ideas",
        "boardId": "YOUR_BOARD_ID",
        "link": "https://myblog.com/kitchen-renovation"
      }
    }],
    "publishNow": true
  }'

Video Pin

A single video pinned to a board. You can optionally set a custom cover image or auto-extract a frame at a specific time.

typescript
const { post } = await zernio.posts.createPost({
  content: 'Quick 5-minute breakfast recipe',
  mediaItems: [
    { type: 'video', url: 'https://cdn.example.com/recipe.mp4' }
  ],
  platforms: [{
    platform: 'pinterest',
    accountId: 'YOUR_ACCOUNT_ID',
    platformSpecificData: {
      title: '5-Minute Breakfast Recipe',
      boardId: 'YOUR_BOARD_ID',
      link: 'https://myrecipes.com/quick-breakfast',
      coverImageUrl: 'https://cdn.example.com/recipe-cover.jpg'
    }
  }],
  publishNow: true
});
console.log('Video pin created!', post._id);
python
result = client.posts.create_post(
    content="Quick 5-minute breakfast recipe",
    media_items=[
        {"type": "video", "url": "https://cdn.example.com/recipe.mp4"}
    ],
    platforms=[{
        "platform": "pinterest",
        "accountId": "YOUR_ACCOUNT_ID",
        "platformSpecificData": {
            "title": "5-Minute Breakfast Recipe",
            "boardId": "YOUR_BOARD_ID",
            "link": "https://myrecipes.com/quick-breakfast",
            "coverImageUrl": "https://cdn.example.com/recipe-cover.jpg"
        }
    }],
    publish_now=True
)
post = result.post
print(f"Video pin created! {post['_id']}")
bash
curl -X POST https://zernio.com/api/v1/posts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Quick 5-minute breakfast recipe",
    "mediaItems": [
      {"type": "video", "url": "https://cdn.example.com/recipe.mp4"}
    ],
    "platforms": [{
      "platform": "pinterest",
      "accountId": "YOUR_ACCOUNT_ID",
      "platformSpecificData": {
        "title": "5-Minute Breakfast Recipe",
        "boardId": "YOUR_BOARD_ID",
        "link": "https://myrecipes.com/quick-breakfast",
        "coverImageUrl": "https://cdn.example.com/recipe-cover.jpg"
      }
    }],
    "publishNow": true
  }'

Media Requirements

Images

PropertyRequirement
Max images1 per pin
FormatsJPEG, PNG, WebP, GIF
Max file size32 MB
Recommended1000 x 1500 px (2:3)
Min dimensions100 x 100 px

Aspect Ratios

RatioDimensionsUse Case
2:31000 x 1500 pxOptimal - Standard Pin
1:11000 x 1000 pxSquare Pin
1:2.11000 x 2100 pxLong Pin (max height)

> Best practice: Use 2:3 aspect ratio for optimal display in the Pinterest feed.

GIFs

Pinterest supports animated GIFs. They auto-play in the feed and are treated as images (not video). Max file size is 32 MB, but keeping under 10 MB is recommended for fast loading.

Videos

PropertyRequirement
Max videos1 per pin
FormatsMP4, MOV
Max file size2 GB
Duration4 seconds - 15 minutes
Aspect ratio2:3, 1:1, or 9:16
Resolution1080p recommended
Frame rate25+ fps

Video Specs

PropertyMinimumRecommended
Resolution240p1080p
Bitrate-10 Mbps
Audio-AAC, 128 kbps

Platform-Specific Fields

All fields go inside platformSpecificData on the Pinterest platform entry.

FieldTypeDefaultDescription
boardIdstring--Effectively required. The board to pin to. Get board IDs via GET /v1/accounts/{accountId}/pinterest-boards. Aliases: board_id, board.
titlestring (max 100 chars)First line of contentPin title. Searchable by Pinterest users.
linkstring (URL)--Destination link when users click the pin. Must be valid HTTPS. No URL shorteners. Most important field for driving traffic. Aliases: url.
coverImageUrlstring (URL)--Custom cover image for video pins. Aliases: cover_image_url, thumbnailUrl, thumbnail_url.
coverImageKeyFrameTimenumber (seconds)0Auto-extract a video frame at N seconds to use as cover. Ignored if coverImageUrl is set.

Media URL Requirements

These do not work as media URLs:

  • Google Drive -- returns an HTML download page, not the file
  • Dropbox -- returns an HTML preview page
  • OneDrive / SharePoint -- returns HTML
  • iCloud -- returns HTML

Test your URL in an incognito browser window. If you see a webpage instead of the raw image or video, it will not work.

Media URLs must be:

  • Publicly accessible (no authentication required)
  • Returning actual media bytes with the correct Content-Type header
  • Not behind redirects that resolve to HTML pages
  • Hosted on a fast, reliable CDN

Analytics

> Included — Analytics is bundled with every paid account on the Usage plan.

Available metrics via the Analytics API:

MetricAvailable
Impressions
Saves
Clicks
typescript
const analytics = await zernio.analytics.getAnalytics({
  platform: 'pinterest',
  fromDate: '2024-01-01',
  toDate: '2024-01-31'
});
console.log(analytics.posts);
python
analytics = client.analytics.get_analytics(
    platform="pinterest",
    from_date="2024-01-01",
    to_date="2024-01-31"
)
print(analytics["posts"])
bash
curl "https://zernio.com/api/v1/analytics?platform=pinterest&fromDate=2024-01-01&toDate=2024-01-31" \
  -H "Authorization: Bearer YOUR_API_KEY"

What You Can't Do

These features are not available through Pinterest's API:

  • Create Idea Pins (multi-page stories)
  • Claim website
  • Create Rich Pins (requires meta tags on your website)
  • Access Pinterest Analytics (via Zernio)
  • Create Shopping catalogs
  • Edit or delete pins after creation (via Zernio)
  • Create multi-image posts or carousels

Common Errors

Pinterest has a 21.1% failure rate across Zernio's platform (7,928 failures out of 37,646 attempts). Here are the most frequent errors and how to fix them:

ErrorMeaningFix
"Invalid URL or request data."Pinterest could not process the URL or request dataVerify media URL is publicly accessible, returns actual media bytes, and uses HTTPS.
"Unable to reach the URL. Please check the URL is correct and try again."Pinterest's servers cannot fetch your mediaTest the URL in an incognito browser. Ensure no authentication is required and there are no redirects to HTML pages.
"Pinterest rate limit reached."Too many API calls in a short windowSpace out pins. Avoid bursts of 10+ pins at once.
"Pinterest requires a boardId. Provide platformSpecificData.boardId."No board was specified in the requestAlways provide boardId. List available boards with GET /v1/accounts/{accountId}/pinterest-boards.

Inbox

Pinterest does not have inbox features available via API.

  • No DMs -- Pinterest's messaging API is not available for third-party apps
  • No comments -- Pin comments are not accessible via API
  • No reviews -- Pinterest does not have a reviews system
  • Connect Pinterest Account - OAuth flow
  • Create Post - Pin creation and scheduling
  • Upload Media - Image and video uploads
  • Pinterest Boards - List boards for an account