{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/postproxy-dev/json-schema/postproxy-dev-placement-schema.json",
  "title": "Placement",
  "description": "Account-wide placement record (Facebook Page, LinkedIn organization, Pinterest board, Telegram channel, Google Business location). One record exists per account, platform, and platform ID, even when several connected profiles can see it; exactly one linked profile is the active profile that posting and webhooks route through.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/postproxy-dev-placements-api-openapi.yml#/components/schemas/Placement",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Placement ID. Postproxy's own ID, used in placement URLs — not the platform ID."
    },
    "platform": {
      "type": "string",
      "description": "Platform the placement belongs to.",
      "enum": [
        "facebook",
        "linkedin",
        "pinterest",
        "telegram",
        "google_business"
      ]
    },
    "external_id": {
      "type": "string",
      "description": "Platform-specific ID — the value used as page_id / chat_id when creating posts, and returned as id by the per-profile List placements endpoint."
    },
    "name": {
      "type": "string",
      "description": "Placement name."
    },
    "avatar_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Stable Postproxy storage URL of the placement's picture, resized to 256x256 (Facebook Pages). null until it has been mirrored and for networks without one."
    },
    "status": {
      "type": "string",
      "description": "active (the active profile is connected), orphaned (the active profile is disconnected — posting is paused until you switch to a connected profile), or removed (access was revoked on the platform).",
      "enum": [
        "active",
        "orphaned",
        "removed"
      ]
    },
    "active_profile": {
      "$ref": "#/$defs/PlacementProfileRef",
      "description": "The profile posting routes through."
    },
    "linked_profiles": {
      "type": "array",
      "description": "Every profile that can see this placement — the candidates for Set active profile.",
      "items": {
        "$ref": "#/$defs/PlacementProfileRef"
      }
    }
  },
  "$defs": {
    "PlacementProfileRef": {
      "type": "object",
      "description": "Compact profile reference on a placement.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Profile ID."
        },
        "name": {
          "type": "string",
          "description": "Profile display name."
        },
        "connected": {
          "type": "boolean",
          "description": "Whether the profile is currently connected."
        }
      }
    }
  }
}