{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/canva/json-schema/canva-get-design-resize-job-response-schema.json",
  "title": "GetDesignResizeJobResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/canva-resize-api-openapi.yml#/components/schemas/GetDesignResizeJobResponse",
  "properties": {
    "job": {
      "$ref": "#/$defs/DesignResizeJob"
    }
  },
  "required": [
    "job"
  ],
  "type": "object",
  "$defs": {
    "DesignLinks": {
      "description": "A temporary set of URLs for viewing or editing the design.",
      "properties": {
        "edit_url": {
          "description": "A temporary editing URL for the design. This URL is only accessible to the user that made the API request, and is designed to support [return navigation](https://www.canva.dev/docs/apps/rest-apis/return-navigation-guide/) workflows.\n\nNOTE: This is not a permanent URL, it is only valid for 30 days.",
          "type": "string"
        },
        "view_url": {
          "description": "A temporary viewing URL for the design. This URL is only accessible to the user that made the API request, and is designed to support [return navigation](https://www.canva.dev/docs/apps/rest-apis/return-navigation-guide/) workflows.\n\nNOTE: This is not a permanent URL, it is only valid for 30 days.\n",
          "type": "string"
        }
      },
      "required": [
        "edit_url",
        "view_url"
      ],
      "type": "object"
    },
    "DesignResizeError": {
      "description": "If the design resize job fails, this object provides details about the error.",
      "properties": {
        "code": {
          "$ref": "#/$defs/DesignResizeErrorCode"
        },
        "message": {
          "description": "A human-readable description of what went wrong.",
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "DesignResizeErrorCode": {
      "enum": [
        "thumbnail_generation_error",
        "design_resize_error",
        "create_design_error",
        "trial_quota_exceeded"
      ],
      "type": "string"
    },
    "DesignResizeJob": {
      "description": "Details about the design resize job.",
      "properties": {
        "id": {
          "description": "The design resize job ID.",
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/DesignResizeStatus"
        },
        "result": {
          "$ref": "#/$defs/DesignResizeJobResult"
        },
        "error": {
          "$ref": "#/$defs/DesignResizeError"
        }
      },
      "required": [
        "id",
        "status"
      ],
      "type": "object"
    },
    "DesignResizeJobResult": {
      "description": "Design has been created and saved to user's root\n([projects](https://www.canva.com/help/find-designs-and-folders/)) folder.",
      "properties": {
        "design": {
          "$ref": "#/$defs/DesignSummary"
        },
        "trial_information": {
          "$ref": "#/$defs/TrialInformation"
        }
      },
      "required": [
        "design"
      ],
      "type": "object"
    },
    "DesignResizeStatus": {
      "description": "Status of the design resize job.",
      "enum": [
        "in_progress",
        "success",
        "failed"
      ],
      "type": "string"
    },
    "DesignSummary": {
      "description": "Basic details about the design, such as the design's ID, title, and URL.",
      "properties": {
        "id": {
          "description": "The design ID.",
          "type": "string"
        },
        "title": {
          "description": "The design title.",
          "type": "string"
        },
        "url": {
          "description": "URL of the design.",
          "type": "string"
        },
        "thumbnail": {
          "$ref": "#/$defs/Thumbnail"
        },
        "urls": {
          "$ref": "#/$defs/DesignLinks"
        },
        "created_at": {
          "description": "When the design was created in Canva, as a Unix timestamp (in seconds since the Unix\nEpoch).",
          "format": "int64",
          "type": "integer"
        },
        "updated_at": {
          "description": "When the design was last updated in Canva, as a Unix timestamp (in seconds since the\nUnix Epoch).",
          "format": "int64",
          "type": "integer"
        },
        "page_count": {
          "description": "The total number of pages in the design. Some design types don't have pages (for example, Canva docs).",
          "format": "int32",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "created_at",
        "id",
        "updated_at",
        "urls"
      ],
      "type": "object"
    },
    "Thumbnail": {
      "description": "A thumbnail image representing the object.",
      "properties": {
        "width": {
          "description": "The width of the thumbnail image in pixels.",
          "format": "int32",
          "type": "integer"
        },
        "height": {
          "description": "The height of the thumbnail image in pixels.",
          "format": "int32",
          "type": "integer"
        },
        "url": {
          "description": "A URL for retrieving the thumbnail image.\nThis URL expires after 15 minutes. This URL includes a query string\nthat's required for retrieving the thumbnail.",
          "type": "string"
        }
      },
      "required": [
        "height",
        "url",
        "width"
      ],
      "type": "object"
    },
    "TrialInformation": {
      "description": "WARNING: Trials and trial information are a [preview feature](https://www.canva.dev/docs/apps/rest-apis/#preview-apis).\nThere might be unannounced breaking changes to this feature which won't produce a new API version.\n\nTrial information for non-qualifying users. Non-qualifying users have a limited number of\nresize uses. Once the trial is exhausted, users must upgrade to a Canva plan with premium\nfeatures (such as Canva Pro) to continue using the Resize API.",
      "properties": {
        "uses_remaining": {
          "description": "The number of uses remaining in the free trial.",
          "format": "int32",
          "minimum": 0,
          "type": "integer"
        },
        "upgrade_url": {
          "description": "The URL for a user to upgrade their Canva account.",
          "type": "string"
        }
      },
      "required": [
        "upgrade_url",
        "uses_remaining"
      ],
      "type": "object"
    }
  }
}