KosmoKrator

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, configure, and verify
# 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.

KeyEnv varTypeRequiredLabel
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.

Generic CLI call
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
Provider shortcut
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.

Discovery commands
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 write
Parameters
boardId, title, description, mediaSource, imageUrl, link
Generic call
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
Shortcut
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 read
Parameters
boardId
Generic call
kosmo integrations:call pinterest.pinterest_get_board '{"boardId":"example_boardId"}' --json
Shortcut
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 read
Parameters
none
Generic call
kosmo integrations:call pinterest.pinterest_get_current_user '{}' --json
Shortcut
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 read
Parameters
pinId
Generic call
kosmo integrations:call pinterest.pinterest_get_pin '{"pinId":"example_pinId"}' --json
Shortcut
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 read
Parameters
bookmark, pageSize
Generic call
kosmo integrations:call pinterest.pinterest_list_boards '{"bookmark":"example_bookmark","pageSize":1}' --json
Shortcut
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 read
Parameters
adAccountId, bookmark, pageSize
Generic call
kosmo integrations:call pinterest.pinterest_list_campaigns '{"adAccountId":"example_adAccountId","bookmark":"example_bookmark","pageSize":1}' --json
Shortcut
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 read
Parameters
bookmark, pageSize
Generic call
kosmo integrations:call pinterest.pinterest_list_pins '{"bookmark":"example_bookmark","pageSize":1}' --json
Shortcut
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
Schema command
kosmo integrations:schema pinterest.pinterest_create_pin --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema pinterest.pinterest_get_board --json
ParameterTypeRequiredDescription
boardId string yes The board ID to retrieve.
pinterest.pinterest_get_current_user 0 parameters
Schema command
kosmo integrations:schema pinterest.pinterest_get_current_user --json
ParameterTypeRequiredDescription
No parameters.
pinterest.pinterest_get_pin 1 parameters
Schema command
kosmo integrations:schema pinterest.pinterest_get_pin --json
ParameterTypeRequiredDescription
pinId string yes The pin ID to retrieve.
pinterest.pinterest_list_boards 2 parameters
Schema command
kosmo integrations:schema pinterest.pinterest_list_boards --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema pinterest.pinterest_list_campaigns --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema pinterest.pinterest_list_pins --json
ParameterTypeRequiredDescription
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.