{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/postzen-dev/json-schema/postzen-dev-pinterest-select-board-response-schema.json",
  "title": "PinterestSelectBoardResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/postzen-dev-connect-api-openapi.yml#/components/schemas/PinterestSelectBoardResponse",
  "type": "object",
  "required": [
    "message",
    "account"
  ],
  "properties": {
    "message": {
      "type": "string",
      "const": "Pinterest connected successfully with default board"
    },
    "account": {
      "$ref": "#/$defs/Account"
    },
    "redirectUrl": {
      "type": "string",
      "format": "uri"
    }
  },
  "$defs": {
    "Account": {
      "type": "object",
      "required": [
        "_id",
        "platform",
        "providerAccountId",
        "profileId",
        "username",
        "displayName",
        "status",
        "isActive",
        "connectedAt"
      ],
      "properties": {
        "_id": {
          "type": "string"
        },
        "platform": {
          "$ref": "#/$defs/PublicPlatformOutput"
        },
        "providerAccountId": {
          "type": "string"
        },
        "profileId": {
          "$ref": "#/$defs/AccountProfileSummary"
        },
        "username": {
          "type": "string"
        },
        "displayName": {
          "type": "string"
        },
        "profileUrl": {
          "type": "string",
          "format": "uri"
        },
        "avatarUrl": {
          "type": "string",
          "format": "uri"
        },
        "status": {
          "type": "string",
          "enum": [
            "connected",
            "needsReauth",
            "disconnected",
            "disabled"
          ]
        },
        "isActive": {
          "type": "boolean"
        },
        "connectedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastSyncedAt": {
          "type": "string",
          "format": "date-time"
        },
        "defaultBoardId": {
          "type": "string",
          "description": "Default Pinterest board id. Present only when one has been selected for a Pinterest account."
        },
        "defaultBoardName": {
          "type": "string",
          "description": "Default Pinterest board name. Present when Pinterest returned a name for the selected default board."
        }
      }
    },
    "AccountProfileSummary": {
      "type": "object",
      "required": [
        "_id",
        "name",
        "slug",
        "color"
      ],
      "properties": {
        "_id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "color": {
          "type": "string"
        }
      }
    },
    "PublicPlatformOutput": {
      "type": "string",
      "enum": [
        "twitter",
        "instagram",
        "tiktok",
        "linkedin",
        "facebook",
        "youtube",
        "threads",
        "pinterest",
        "bluesky",
        "telegram"
      ]
    }
  }
}