Pinterest API

How to post on Pinterest
using the API

Post and schedule pins on Pinterest programmatically using the API. Create a key, connect Pinterest, and create the pin.

the whole flow

Five steps, then it is scheduled

You call PostWing. PostWing publishes to Pinterest at the time you set. The post also shows up on your calendar.

  1. 01Create an API key
  2. 02Connect Pinterest
  3. 03Create the pin
  4. 04Cross-post to more channels
  5. 05Confirm it
01

Create an API key

Open Dashboard → AI & API and create a key. Copy it once. It starts with pw_live_. Send it on every request:

Header

Authorization: Bearer pw_live_…

Every URL below starts at https://postwing.io/api/v1.

02

Connect Pinterest

Connect the Pinterest account you want to pin from. You only do this once.

The simple way is in the dashboard. Open Accounts, choose Pinterest, and finish the Pinterest login.

From the API, start that same login. The response includes a url. Open it and approve Pinterest.

Start connect

curl -s -X POST "https://postwing.io/api/v1/accounts" \
  -H "Authorization: Bearer pw_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "platform": "pinterest" }'

After you finish in the browser, sync. This imports the account into your workspace and returns the account id.

Sync

curl -s -X POST "https://postwing.io/api/v1/accounts/sync" \
  -H "Authorization: Bearer pw_live_…"

In the response, find the object where platform is pinterest and copy account_id. That is the id you send when you create the pin and when you list boards.

Sync response

{
  "synced_count": 1,
  "accounts": [
    {
      "account_id": "f6a7b8c9-d0e1-2345-f012-456789012345",
      "platform": "pinterest",
      "handle": "brand",
      "display_name": "Brand",
      "status": "connected"
    }
  ]
}

Connected Pinterest in the dashboard instead? List accounts and copy the same field:

List accounts

curl -s -X GET "https://postwing.io/api/v1/accounts" \
  -H "Authorization: Bearer pw_live_…"
03

Create the pin

A pin needs a board and an image or a video. A caption by itself is not enough. caption is the pin description. List boards first, then copy the board id.

List boards

curl -s -X GET "https://postwing.io/api/v1/accounts/pinterest-boards?account_id=f6a7b8c9-d0e1-2345-f012-456789012345" \
  -H "Authorization: Bearer pw_live_…"

Boards response

{
  "account_id": "f6a7b8c9-d0e1-2345-f012-456789012345",
  "boards": [
    { "id": "1234567890", "name": "Lookbook" }
  ]
}

Copy id from the board you want. Send it as board_ids on the Pinterest target, with the image, a future time, and the account_id from sync. This call creates the pin. Pinterest does not publish until you confirm in the next step. scheduled_at is UTC. Pass more than one id to put the same pin on several boards.

Create an image pin

curl -s -X POST "https://postwing.io/api/v1/posts/preview" \
  -H "Authorization: Bearer pw_live_…" \
  -H "Content-Type: application/json" \
  -d '{
  "caption": "New lookbook, now live.",
  "scheduled_at": "2026-10-12T15:00:00Z",
  "targets": [
    {
      "account_id": "f6a7b8c9-d0e1-2345-f012-456789012345",
      "platform_options": {
        "board_ids": ["1234567890"]
      }
    }
  ],
  "media_items": [
    { "url": "https://cdn.example.com/lookbook.jpg", "type": "image" }
  ]
}'

You get back three things that matter:

  • preview: the description, time, image, and Pinterest account. Check this before you confirm.
  • confirmation_token: you send this in the next step
  • expires_in_seconds: 300, so the token lasts 5 minutes

Response

{
  "preview": {
    "caption": "New lookbook, now live.",
    "scheduled_at": "2026-10-12T15:00:00.000Z",
    "post_type": "image",
    "targets": [
      {
        "account_id": "f6a7b8c9-d0e1-2345-f012-456789012345",
        "platform": "pinterest",
        "handle": "brand"
      }
    ]
  },
  "confirmation_token": "eyJ…signature",
  "expires_in_seconds": 300
}

