How to Create a Pin with Pinterest API - Step by Step Guide

How to Create a Pin with Pinterest API - Step by Step Guide

In order to Create a Pin for your boards in Pinterest using API we need an Access token for Authorization purposes, so let's generate it first.

What is Pinterest?

Pinterest is a popular social media platform that is used by millions of users to discover, save, and share ideas on a variety of topics. As a content creator or marketer, it's important to have your content accessible on Pinterest, and one way to do that is by using the Pinterest API.

The Pinterest API allows developers to create, read, and update pins on the platform programmatically. This means that you can automate the process of uploading your content to Pinterest, saving you time and effort.

Before Starting to use Pinterest we must have had to request permission for accessing their APIs,

Create a Pin with Pinterest API step by step

Generate Access Code for Pinterest

Go to your browser and paste the below link in the URL to ask for permission and access code.

Make sure to replace your client id in URl before pasting.<ClientId>&redirect_uri=,boards:write,pins:read,pins:write,user_accounts:read,ads:read

Here we are asking for the following permission, which you can change according to your requirements:

Boards: read, write

Pins: read, write

user account: read

After that, it will ask for permission, click on Allow button.

Then you will receive the access code in the browser URL, copy that, and it will be needed to Generate an Access token.

Now we have got the permission and also acquired the access code, let's generate an Access token.

Generate Access Token:

Method : POST


grant_type : authorization_code

code: <Your Code>

redirect_uri :

In response you will get access token(Valid for 30days) and refresh token(Valid for 365 days).

So,using this access token now we can get our all boards,Create Pins etc.. in Pintereset.

Get all boards using API:


Method : GET


Authorization: Bearer <Your Access Token>

In response, you will get all your boards with their ids and other related details.

Create Pin using API in Pinterest:


Method : POST


Authorization: Bearer <Your Access Token>

Sample request:

    "title": "Pin Title",
    "link": "Your link",
    "description": "desc.",
    "dominant_color": "#ff5757",
    "alt_text": "sample alt text",
    "board_id": "your board id",
    "media_source": {
        "source_type": "image_url",
        "url": "image url"
    "parent_pin_id": null

After succesfuly your Pin will be created in your Given baord.

This is how we can create pins manually using Pinterest APIs.

Delete Created Pins:


Method: DELETE<Your-Pin-Id>


Authorization: Bearer <Your Access Token>

Get Pins from Spiecifc Boards:




Authorization: Bearer <Your Access Token>


using the Pinterest API to create and upload your content to the platform is a great way to reach a larger audience and save time. By following this step by step guide, you can easily create Pins programmatically and share your content on Pinterest.

Subscribe to our Newsletter

Stay up to date! Get all the latest posts delivered straight to your inbox.

If You Appreciate What We Do Here On TutsCoder, You Should Consider:

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Leave a Comment