Zernio
APIFor you
Zernio
APIFor you
Platforms

Pinterest

Overview

Publish

Pins & BoardsMedia Requirements

Engage

Analytics

Reference

Limits & Errors
Dashboard
OverviewPlatformsAPI ReferenceResources
Pinterest

Pins & Boards

Publish an image pin or a video pin, manage boards and edit a published pin, plus every platformSpecificData field.


A plain post becomes an image pin when the media is an image, and a video pin when it is a video.

boardId, title and link go in platformSpecificData on the Pinterest entry. content is the pin description.

Image pin

A single image pinned to a board.

Use a 2:3 aspect ratio (1000 x 1500 px) for the best display in the Pinterest feed.

import Zernio from '@zernio/node';

const zernio = new Zernio();

const { data: published } = await zernio.posts.createPost({
  body: {
    content: 'Modern kitchen renovation ideas for small spaces',
    mediaItems: [
      { type: 'image', url: 'https://cdn.example.com/kitchen-ideas.jpg' }
    ],
    platforms: [{
      platform: 'pinterest',
      accountId: '66b2e19d8c3f5a7e9d0b1c2d',
      platformSpecificData: {
        title: 'Modern Kitchen Renovation Ideas',
        boardId: '1022106146582011234',
        link: 'https://myblog.com/kitchen-renovation'
      }
    }],
    publishNow: true
  }
});

console.log(published.post.platforms[0].platformPostUrl);

Response (201):

{
  "post": {
    "_id": "65f1c0a9e2b5af0012ab34cd",
    "status": "published",
    "platforms": [
      {
        "platform": "pinterest",
        "status": "published",
        "platformPostUrl": "https://www.pinterest.com/pin/..."
      }
    ]
  }
}

Every sample below changes only the mediaItems or the platforms entry of this request.

Video pin

A single video pinned to a board.

coverImageUrl sets a custom cover. coverImageKeyFrameTime extracts a frame at that second instead.

"mediaItems": [
  { "type": "video", "url": "https://cdn.example.com/recipe.mp4" }
],
"platforms": [{
  "platform": "pinterest",
  "accountId": "66b2e19d8c3f5a7e9d0b1c2d",
  "platformSpecificData": {
    "title": "5-Minute Breakfast Recipe",
    "boardId": "1022106146582011234",
    "link": "https://myrecipes.com/quick-breakfast",
    "coverImageUrl": "https://cdn.example.com/recipe-cover.jpg"
  }
}]

Boards

Every pin belongs to a board. List the boards on a connected account, or create one through the API.

The boards:write scope is part of every Pinterest connection, so no reconnect is needed.

List boards

const { data: boards } = await zernio.connect.getPinterestBoards({
  path: { accountId: '66b2e19d8c3f5a7e9d0b1c2d' }
});

console.log(boards.boards);

Response (200):

{
  "boards": [
    {
      "id": "1022106146582011234",
      "name": "Kitchen Ideas",
      "description": "Renovations and layouts",
      "privacy": "PUBLIC",
      "url": "https://www.pinterest.com/yourhandle/kitchen-ideas/"
    }
  ]
}

Create a board

The response carries the new board's id, which works at once as platformSpecificData.boardId. privacy is PUBLIC (default), PROTECTED or SECRET.

const { data: created } = await zernio.connect.createPinterestBoard({
  path: { accountId: '66b2e19d8c3f5a7e9d0b1c2d' },
  body: {
    name: 'Summer Recipes',
    description: 'My favorite summer recipes',
    privacy: 'PUBLIC'
  }
});

console.log(created.board.id);

Response (201):

{
  "board": {
    "id": "1022106146582019876",
    "name": "Summer Recipes",
    "description": "My favorite summer recipes",
    "privacy": "PUBLIC",
    "url": "https://www.pinterest.com/yourhandle/summer-recipes/"
  }
}

Pinterest rejects a duplicate board name on the same account. You cannot pin to a secret board you do not own.

A board-creation error from Pinterest comes back with its original message and a 502.

Edit a published pin

Edit post replaces the description of a pin that is already live, up to the same 800 characters a create takes.

The title, media, destination link and board cannot be changed. A title derived from the first line of the original content at publish time stays as it was.

There is no time window and no edit limit, and the pin id is unchanged.

Pinterest's pin-update endpoint is a closed beta. Until Pinterest allowlists the app, every edit request is rejected with a "beta feature not yet enabled" error. Nothing on your side changes that; Pinterest grants the access.

const { data: edited } = await zernio.posts.editPost({
  path: { postId: '65f1c0a9e2b5af0012ab34cd' },
  body: {
    platform: 'pinterest',
    content: 'Updated pin description with the new recipe link details'
  }
});

console.log(edited.id, edited.url);

Response (200):

{
  "success": true,
  "id": "1022106146582013456",
  "url": "https://www.pinterest.com/pin/1022106146582013456/",
  "message": "Post edited successfully"
}

Several accounts. If the post was published to several Pinterest accounts, pass accountId to pick which copy to edit. Without it, the first pinterest entry on the post is edited.

Platform fields

All fields go in platformSpecificData on the Pinterest entry.

FieldTypeDefaultDescription
boardIdstringThe board to pin to. Send it on every post. Get board ids from GET /v1/accounts/{accountId}/pinterest-boards, or create a board with POST on the same path.
boardSectionIdstringSection inside the board. The pin lands on the board itself when omitted. Pinterest rejects the pin if the section does not belong to boardId, so send both together. No Zernio endpoint returns section ids: read them from Pinterest's own board sections API, which the same connected account can call.
titlestring (max 100 chars)First line of contentPin title, searchable by Pinterest users.
linkstring (URL)Destination when someone clicks the pin. Must be valid HTTPS, no URL shorteners. The field that drives traffic. Alias: url.
coverImageUrlstring (URL)Custom cover image for video pins.
coverImageKeyFrameTimenumber (seconds)0Extract a video frame at this many seconds as the cover. Ignored when coverImageUrl is set.
isAiGeneratedbooleanfalsetrue creates the pin with Pinterest's AI_MODIFIED disclosure (an "AI modified" label). false omits the disclosure; Pinterest may still label a pin from its own detection.
Was this page helpful?

Pinterest

Publish image and video pins to Pinterest boards with the Zernio API, with destination links, cover images, board creation and description edits.

Media Requirements

Image and video requirements for Pinterest pins, and the rules for media URLs.

On this page

Image pinVideo pinBoardsList boardsCreate a boardEdit a published pinPlatform fields