KosmoKrator

marketing

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.

7 functions 6 read 1 write Manual OAuth token auth

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 use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token PINTEREST_ACCESS_TOKEN Secret secret yes Access Token
url PINTEREST_URL URL url no API Base URL

Call Pinterest Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

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

Use the provider shortcut form for shorter human-facing commands.

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

Agent Discovery Commands

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

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Pinterest.

pinterest.pinterest_create_pin

Write write

Create a new pin on a Pinterest board. Provide the board ID, title, description, and image URL. Optionally include a destination link.

Parameters
boardId, title, description, mediaSource, imageUrl, link

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

pinterest.pinterest_get_board

Read read

Get details of a specific Pinterest board by its ID. Returns the board name, description, pin count, and privacy settings.

Parameters
boardId

Generic CLI call

kosmo integrations:call pinterest.pinterest_get_board '{"boardId":"example_boardId"}' --json

Provider shortcut

kosmo integrations:pinterest pinterest_get_board '{"boardId":"example_boardId"}' --json

pinterest.pinterest_get_current_user

Read read

Get the currently authenticated Pinterest user profile. Returns the username, account type, and profile image.

Parameters
none

Generic CLI call

kosmo integrations:call pinterest.pinterest_get_current_user '{}' --json

Provider shortcut

kosmo integrations:pinterest pinterest_get_current_user '{}' --json

pinterest.pinterest_get_pin

Read read

Get details of a specific Pinterest pin by its ID. Returns the pin title, description, image, board, and link.

Parameters
pinId

Generic CLI call

kosmo integrations:call pinterest.pinterest_get_pin '{"pinId":"example_pinId"}' --json

Provider shortcut

kosmo integrations:pinterest pinterest_get_pin '{"pinId":"example_pinId"}' --json

pinterest.pinterest_list_boards

Read read

List boards for the authenticated Pinterest user. Supports pagination with bookmark cursor and page size. Returns board IDs, names, descriptions, and pin counts.

Parameters
bookmark, pageSize

Generic CLI call

kosmo integrations:call pinterest.pinterest_list_boards '{"bookmark":"example_bookmark","pageSize":1}' --json

Provider shortcut

kosmo integrations:pinterest pinterest_list_boards '{"bookmark":"example_bookmark","pageSize":1}' --json

pinterest.pinterest_list_campaigns

Read read

List ad campaigns for a Pinterest ad account. Requires an ad account ID. Supports pagination with bookmark cursor and page size.

Parameters
adAccountId, bookmark, pageSize

Generic CLI call

kosmo integrations:call pinterest.pinterest_list_campaigns '{"adAccountId":"example_adAccountId","bookmark":"example_bookmark","pageSize":1}' --json

Provider shortcut

kosmo integrations:pinterest pinterest_list_campaigns '{"adAccountId":"example_adAccountId","bookmark":"example_bookmark","pageSize":1}' --json

pinterest.pinterest_list_pins

Read read

List pins for the authenticated Pinterest user. Supports pagination with bookmark cursor and page size. Returns pin IDs, titles, descriptions, and media.

Parameters
bookmark, pageSize

Generic CLI call

kosmo integrations:call pinterest.pinterest_list_pins '{"bookmark":"example_bookmark","pageSize":1}' --json

Provider 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

Create a new pin on a Pinterest board. Provide the board ID, title, description, and image URL. Optionally include a destination link.

Operation
Write write
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

Get details of a specific Pinterest board by its ID. Returns the board name, description, pin count, and privacy settings.

Operation
Read read
Schema command
kosmo integrations:schema pinterest.pinterest_get_board --json
ParameterTypeRequiredDescription
boardId string yes The board ID to retrieve.

pinterest.pinterest_get_current_user

Get the currently authenticated Pinterest user profile. Returns the username, account type, and profile image.

Operation
Read read
Schema command
kosmo integrations:schema pinterest.pinterest_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

pinterest.pinterest_get_pin

Get details of a specific Pinterest pin by its ID. Returns the pin title, description, image, board, and link.

Operation
Read read
Schema command
kosmo integrations:schema pinterest.pinterest_get_pin --json
ParameterTypeRequiredDescription
pinId string yes The pin ID to retrieve.

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.

Operation
Read read
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

List ad campaigns for a Pinterest ad account. Requires an ad account ID. Supports pagination with bookmark cursor and page size.

Operation
Read read
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

List pins for the authenticated Pinterest user. Supports pagination with bookmark cursor and page size. Returns pin IDs, titles, descriptions, and media.

Operation
Read read
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.