{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/socialync-io/json-schema/socialync-io-draft-schema.json",
  "title": "Draft",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/socialync-io-openapi.json#/components/schemas/Draft",
  "type": "object",
  "required": [
    "id",
    "status"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "description": "pending, approved, rejected, expired or published."
    },
    "type": {
      "type": "string",
      "enum": [
        "post_now",
        "scheduled"
      ]
    },
    "payload": {
      "type": "object",
      "additionalProperties": true
    },
    "createdAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "expiresAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "A draft nobody approves expires 24 hours after it is created."
    },
    "approvedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "publishedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "result": {
      "description": "Per platform results once published."
    }
  },
  "additionalProperties": true
}