{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sprkly-app/json-schema/sprkly-app-post-schema.json",
  "title": "Post",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sprkly-app-openapi.yml#/components/schemas/Post",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "pending_approval",
        "scheduled",
        "posted",
        "failed"
      ],
      "description": "A post that is going out right now still reads scheduled. Some older posts read published, which means posted."
    },
    "caption": {
      "type": [
        "string",
        "null"
      ]
    },
    "platforms": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "profileIds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "mediaUrls": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "scheduledTime": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "publishedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "failedReason": {
      "type": [
        "string",
        "null"
      ]
    },
    "externalId": {
      "type": [
        "string",
        "null"
      ]
    },
    "permalink": {
      "type": [
        "string",
        "null"
      ]
    },
    "platformMeta": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": true
    },
    "createdAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "updatedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "deleted": {
      "type": "boolean",
      "description": "True when the post is in the Bin. It will not go out. status keeps the value it had."
    },
    "deletedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the post moved to the Bin. Null when it is not deleted."
    }
  }
}