productivity
Pinterest CLI for AI Agents
Use the Pinterest CLI from KosmoKrator to call Pinterest tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Pinterest CLI Setup
Pinterest can be configured headlessly with `kosmokrator integrations:configure pinterest`.
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash
# Configure and verify this integration.
kosmokrator integrations:configure pinterest --set access_token="$PINTEREST_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor pinterest --json
kosmokrator integrations:status --json Credentials
Authentication type: Manual OAuth token oauth2_manual_token. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
access_token | PINTEREST_ACCESS_TOKEN | Secret secret | yes | Access Token |
url | PINTEREST_URL | URL url | no | API Base URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call pinterest.pinterest_create_pin '{"boardId":"example_boardId","title":"example_title","description":"example_description","mediaSource":"example_mediaSource","imageUrl":"example_imageUrl","link":"example_link"}' --json kosmo integrations:pinterest pinterest_create_pin '{"boardId":"example_boardId","title":"example_title","description":"example_description","mediaSource":"example_mediaSource","imageUrl":"example_imageUrl","link":"example_link"}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs pinterest --json
kosmo integrations:docs pinterest.pinterest_create_pin --json
kosmo integrations:schema pinterest.pinterest_create_pin --json
kosmo integrations:search "Pinterest" --json
kosmo integrations:list --json Automation Contexts
The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.
CLI Functions
Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.
pinterest.pinterest_create_pin
Create a new pin on a Pinterest board. Provide the board ID, title, description, and image URL. Optionally include a destination link.
write - Parameters
- boardId, title, description, mediaSource, imageUrl, link
kosmo integrations:call pinterest.pinterest_create_pin '{"boardId":"example_boardId","title":"example_title","description":"example_description","mediaSource":"example_mediaSource","imageUrl":"example_imageUrl","link":"example_link"}' --json kosmo integrations:pinterest pinterest_create_pin '{"boardId":"example_boardId","title":"example_title","description":"example_description","mediaSource":"example_mediaSource","imageUrl":"example_imageUrl","link":"example_link"}' --json pinterest.pinterest_get_board
Get details of a specific Pinterest board by its ID. Returns the board name, description, pin count, and privacy settings.
read - Parameters
- boardId
kosmo integrations:call pinterest.pinterest_get_board '{"boardId":"example_boardId"}' --json kosmo integrations:pinterest pinterest_get_board '{"boardId":"example_boardId"}' --json pinterest.pinterest_get_current_user
Get the currently authenticated Pinterest user profile. Returns the username, account type, and profile image.
read - Parameters
- none
kosmo integrations:call pinterest.pinterest_get_current_user '{}' --json kosmo integrations:pinterest pinterest_get_current_user '{}' --json pinterest.pinterest_get_pin
Get details of a specific Pinterest pin by its ID. Returns the pin title, description, image, board, and link.
read - Parameters
- pinId
kosmo integrations:call pinterest.pinterest_get_pin '{"pinId":"example_pinId"}' --json kosmo integrations:pinterest pinterest_get_pin '{"pinId":"example_pinId"}' --json pinterest.pinterest_list_boards
List boards for the authenticated Pinterest user. Supports pagination with bookmark cursor and page size. Returns board IDs, names, descriptions, and pin counts.
read - Parameters
- bookmark, pageSize
kosmo integrations:call pinterest.pinterest_list_boards '{"bookmark":"example_bookmark","pageSize":1}' --json kosmo integrations:pinterest pinterest_list_boards '{"bookmark":"example_bookmark","pageSize":1}' --json pinterest.pinterest_list_campaigns
List ad campaigns for a Pinterest ad account. Requires an ad account ID. Supports pagination with bookmark cursor and page size.
read - Parameters
- adAccountId, bookmark, pageSize
kosmo integrations:call pinterest.pinterest_list_campaigns '{"adAccountId":"example_adAccountId","bookmark":"example_bookmark","pageSize":1}' --json kosmo integrations:pinterest pinterest_list_campaigns '{"adAccountId":"example_adAccountId","bookmark":"example_bookmark","pageSize":1}' --json pinterest.pinterest_list_pins
List pins for the authenticated Pinterest user. Supports pagination with bookmark cursor and page size. Returns pin IDs, titles, descriptions, and media.
read - Parameters
- bookmark, pageSize
kosmo integrations:call pinterest.pinterest_list_pins '{"bookmark":"example_bookmark","pageSize":1}' --json kosmo integrations:pinterest pinterest_list_pins '{"bookmark":"example_bookmark","pageSize":1}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
pinterest.pinterest_create_pin 6 parameters
kosmo integrations:schema pinterest.pinterest_create_pin --json | Parameter | Type | Required | Description |
|---|---|---|---|
boardId | string | yes | The board ID to pin to. |
title | string | yes | The title of the pin. |
description | string | yes | The description of the pin. |
mediaSource | string | no | The media source type (default: "image_url"). |
imageUrl | string | yes | The URL of the image to pin. |
link | string | no | Optional destination link URL for the pin. |
pinterest.pinterest_get_board 1 parameters
kosmo integrations:schema pinterest.pinterest_get_board --json | Parameter | Type | Required | Description |
|---|---|---|---|
boardId | string | yes | The board ID to retrieve. |
pinterest.pinterest_get_current_user 0 parameters
kosmo integrations:schema pinterest.pinterest_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pinterest.pinterest_get_pin 1 parameters
kosmo integrations:schema pinterest.pinterest_get_pin --json | Parameter | Type | Required | Description |
|---|---|---|---|
pinId | string | yes | The pin ID to retrieve. |
pinterest.pinterest_list_boards 2 parameters
kosmo integrations:schema pinterest.pinterest_list_boards --json | Parameter | Type | Required | Description |
|---|---|---|---|
bookmark | string | no | Pagination cursor from a previous response. |
pageSize | integer | no | Number of boards to return per page (max 250). |
pinterest.pinterest_list_campaigns 3 parameters
kosmo integrations:schema pinterest.pinterest_list_campaigns --json | Parameter | Type | Required | Description |
|---|---|---|---|
adAccountId | string | yes | The ad account ID to list campaigns for. |
bookmark | string | no | Pagination cursor from a previous response. |
pageSize | integer | no | Number of campaigns to return per page. |
pinterest.pinterest_list_pins 2 parameters
kosmo integrations:schema pinterest.pinterest_list_pins --json | Parameter | Type | Required | Description |
|---|---|---|---|
bookmark | string | no | Pagination cursor from a previous response. |
pageSize | integer | no | Number of pins to return per page (max 250). |
Permissions
Headless calls still follow the integration read/write permission policy. Configure read/write defaults with
integrations:configure. Add --force only for trusted automation that should bypass that policy.