{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/canva/json-schema/canva-get-design-generation-job-response-v2-schema.json",
  "title": "GetDesignGenerationJobResponseV2",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/canva-design-generation-api-openapi.yml#/components/schemas/GetDesignGenerationJobResponseV2",
  "properties": {
    "job": {
      "$ref": "#/$defs/DesignGenerationJobV2"
    },
    "quota_usage": {
      "allOf": [
        {
          "$ref": "#/$defs/CreditQuotaSuccessInfo"
        }
      ],
      "description": "Credit quota snapshot when available. Polling does not reserve or consume credits; omitted if unavailable."
    }
  },
  "required": [
    "job"
  ],
  "type": "object",
  "$defs": {
    "CreditQuotaSuccessInfo": {
      "allOf": [
        {
          "$ref": "#/$defs/CreditQuotaUsageSummary"
        },
        {
          "properties": {
            "usage_review_link": {
              "description": "A URL to the Canva credit usage dashboard where the caller can review their\ncurrent credit consumption. Not present if unavailable.",
              "type": "string"
            }
          },
          "type": "object"
        }
      ],
      "description": "Credit quota usage information returned on a successful generation request."
    },
    "CreditQuotaUsageSummary": {
      "description": "A summary of the caller's credit quota usage at the time of the request.",
      "properties": {
        "used_percentage": {
          "description": "The percentage of the caller's credit quota that has been consumed in the current\nbilling interval, from 0 to 100.",
          "format": "int32",
          "maximum": 100,
          "minimum": 0,
          "type": "integer"
        },
        "resets_at": {
          "description": "Unix timestamp (seconds from the Unix epoch) of when the credit quota resets for\nthe caller.",
          "format": "int64",
          "type": "integer"
        },
        "using_bonus_credits": {
          "description": "Whether the caller is currently consuming bonus credits (credits beyond their base\nplan allocation).",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "DesignGenerationJobErrorCodeV2": {
      "description": "The reason the design generation job failed.",
      "enum": [
        "content_not_allowed",
        "generation_failed"
      ],
      "type": "string",
      "x-enum-descriptions": [
        "The brief or generated content didn't pass Canva's content-safety checks.",
        "Canva couldn't complete the design generation job."
      ]
    },
    "DesignGenerationJobErrorV2": {
      "description": "Details about a failed design generation job.",
      "properties": {
        "code": {
          "$ref": "#/$defs/DesignGenerationJobErrorCodeV2"
        },
        "message": {
          "description": "A human-readable description of what went wrong.",
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    },
    "DesignGenerationJobResultV2": {
      "description": "Present only when the job status is `success`.",
      "properties": {
        "design": {
          "$ref": "#/$defs/DesignSummary"
        }
      },
      "required": [
        "design"
      ],
      "type": "object"
    },
    "DesignGenerationJobStatusV2": {
      "description": "The public status of the job. `result` is present only for `success`, and\n`error` is present only for `failed`.",
      "enum": [
        "failed",
        "in_progress",
        "success"
      ],
      "type": "string",
      "x-enum-descriptions": [
        "The design couldn't be generated.",
        "The design is still being generated.",
        "The design was generated and saved to the user's Canva account."
      ]
    },
    "DesignGenerationJobV2": {
      "description": "The status and result of a public design generation job.",
      "properties": {
        "id": {
          "description": "The public design generation job ID.",
          "pattern": "^[a-zA-Z0-9_-]{1,50}$",
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/DesignGenerationJobStatusV2"
        },
        "result": {
          "$ref": "#/$defs/DesignGenerationJobResultV2"
        },
        "error": {
          "$ref": "#/$defs/DesignGenerationJobErrorV2"
        }
      },
      "required": [
        "id",
        "status"
      ],
      "type": "object"
    },
    "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"
    },
    "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"
    }
  }
}