{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/seenpaid-com/json-schema/seenpaid-com-post-schema.json",
  "title": "Post",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/seenpaid-com-openapi.json#/components/schemas/Post",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "orgId": {
      "type": "string",
      "format": "uuid"
    },
    "caption": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "scheduled",
        "publishing",
        "published",
        "failed",
        "canceled"
      ]
    },
    "scheduledFor": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "mediaIds": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      }
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "targets": {
      "type": "array",
      "description": "One per social account this post targets, with the per-platform publish result once attempted.",
      "items": {
        "type": "object",
        "properties": {
          "socialAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "platform": {
            "$ref": "#/$defs/Platform"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "published",
              "failed"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    }
  },
  "$defs": {
    "Platform": {
      "type": "string",
      "enum": [
        "x",
        "bluesky",
        "linkedin",
        "instagram",
        "facebook",
        "tiktok",
        "discord",
        "telegram",
        "mastodon",
        "nostr",
        "devto",
        "hashnode",
        "medium",
        "reddit",
        "threads",
        "tumblr",
        "pinterest",
        "vk",
        "slack",
        "wordpress",
        "ghost",
        "lemmy",
        "webhook",
        "microblog",
        "matrix"
      ]
    }
  }
}