Pinterest icon

Pinterest

Interact with Pinterest API using pinterest-js-client

Pin → Create

AI-generated

Summary

Create a new pin on Pinterest by uploading an image from a URL or a local file path with optional metadata such as title, description, link, board name, and alternative text.

Inputs

  • Image Source (required) — Choose whether the image to be pinned is provided by a URL or a local file path.
  • Image URL (required) — The URL of the image to pin; required if 'Image Source' is set to URL.
  • Image File Path (required) — Local filesystem path to the image file to pin; required if 'Image Source' is set to File Path.
  • Title (required) — The title of the pin.
  • Board Name — Optional name of the Pinterest board where the pin will be added.
  • Description — Optional description text for the pin.
  • Link — Optional destination URL associated with the pin.
  • Alt Text — Optional alternative text for the image, describing it for accessibility.
  • Slowmo (Ms) — Slows down browser actions by specified milliseconds for more human-like behavior; defaults to 0 (fast).
  • Timeout (Ms) — Maximum time in milliseconds to wait for browser operations; default is 30000 ms.
  • Viewport Width — Browser viewport width in pixels; defaults to 1920.
  • Viewport Height — Browser viewport height in pixels; defaults to 1080.

Output shape

a single JSON object

The output includes the new pin's URL under the field 'pinUrl' and a success message. If creation fails, an error is thrown.

Examples

Example 1: Create a pin from an image URL

Set Image Source to URL, provide the Image URL and Title, optionally set Board Name and Description, then execute.

Example 2: Create a pin from a local image file

Set Image Source to File Path, provide the Image File Path and Title, optionally set other metadata, then execute.

Discussion