{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/socialbu-com/json-schema/socialbu-com-facebook-post-request-schema.json",
  "title": "FacebookPostRequest",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/socialbu-com-openapi-openapi.yml#/components/schemas/FacebookPostRequest",
  "allOf": [
    {
      "$ref": "#/$defs/GenericPostRequest"
    },
    {
      "type": "object",
      "properties": {
        "options": {
          "type": "object",
          "description": "Additional options for the post.",
          "properties": {
            "comment": {
              "type": "string",
              "description": "First comment for the post"
            },
            "post_as_story": {
              "type": "boolean",
              "description": "Set true to post the content as a story. Supported for posts having media attachment(s)"
            },
            "post_as_reel": {
              "type": "boolean",
              "description": "Set true to post the content as a reel. Supported for video posts only"
            },
            "video_title": {
              "type": "string",
              "description": "Title for video attachment"
            },
            "media_alt_text": {
              "type": "array",
              "description": "Alternate text descriptions for each media item in the post.",
              "items": {
                "type": "string"
              }
            },
            "thumbnail": {
              "type": "object",
              "description": "Add thumbnail (video post only)",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "File name (e.g., \"image.png\")."
                },
                "mimeType": {
                  "type": "string",
                  "description": "MIME type of the media (e.g., \"image/png\")."
                },
                "extension": {
                  "type": "string",
                  "description": "File extension (e.g., png, mp4)."
                },
                "key": {
                  "type": "string",
                  "description": "Media key, received when uploading media using media upload endpoint."
                },
                "url": {
                  "type": "string",
                  "description": "Media URL, received when uploading media using media upload endpoint."
                },
                "secureKey": {
                  "type": "string",
                  "description": "Media secure key, received when uploading media using media upload endpoint."
                },
                "temporary": {
                  "type": "boolean",
                  "description": "Media status, received when uploading media using media upload endpoint."
                },
                "_metaData": {
                  "type": "object",
                  "description": "Information about media.",
                  "properties": {
                    "width": {
                      "type": "integer",
                      "description": "Width of the media."
                    },
                    "height": {
                      "type": "integer",
                      "description": "Height of the media."
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  ],
  "$defs": {
    "GenericPostRequest": {
      "type": "object",
      "required": [
        "accounts",
        "publish_at"
      ],
      "properties": {
        "accounts": {
          "type": "array",
          "description": "ID(s) of one or more social media accounts.",
          "items": {
            "type": "integer"
          }
        },
        "team_id": {
          "type": "integer",
          "description": "Team Id of social media account."
        },
        "publish_at": {
          "type": "string",
          "description": "Format should be Y-m-d H:i:s (UTC)"
        },
        "content": {
          "type": "string",
          "description": "The content for the post."
        },
        "draft": {
          "type": "boolean",
          "description": "Save the post as a draft"
        },
        "queue_ids": {
          "type": "array",
          "description": "If provided, the post will be added to the specified queues.",
          "items": {
            "type": "integer"
          }
        },
        "existing_attachments": {
          "type": "array",
          "description": "Attachments already uploaded to SocialBu's storage using media upload endpoint.",
          "items": {
            "type": "object",
            "properties": {
              "upload_token": {
                "type": "string",
                "description": "The value received from /upload_media/status endpoint."
              }
            }
          }
        },
        "postback_url": {
          "type": "string",
          "description": "Receive postback at this URL if needed. Sends a JSON POST request with parameters `post_id`, `account_id`, and `status` (created, published, failed)."
        }
      }
    }
  }
}