{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pinbridge-io/json-schema/pinbridge-io-pin-create-schema.json",
  "title": "PinCreate",
  "description": "Request schema for creating a pin.",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pinbridge-io-openapi.json#/components/schemas/PinCreate",
  "properties": {
    "account_id": {
      "type": "string",
      "format": "uuid",
      "title": "Account Id",
      "description": "Pinterest account ID to publish with"
    },
    "board_id": {
      "type": "string",
      "title": "Board Id",
      "description": "Pinterest board ID"
    },
    "title": {
      "type": "string",
      "maxLength": 100,
      "title": "Title",
      "description": "Pin title"
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 800
        },
        {
          "type": "null"
        }
      ],
      "title": "Description",
      "description": "Pin description"
    },
    "alt_text": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ],
      "title": "Alt Text",
      "description": "Alternative text used for accessibility"
    },
    "dominant_color": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Dominant Color",
      "description": "Dominant hex color of the pin media (for example #6E7874)"
    },
    "cover_image_url": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2083,
          "minLength": 1,
          "format": "uri"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cover Image Url",
      "description": "Optional public cover image URL for video pins"
    },
    "cover_image_asset_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cover Image Asset Id",
      "description": "Optional uploaded image asset ID used as a video cover image"
    },
    "link_url": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2083,
          "minLength": 1,
          "format": "uri"
        },
        {
          "type": "null"
        }
      ],
      "title": "Link Url",
      "description": "Destination URL for the pin: the website the idea comes from. A link to a pin already on Pinterest (pinterest.com/pin/...) is refused with pinterest_pin_link"
    },
    "image_url": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2083,
          "minLength": 1,
          "format": "uri"
        },
        {
          "type": "null"
        }
      ],
      "title": "Image Url",
      "description": "Public URL of the image to pin"
    },
    "asset_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Asset Id",
      "description": "Uploaded PinBridge asset ID to use for the pin image or video"
    },
    "idempotency_key": {
      "type": "string",
      "maxLength": 255,
      "title": "Idempotency Key",
      "description": "Idempotency key to prevent duplicate pins"
    },
    "template_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Template Id",
      "description": "The pin template the image is drawn with: a gallery template or one of this workspace's. With template_inputs, PinBridge draws the image from it. Without, it is only recorded and the image comes from image_url or asset_id"
    },
    "template_version": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Template Version",
      "description": "Version of template_id the image is drawn with; defaults to its current version"
    },
    "template_inputs": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Template Inputs",
      "description": "Values for the template's inputs, by input name. PinBridge draws the image from template_id with them, at the size the template was built at, and publishes it, so leave image_url and asset_id out. A photo input takes an image URL, {\"src\": url, \"focus\": [x, y], \"zoom\": 1 to 3, \"flip\": true}, or {\"asset_id\": id} with the same options. GET /v1/templates/{id} lists the inputs and their limits"
    }
  },
  "type": "object",
  "required": [
    "account_id",
    "board_id",
    "title",
    "idempotency_key"
  ]
}