One image per pin. The image URL has to be public HTTPS.

04

Cross-post to all 8 platforms

The same image can go to Instagram and Facebook. Connect each channel the way you connected Pinterest, then copy its account_id from the sync response.

Connect Instagram

curl -s -X POST "https://postwing.io/api/v1/accounts" \
  -H "Authorization: Bearer pw_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "platform": "instagram" }'

Connect Facebook

curl -s -X POST "https://postwing.io/api/v1/accounts" \
  -H "Authorization: Bearer pw_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "platform": "facebook" }'

Open each url, finish the login, then sync once. Copy account_id where platform is instagram, and where platform is facebook.

Add those ids to targets on the create call. Keep board_ids on the Pinterest target only. One request, one confirm. Every account publishes at the same scheduled_at. Leave caption off a target to use the shared caption. Set caption when that channel needs different text.

Create one image post for three channels

curl -s -X POST "https://postwing.io/api/v1/posts/preview" \
  -H "Authorization: Bearer pw_live_…" \
  -H "Content-Type: application/json" \
  -d '{
  "caption": "New lookbook, now live.",
  "scheduled_at": "2026-10-12T15:00:00Z",
  "targets": [
    {
      "account_id": "f6a7b8c9-d0e1-2345-f012-456789012345",
      "platform_options": {
        "board_ids": ["1234567890"]
      }
    },
    { "account_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901" },
    {
      "account_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "caption": "The new lookbook is up."
    }
  ],
  "media_items": [
    { "url": "https://cdn.example.com/lookbook.jpg", "type": "image" }
  ]
}'

That image can also go to LinkedIn, X, Threads, and TikTok. YouTube needs a video. Pinterest still needs board_ids on its own target.

05

Confirm the pin

When the pin preview looks right, confirm with the token from that response. Use the token as-is. Do not invent one.

Confirm

curl -s -X POST "https://postwing.io/api/v1/posts/confirm" \
  -H "Authorization: Bearer pw_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "confirmation_token": "eyJ…signature" }'

The response includes view_url. Open it to see the pin on your calendar. Pinterest publishes at the time you set. Instagram and Facebook publish then too, when you added them. You can edit or cancel later from the dashboard or with the same API.

If confirm says the token expired, create the pin again and confirm the new token within 5 minutes.

video

Post a video pin

A video pin is the same request with one video file. You still send board_ids.

Create a video pin

curl -s -X POST "https://postwing.io/api/v1/posts/preview" \
  -H "Authorization: Bearer pw_live_…" \
  -H "Content-Type: application/json" \
  -d '{
  "caption": "A look through the new collection",
  "scheduled_at": "2026-10-12T18:00:00Z",
  "targets": [
    {
      "account_id": "f6a7b8c9-d0e1-2345-f012-456789012345",
      "platform_options": {
        "board_ids": ["1234567890"]
      }
    }
  ],
  "media_items": [
    { "url": "https://cdn.example.com/lookbook.mp4", "type": "video" }
  ]
}'

One video per pin. The video URL has to be public HTTPS, and videos imported from a URL need to be 100MB or smaller. A file on your computer uses the direct upload URL, covered in the API docs.

Details worth knowing

  • scheduled_at has to be a future time in ISO 8601, usually UTC.
  • Creating the pin does not publish it. Confirm is the step that schedules it.
  • A pin needs an image or a video, plus board_ids. A caption by itself is not enough.
  • One image per pin. A video is one file. Pass more than one board id to pin to several boards.
  • title and link are optional. board_ids are required on the Pinterest target.
  • The confirmation token expires in 5 minutes and only works for the user who created the pin.
  • API access is included on every plan, from $9.99/mo. Pins count as normal posts on your account.

questions

Pinterest API FAQ

No. A pin needs an image or a video, and board_ids from GET /accounts/pinterest-boards. Then confirm with the token.

ready when you are

Schedule your next Pinterest pin from the API

Create a key, connect Pinterest, and create the pin.