{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sprkly-app/json-schema/sprkly-app-update-post-response-schema.json",
  "title": "UpdatePostResponse",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sprkly-app-openapi.yml#/components/schemas/UpdatePostResponse",
  "allOf": [
    {
      "$ref": "#/$defs/Post"
    },
    {
      "type": "object",
      "properties": {
        "additionalPostIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "New posts made when the edit added accounts."
        },
        "approvalId": {
          "type": "string",
          "description": "Set when the owner had approved the post: the edit sent it back for approval."
        }
      }
    }
  ],
  "$defs": {
    "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."
        }
      }
    }
  }
}