Skip to content

Create Pinterest Board ​

POSThttps://api.repliz.com/public/addon/pinterest/board

Creates a board on a connected Pinterest account, without opening Pinterest. The returned board can go straight into additionalInfo.channel of Create Schedule.

Endpoint Details ​

  • Authentication: Basic Auth (Authorization: Basic Base64(AccessKey:SecretKey)) or Bearer token from Login with Repliz
  • Scope (Bearer only): addon:write
  • Access Tier: Premium+

Request Body ​

FieldTypeRequiredDescription
accountIdstringYesID of a connected Pinterest account, the _id from Get Account.
namestringYesName of the board, up to 100 characters. Pinterest rejects a name already used by another board of the account.
descriptionstringNoDescription of the board, up to 800 characters. Left out or empty, the board has no description.

The board is public. Secret boards aren't supported.

Example Request ​

bash
curl -X POST "https://api.repliz.com/public/addon/pinterest/board" \
  -H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)" \
  -H "Content-Type: application/json" \
  -d '{
    "accountId": "680affa5ce12f2f72916f67e",
    "name": "Social Media Tips",
    "description": "Ideas to grow your social media accounts"
  }'
javascript
import axios from 'axios';

const response = await axios.post(
  'https://api.repliz.com/public/addon/pinterest/board',
  {
    accountId: '680affa5ce12f2f72916f67e',
    name: 'Social Media Tips',
    description: 'Ideas to grow your social media accounts',
  },
  {
    auth: {
      username: 'YOUR_ACCESS_KEY',
      password: 'YOUR_SECRET_KEY',
    },
  },
);

console.log(response.data);
javascript
const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');

const response = await fetch('https://api.repliz.com/public/addon/pinterest/board', {
  method: 'POST',
  headers: {
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    accountId: '680affa5ce12f2f72916f67e',
    name: 'Social Media Tips',
    description: 'Ideas to grow your social media accounts',
  }),
});

const data = await response.json();
console.log(data);

Response ​

json
{
  "id": "1006921296753698211",
  "name": "Social Media Tips",
  "description": "Ideas to grow your social media accounts",
  "picture": "",
  "pinCount": 0,
  "type": "board"
}
json
{
  "code": 400,
  "message": "invalid account type"
}
json
{
  "code": 404,
  "message": "account not found"
}
json
{
  "code": 401,
  "message": "unauthorized"
}

The fields are the same as an item of Get Pinterest Board. A new board has no cover yet, so picture is empty until it has a pin.

Errors from Pinterest, such as a name that's already taken, come back with Pinterest's status code and message.