{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/reddit/json-schema/reddit-components-schema-asset-library-new-creative-asset-schema.json",
  "title": "NewCreativeAsset",
  "description": "A new creative asset to be saved in asset library.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/reddit-creative-assets-api-openapi.yml#/components/schemas/components_schema_asset_library_new_creative_asset",
  "type": "object",
  "additionalProperties": true,
  "oneOf": [
    {
      "$ref": "#/$defs/components_schema_asset_library_new_image_asset"
    },
    {
      "$ref": "#/$defs/components_schema_asset_library_new_video_asset"
    },
    {
      "$ref": "#/$defs/components_schema_asset_library_new_headline_asset"
    },
    {
      "$ref": "#/$defs/components_schema_asset_library_new_cta_asset"
    }
  ],
  "$defs": {
    "components_enums_non_null_call_to_action": {
      "type": "string",
      "description": "The call to action text.",
      "enum": [
        "Apply Now",
        "Contact Us",
        "Download",
        "Get a Quote",
        "Get Showtimes",
        "Install",
        "Learn More",
        "Order Now",
        "Play Now",
        "Pre-order Now",
        "See Menu",
        "Shop Now",
        "Sign Up",
        "View More",
        "Watch Now",
        "Book Now",
        "Buy Tickets",
        "Get Directions",
        "Listen Now",
        "Read More",
        "Subscribe",
        "Visit Store",
        "Donate Now",
        "Remind Me"
      ]
    },
    "components_schema_asset_library_new_cta_asset": {
      "title": "NewCtaAsset",
      "type": "object",
      "description": "A Call to Action asset to be saved in asset library.",
      "additionalProperties": true,
      "required": [
        "type",
        "call_to_action"
      ],
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of the asset.",
          "const": "CTA"
        },
        "call_to_action": {
          "$ref": "#/$defs/components_enums_non_null_call_to_action"
        },
        "reference_id": {
          "type": "string",
          "description": "A caller-defined identifier used to correlate the asset upload with its result."
        }
      }
    },
    "components_schema_asset_library_new_headline_asset": {
      "title": "NewHeadlineAsset",
      "type": "object",
      "description": "A headline asset to be saved in asset library.",
      "additionalProperties": true,
      "required": [
        "type",
        "text"
      ],
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of the asset.",
          "const": "HEADLINE"
        },
        "text": {
          "type": "string",
          "description": "The headline text."
        },
        "reference_id": {
          "type": "string",
          "description": "A caller-defined identifier used to correlate the asset upload with its result."
        }
      }
    },
    "components_schema_asset_library_new_image_asset": {
      "type": "object",
      "title": "NewImageAsset",
      "description": "An image asset to be saved in asset library.",
      "additionalProperties": true,
      "properties": {
        "reference_id": {
          "type": "string",
          "description": "Client reference ID for the asset. This is returned in the response along with the asset or failure status."
        },
        "name": {
          "type": "string",
          "description": "The asset name."
        },
        "type": {
          "type": "string",
          "description": "The type of the asset.",
          "const": "IMAGE"
        },
        "media": {
          "$ref": "#/$defs/components_schema_post_creative_assets_media_creative_asset_types_media_url"
        }
      },
      "required": [
        "type",
        "name",
        "media"
      ]
    },
    "components_schema_asset_library_new_video_asset": {
      "title": "NewVideoAsset",
      "type": "object",
      "description": "A video asset to be saved in asset library.",
      "additionalProperties": true,
      "properties": {
        "reference_id": {
          "type": "string",
          "description": "Client reference ID for the asset. This is returned in the response along with the asset or failure status."
        },
        "name": {
          "type": "string",
          "description": "The asset name."
        },
        "type": {
          "type": "string",
          "description": "The type of the asset.",
          "const": "VIDEO"
        },
        "media": {
          "$ref": "#/$defs/components_schema_post_creative_assets_media_creative_asset_types_media_url"
        },
        "poster": {
          "$ref": "#/$defs/components_schema_post_creative_assets_media_creative_asset_types_media_url"
        }
      },
      "required": [
        "type",
        "name",
        "media",
        "poster"
      ]
    },
    "components_schema_post_creative_assets_media_creative_asset_types_media_url": {
      "title": "MediaUrl",
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "url": {
          "type": "string",
          "description": "The media's URL. During creation, this will be used to download the media before being set to the Reddit-hosted media URL."
        },
        "type": {
          "type": "string",
          "description": "The type of field to retrieve the media from.",
          "const": "URL"
        }
      },
      "required": [
        "url",
        "type"
      ]
    }
  }
}