Platforms
Connect a Pinterest account, publish image and video pins to its boards, and schedule or delete them.
Publish image and video pins to a board, schedule them and delete them.
Quick Reference
| Property | Value |
|---|---|
| Account types | Pinterest accounts |
| Connection method | OAuth |
| Post types | image, video |
| Max media per post | 1 |
| Text limit | 800 characters, title 100 |
| Threads | No |
| Quotes | No |
| Remote delete | |
| Comments | No |
| Likes | No |
| Reposts | No |
| Bookmarks | No |
| Direct messages | No |
| Post analytics | No |
| Account analytics | No |
Every pin is 1 image or video, saved to the board in pinterest.boardId. text is the description, and its first line is the default title.
Connect
Connect in Dashboard → Connections, or with a connect session. The account needs a board. You can create one through the API.
Permissions
| Scope | Used for |
|---|---|
user_accounts:read | Name, username and avatar |
boards:read | Listing boards |
boards:write | Creating boards |
pins:read | Reading pins and videos |
pins:write | Creating and deleting pins |
Staying Connected
Access renews itself, so canAutoRenew is true.
Reconnect if status leaves active, or on TOKEN_INVALID. Use the same Pinterest account, and its id stays the same.
Publish
import { Configuration, PostsApi } from "@onepostly/sdk";
const postsApi = new PostsApi(
new Configuration({ accessToken: process.env.ONEPOSTLY_API_KEY })
);
const response = await postsApi.createPost({
createPostBody: {
"text": "Ten ways to style open shelves in a small kitchen.",
"mediaKind": "image",
"media": [
{
"url": "https://cdn.onepostly.com/media/kitchen-shelves.jpg"
}
],
"accounts": [
{
"accountId": "acc_YOUR_PINTEREST_ACCOUNT_ID",
"pinterest": {
"boardId": "1035968376946032411",
"title": "Open Shelf Styling Ideas",
"link": "https://example.com/blog/open-shelves"
}
}
]
},
});
console.log(response);{
"groupId": "grp_7d2e5b1a9c4f4a68b3e07f1c2d9a6e45",
"data": [
{
"id": "pst_3c8a2d6e91b44f7a8e250d6b4c1f9a73",
"groupId": "grp_7d2e5b1a9c4f4a68b3e07f1c2d9a6e45",
"accountId": "acc_YOUR_PINTEREST_ACCOUNT_ID",
"platform": "pinterest",
"source": "onepostly",
"status": "publishing",
"text": "Ten ways to style open shelves in a small kitchen.",
"mediaKind": "image",
"media": [
{
"url": "https://cdn.onepostly.com/media/kitchen-shelves.jpg"
}
],
"thread": [],
"scheduledFor": null,
"timezone": null,
"options": {
"pinterest": {
"boardId": "1035968376946032411",
"title": "Open Shelf Styling Ideas",
"link": "https://example.com/blog/open-shelves"
}
},
"platformPostId": null,
"url": null,
"error": null,
"publishedAt": null,
"metrics": null,
"createdAt": "2027-03-15T09:00:00.000Z",
"updatedAt": "2027-03-15T09:00:00.000Z"
}
]
}Once published, platformPostId is the pin id and url its pin link.
Post Types
mediaKind | Publishes | Media |
|---|---|---|
image | Image pin | 1 image |
video | Video pin | 1 video, up to 64 MB |
Other kinds, or more than 1 file, return 400 VALIDATION_ERROR.
A video pin is published once Pinterest processes it, so it takes longer. coverImageUrl sets its cover, and without it the first frame is the cover.
Boards
List Pinterest Boards returns up to 2,500 boards.
import { Configuration, AccountsApi } from "@onepostly/sdk";
const accountsApi = new AccountsApi(
new Configuration({ accessToken: process.env.ONEPOSTLY_API_KEY })
);
const response = await accountsApi.listAccountBoards({
id: "acc_YOUR_PINTEREST_ACCOUNT_ID",
});
console.log(response);{
"data": [
{
"id": "1035968376946032411",
"name": "Recipes",
"isDefault": true
},
{
"id": "1035968376946032398",
"name": "Kitchen Ideas",
"isDefault": false
},
{
"id": "1035968376946032405",
"name": "Meal Prep",
"isDefault": false
}
]
}isDefault marks a suggested board. Pins only go there if you pass its id.
Create Pinterest Board takes a name up to 180 characters and a description up to 500. The new id works as boardId right away.
Options
Options go under pinterest. Another platform's options there return 400.
Prop
Type
text and description each stop at 800, so one cannot extend the other.
Destination Link
link must be a full https:// URL. http:// and short links return 400. Short links include bit.ly, t.co and tinyurl.com. Use the final URL.
Media Requirements
These are Pinterest's limits, on top of the Media URL Requirements.
| Media | Formats | Max size |
|---|---|---|
| Images | JPEG, PNG, GIF and WebP | 20 MB |
| Videos | MP4, MOV and M4V | 64 MB |
A file outside these formats and sizes is refused. See Platform Limits.
Images
| Property | Requirement |
|---|---|
| Recommended | 1000 × 1500 (2:3) |
Videos
| Property | Requirement |
|---|---|
| Min duration | 4 seconds |
A video URL must send a Content-Length header. Uploaded files always do.
Scheduling, Editing and Deleting
Scheduling and editing work as usual. Published pins return NOT_EDITABLE. Deleting removes the pin. One already gone counts as deleted.
Engagement
Comments, likes, reposts and bookmarks return UNSUPPORTED_PLATFORM.
Inbox
Pinterest has no inbox through Onepostly.
Analytics
Pinterest reports no metrics here. A pin reads pending first, then unsupported for good. Account stats, insights, pin lists and sync return UNSUPPORTED_PLATFORM, so skip those calls for Pinterest.
Limitations
Not available for Pinterest through Onepostly.
- Carousel pins
- Text-only pins
- Editing a published pin
- Analytics and account stats
- Listing or syncing outside pins
- Comments, likes and messages
Errors
Breaking a rule above returns 400 VALIDATION_ERROR and creates nothing.
Every code is in Errors.
Publish Errors
| Code | Cause | Fix |
|---|---|---|
INVALID_MEDIA | An empty file, or not the size its Content-Length says | Fix the file |
MEDIA_UNFETCHABLE | No download, or no Content-Length | Upload the file instead |
MEDIA_UPLOAD_FAILED | Pinterest could not take the video | Check it plays, then post again |
PUBLISH_FAILED | Unknown board, or an image that failed | Read error.message |
PERMISSION_DENIED | Pinterest refused the action | Reconnect, or use your own board |
NOT_EDITABLE | An edit after publish | Delete and pin again |
Board Errors
| Code | Cause | Fix |
|---|---|---|
UNSUPPORTED_PLATFORM | Not a Pinterest account | Use a Pinterest account |
FORBIDDEN | A read_only key creating a board | Use a read_write key |
BOARDS_FAILED | Boards did not load | Try again, then reconnect |
BOARD_CREATE_FAILED | Pinterest refused the board | Read the message |
TikTok
Connect a TikTok account, publish videos and photo posts with privacy and disclosure settings, and read post metrics and account stats.
Bluesky
Connect a Bluesky account with an App Password, publish posts, threads, replies and quotes, work with replies, likes, reposts, bookmarks and direct messages, and read post metrics.