> ## Documentation Index
> Fetch the complete documentation index at: https://creatorinsights.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Pinterest Pin

Creates an image or video Pin on a selected Pinterest board with a destination link and title. Select the intended workspace with list\_workspaces and get\_workspace\_publishing\_options first. When adapting content, read get\_workspace\_context for the relevant platforms before preparing the caption. Reuse that workspace ID for publishing; the result identifies the resolved workspace.

Included at zero credits with an active paid plan.

> [!NOTE]
>
> Examples use illustrative values. The playground sends a real request. Intelligence can consume plan credits. Publishing examples save drafts.

## Endpoint

**POST** `https://api.creatorinsights.in/v1/pinterest/publish`

**Content type:** application/json

**Authentication:** `x-api-key: YOUR_SAVED_API_KEY`

**MCP tool:** `publish_pinterest_pin`. See [MCP Setup](https://creatorinsights.mintlify.site/mcp-setup.md) for AI clients.

For paid MCP calls in an organization with multiple workspaces, pass the intended `workspace` ID. Calls without it are rejected before execution.

Call [List workspaces](https://creatorinsights.mintlify.site/tools/list_workspaces.md) and confirm the workspace assigned to this connection. A bound connection cannot switch projects by changing this argument. Use [Workspace publishing options](https://creatorinsights.mintlify.site/tools/get_workspace_publishing_options.md) to select its connected account. When adapting content needs brand guidance, read [Workspace context](https://creatorinsights.mintlify.site/tools/get_workspace_context.md) for the relevant platforms. Pass the same canonical workspace ID for uploads, publishing and scheduling. Publishing responses include `workspace_id` and `workspace_name`. These additions require backend deployment.

## Request parameters

**x-workspace-id** `string`

Active workspace ID or current name in your organization. Optional header alternative to passing workspace in the body.

**board\_id** `string` *required*

Pinterest Board ID where the Pin will be saved (use get\_pinterest\_boards to find IDs)

**media\_url** `string` *required*

Public image (JPG/PNG) or video (MP4) URL for the Pin

**title** `string` *required*

Pin title (max 100 characters)

**description** `string`

Pin description (max 500 characters)

**link** `string`

Destination website URL when users click the Pin

**scheduled\_at** `string`

ISO 8601 datetime for scheduled publishing

**workspace** `string`

Owned workspace ID, current name, or immutable publishing key. Omit to use the credential's assigned workspace; a legacy unbound key uses the primary workspace. The browser selection is not inferred.

Workspace ID, current name, or immutable publishing key in the authenticated organization. Required for paid requests when more than one active workspace exists; pass an active workspace to select its accounts and data. Discover IDs with list\_workspaces; reuse the selected canonical ID throughout the workflow.

**account\_id** `string`

Account ID from list\_connected\_social\_accounts. Must belong to the target platform and workspace.

**is\_draft** `boolean` (default: true)

Save for review without publishing. The playground is preset to true so a trial request saves a draft.

**idempotency\_key** `string`

Unique request key. Reuse the same key and exact arguments when retrying to avoid duplicate posts.

## Request example

Send these arguments directly as the JSON body.

```json theme={null}
{
  "board_id": "507f1f77bcf86cd799439011",
  "media_url": "https://YOUR_PUBLIC_CDN.example/video.mp4",
  "title": "REPLACE_WITH_TITLE",
  "is_draft": true,
  "workspace": "YOUR_WORKSPACE_ID_OR_CURRENT_NAME",
  "account_id": "507f1f77bcf86cd799439012",
  "idempotency_key": "REPLACE_WITH_UNIQUE_REQUEST_KEY"
}
```

```bash cURL theme={null}
curl -X POST 'https://api.creatorinsights.in/v1/pinterest/publish' \
  -H "x-api-key: $CREATOR_INSIGHTS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{"board_id":"507f1f77bcf86cd799439011","media_url":"https://YOUR_PUBLIC_CDN.example/video.mp4","title":"REPLACE_WITH_TITLE","is_draft":true,"workspace":"YOUR_WORKSPACE_ID_OR_CURRENT_NAME","account_id":"507f1f77bcf86cd799439012","idempotency_key":"REPLACE_WITH_UNIQUE_REQUEST_KEY"}'
```

```javascript Node.js theme={null}
const response = await fetch('https://api.creatorinsights.in/v1/pinterest/publish', {
  method: 'POST',
  headers: { 'x-api-key': process.env.CREATOR_INSIGHTS_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
  "board_id": "507f1f77bcf86cd799439011",
  "media_url": "https://YOUR_PUBLIC_CDN.example/video.mp4",
  "title": "REPLACE_WITH_TITLE",
  "is_draft": true,
  "workspace": "YOUR_WORKSPACE_ID_OR_CURRENT_NAME",
  "account_id": "507f1f77bcf86cd799439012",
  "idempotency_key": "REPLACE_WITH_UNIQUE_REQUEST_KEY"
})
});
const raw = await response.text();
let result;
try { result = JSON.parse(raw); } catch { throw new Error('Non-JSON response: ' + response.status); }
if (!response.ok || result.success === false) throw new Error(result.message || result.error || 'Request failed');
console.log(result.data);
```

```python Python theme={null}
import json, os, requests

arguments = json.loads("{\"board_id\":\"507f1f77bcf86cd799439011\",\"media_url\":\"https://YOUR_PUBLIC_CDN.example/video.mp4\",\"title\":\"REPLACE_WITH_TITLE\",\"is_draft\":true,\"workspace\":\"YOUR_WORKSPACE_ID_OR_CURRENT_NAME\",\"account_id\":\"507f1f77bcf86cd799439012\",\"idempotency_key\":\"REPLACE_WITH_UNIQUE_REQUEST_KEY\"}")
response = requests.post("https://api.creatorinsights.in/v1/pinterest/publish",
    headers={"x-api-key": os.environ["CREATOR_INSIGHTS_API_KEY"]},
    json=arguments, timeout=120)
response.raise_for_status()
result = response.json()
print(result["data"])
```

## Response example

HTTP 200. Illustrative values; optional fields can be omitted, null, or empty. Additional platform fields may be returned.

```json Success theme={null}
{
  "success": true,
  "data": {
    "success": true,
    "post_id": "507f1f77bcf86cd799439011",
    "title": "Example draft",
    "workspace": "Default",
    "is_draft": true,
    "status": "draft",
    "platforms": [
      {
        "platform": "pinterest",
        "status": "draft",
        "scheduled_at": null,
        "post_link": null,
        "error": null
      }
    ],
    "message": "Draft saved."
  }
}
```

## Response fields

**success** `boolean` *required*

Whether this operation succeeded. Also check HTTP status and nested platform statuses.

**data** `object` *required*

Operation-specific payload. See the nested field table and response example below.

| Field | Type | Description |
| - | - | - |
| `success` | boolean | Example response field. Availability depends on the record and selected options. |
| `data` | object | Nested object. Expand the response schema for its fields. |
| `data.success` | boolean | Example response field. Availability depends on the record and selected options. |
| `data.post_id` | string | Example response field. Availability depends on the record and selected options. |
| `data.title` | string | Example response field. Availability depends on the record and selected options. |
| `data.workspace` | string | Example response field. Availability depends on the record and selected options. |
| `data.is_draft` | boolean | Example response field. Availability depends on the record and selected options. |
| `data.platforms` | array | List of returned entries; may be empty. |
| `data.platforms[].platform` | string | Example response field. Availability depends on the record and selected options. |
| `data.platforms[].status` | string | Stored platform status; accepted or queued does not mean posted. |
| `data.platforms[].post_link` | string or null | Example response field. Availability depends on the record and selected options. |
| `data.platforms[].scheduled_at` | string or null | Example response field. Availability depends on the record and selected options. |
| `data.platforms[].error` | string or null | Example response field. Availability depends on the record and selected options. |
| `data.platforms[].warnings` | array | List of returned entries; may be empty. |
| `data.status` | string | Example response field. Availability depends on the record and selected options. |
| `data.replayed` | boolean | Example response field. Availability depends on the record and selected options. |
| `data.message` | string | Example response field. Availability depends on the record and selected options. |

The interactive schema includes deeper nested fields. Sample fields are descriptive, not a promise that every record includes them.

## n8n and JSON tool endpoint

**POST** `https://api.creatorinsights.in/api/v1/tools/publish_pinterest_pin`. Use Header Auth with `x-api-key` and body content type JSON. This alias returns the n8n envelope below; included operations can report zero credits\_deducted.

```bash theme={null}
curl -X POST 'https://api.creatorinsights.in/api/v1/tools/publish_pinterest_pin' \
  -H "x-api-key: $CREATOR_INSIGHTS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{"board_id":"507f1f77bcf86cd799439011","media_url":"https://YOUR_PUBLIC_CDN.example/video.mp4","title":"REPLACE_WITH_TITLE","is_draft":true,"workspace":"YOUR_WORKSPACE_ID_OR_CURRENT_NAME","account_id":"507f1f77bcf86cd799439012","idempotency_key":"REPLACE_WITH_UNIQUE_REQUEST_KEY"}'
```

```json theme={null}
{
  "status": true,
  "tool": "publish_pinterest_pin",
  "credits_deducted": 0,
  "data": {
    "success": true,
    "post_id": "507f1f77bcf86cd799439011",
    "title": "Example draft",
    "workspace": "Default",
    "is_draft": true,
    "status": "draft",
    "platforms": [
      {
        "platform": "pinterest",
        "status": "draft",
        "scheduled_at": null,
        "post_link": null,
        "error": null
      }
    ],
    "message": "Draft saved."
  }
}
```

## Errors

Handle non-2xx responses before mapping data. Error codes vary with the cause; these are representative examples. A 429 response may be plain text. Never treat a queued post as published or blindly retry a partial publication.

```json theme={null}
{
  "success": false,
  "error": "UNAUTHORIZED",
  "message": "Missing or invalid API key"
}
```

| HTTP status | Meaning |
| - | - |
| 400 | Invalid arguments |
| 401 | Missing or invalid API key |
| 402 | Insufficient Creator Insights plan credits |
| 403 | Subscription or permission required |
| 404 | Resource not found |
| 409 | Conflicting request, idempotency key, or unfinished upload |
| 410 | Managed media expired; upload the file again |
| 413 | Media too large |
| 415 | Unsupported media type |
| 422 | Account selection, connection, or platform payload needs attention |
| 500 | Authentication or server error |
| 503 | Service temporarily unavailable or operation failed; inspect saved status before retrying |
| 429 | Rate limit; inspect response headers and retry later. |

## Publishing status

Select an owned account and exact workspace first. Draft examples use is\_draft:true. Publishing is asynchronous: poll list\_multiposts for each platform’s posted/failed status and public link. Use the same idempotency key only with identical retry arguments. [Workflow details](https://creatorinsights.mintlify.site/workflows.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.