{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/canva/json-schema/canva-get-thread-response-schema.json",
  "title": "GetThreadResponse",
  "description": "Successful response from a `getThread` request.\n\nThe `comment` property is deprecated.\nFor details of a comment thread, please use the `thread` property.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/canva-comment-api-openapi.yml#/components/schemas/GetThreadResponse",
  "properties": {
    "comment": {
      "$ref": "#/$defs/Comment"
    },
    "thread": {
      "$ref": "#/$defs/Thread"
    }
  },
  "type": "object",
  "$defs": {
    "AddSuggestedEdit": {
      "description": "A suggestion to add some text.",
      "properties": {
        "type": {
          "enum": [
            "add"
          ],
          "type": "string"
        },
        "text": {
          "type": "string"
        }
      },
      "required": [
        "text",
        "type"
      ],
      "type": "object"
    },
    "Comment": {
      "deprecated": true,
      "description": "The comment object, which contains metadata about the comment.\nDeprecated in favor of the new `thread` object.",
      "oneOf": [
        {
          "$ref": "#/$defs/ParentComment"
        },
        {
          "$ref": "#/$defs/ReplyComment"
        }
      ],
      "type": "object"
    },
    "CommentContent": {
      "description": "The content of a comment thread or reply.",
      "properties": {
        "plaintext": {
          "description": "The content in plaintext.\nAny user mention tags are shown in the format `[user_id:team_id]`.",
          "type": "string"
        },
        "markdown": {
          "description": "The content in markdown.\nAny user mention tags are shown in the format `[user_id:team_id]`",
          "type": "string"
        }
      },
      "required": [
        "plaintext"
      ],
      "type": "object"
    },
    "CommentObject": {
      "deprecated": true,
      "description": "Identifying information about the object (such as a design) that the comment is attached to.",
      "oneOf": [
        {
          "$ref": "#/$defs/DesignCommentObject"
        }
      ],
      "type": "object"
    },
    "CommentThreadType": {
      "description": "A comment thread.",
      "properties": {
        "type": {
          "enum": [
            "comment"
          ],
          "type": "string"
        },
        "content": {
          "$ref": "#/$defs/CommentContent"
        },
        "mentions": {
          "additionalProperties": {
            "$ref": "#/$defs/UserMention"
          },
          "description": "The Canva users mentioned in the comment thread or reply.",
          "type": "object"
        },
        "assignee": {
          "$ref": "#/$defs/User"
        },
        "resolver": {
          "$ref": "#/$defs/User"
        }
      },
      "required": [
        "content",
        "mentions",
        "type"
      ],
      "type": "object"
    },
    "DeleteSuggestedEdit": {
      "description": "A suggestion to delete some text.",
      "properties": {
        "type": {
          "enum": [
            "delete"
          ],
          "type": "string"
        },
        "text": {
          "type": "string"
        }
      },
      "required": [
        "text",
        "type"
      ],
      "type": "object"
    },
    "DesignCommentObject": {
      "deprecated": true,
      "description": "If the comment is attached to a Canva Design.",
      "properties": {
        "type": {
          "enum": [
            "design"
          ],
          "type": "string"
        },
        "design_id": {
          "description": "The ID of the design this comment is attached to.",
          "type": "string"
        }
      },
      "required": [
        "design_id",
        "type"
      ],
      "type": "object"
    },
    "FormatSuggestedEdit": {
      "description": "A suggestion to format some text.",
      "properties": {
        "type": {
          "enum": [
            "format"
          ],
          "type": "string"
        },
        "format": {
          "$ref": "#/$defs/SuggestionFormat"
        }
      },
      "required": [
        "format",
        "type"
      ],
      "type": "object"
    },
    "ParentComment": {
      "deprecated": true,
      "description": "Data about the comment, including the message, author, and\nthe object (such as a design) the comment is attached to.",
      "properties": {
        "type": {
          "enum": [
            "parent"
          ],
          "type": "string"
        },
        "id": {
          "description": "The ID of the comment.\n\nYou can use this ID to create replies to the comment using the [Create reply API](https://www.canva.dev/docs/apps/rest-apis/reference/comments/create-reply/).",
          "type": "string"
        },
        "attached_to": {
          "$ref": "#/$defs/CommentObject"
        },
        "message": {
          "description": "The comment message. This is the comment body shown in the Canva UI.\nUser mentions are shown here in the format `[user_id:team_id]`.",
          "type": "string"
        },
        "author": {
          "$ref": "#/$defs/User"
        },
        "created_at": {
          "description": "When the comment or reply was created, as a Unix timestamp\n(in seconds since the Unix Epoch).",
          "format": "int64",
          "type": "integer"
        },
        "updated_at": {
          "description": "When the comment or reply was last updated, as a Unix timestamp\n(in seconds since the Unix Epoch).",
          "format": "int64",
          "type": "integer"
        },
        "mentions": {
          "additionalProperties": {
            "$ref": "#/$defs/TeamUser"
          },
          "deprecated": true,
          "description": "The Canva users mentioned in the comment.",
          "type": "object"
        },
        "assignee": {
          "$ref": "#/$defs/User"
        },
        "resolver": {
          "$ref": "#/$defs/User"
        }
      },
      "required": [
        "author",
        "id",
        "mentions",
        "message",
        "type"
      ],
      "type": "object"
    },
    "ReplyComment": {
      "deprecated": true,
      "description": "Data about the reply comment, including the message, author, and\nthe object (such as a design) the comment is attached to.",
      "properties": {
        "type": {
          "enum": [
            "reply"
          ],
          "type": "string"
        },
        "id": {
          "description": "The ID of the comment.",
          "type": "string"
        },
        "attached_to": {
          "$ref": "#/$defs/CommentObject"
        },
        "message": {
          "description": "The comment message. This is the comment body shown in the Canva UI.\nUser mentions are shown here in the format `[user_id:team_id]`.",
          "type": "string"
        },
        "author": {
          "$ref": "#/$defs/User"
        },
        "created_at": {
          "description": "When the comment or reply was created, as a Unix timestamp\n(in seconds since the Unix Epoch).",
          "format": "int64",
          "type": "integer"
        },
        "updated_at": {
          "description": "When the comment or reply was last updated, as a Unix timestamp\n(in seconds since the Unix Epoch).",
          "format": "int64",
          "type": "integer"
        },
        "mentions": {
          "additionalProperties": {
            "$ref": "#/$defs/TeamUser"
          },
          "deprecated": true,
          "description": "The Canva users mentioned in the comment.",
          "type": "object"
        },
        "thread_id": {
          "description": "The ID of the comment thread this reply is in. This ID is the same as the `id` of the\nparent comment.",
          "type": "string"
        }
      },
      "required": [
        "author",
        "id",
        "mentions",
        "message",
        "thread_id",
        "type"
      ],
      "type": "object"
    },
    "SuggestedEdit": {
      "description": "The type of the suggested edit, along with additional type-specific properties.",
      "oneOf": [
        {
          "$ref": "#/$defs/AddSuggestedEdit"
        },
        {
          "$ref": "#/$defs/DeleteSuggestedEdit"
        },
        {
          "$ref": "#/$defs/FormatSuggestedEdit"
        }
      ],
      "type": "object"
    },
    "SuggestionFormat": {
      "description": "The suggested format change.",
      "enum": [
        "font_family",
        "font_size",
        "font_weight",
        "font_style",
        "color",
        "background_color",
        "decoration",
        "strikethrough",
        "link",
        "letter_spacing",
        "line_height",
        "direction",
        "text_align",
        "list_marker",
        "list_level",
        "margin_inline_start",
        "text_indent",
        "font_size_modifier",
        "vertical_align"
      ],
      "type": "string"
    },
    "SuggestionStatus": {
      "description": "The current status of the suggestion.",
      "enum": [
        "open",
        "accepted",
        "rejected"
      ],
      "type": "string",
      "x-enum-descriptions": [
        "A suggestion was made, but it hasn't been accepted or rejected yet.",
        "A suggestion was accepted and applied to the design.",
        "A suggestion was rejected and not applied to the design."
      ]
    },
    "SuggestionThreadType": {
      "description": "A suggestion thread.",
      "properties": {
        "type": {
          "enum": [
            "suggestion"
          ],
          "type": "string"
        },
        "suggested_edits": {
          "items": {
            "$ref": "#/$defs/SuggestedEdit"
          },
          "minItems": 1,
          "type": "array"
        },
        "status": {
          "$ref": "#/$defs/SuggestionStatus"
        }
      },
      "required": [
        "status",
        "suggested_edits",
        "type"
      ],
      "type": "object"
    },
    "TeamUser": {
      "description": "Metadata for the user, consisting of the User ID, Team ID, and display name.",
      "properties": {
        "user_id": {
          "description": "The ID of the user.",
          "type": "string"
        },
        "team_id": {
          "description": "The ID of the user's Canva Team.",
          "type": "string"
        },
        "display_name": {
          "description": "The name of the user as shown in the Canva UI.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "Thread": {
      "description": "A discussion thread on a design.\n\nThe `type` of the thread can be found in the `thread_type` object, along with additional type-specific properties.\nThe `author` of the thread might be missing if that user account no longer exists.",
      "properties": {
        "id": {
          "description": "The ID of the thread.\n\nYou can use this ID to create replies to the thread using the [Create reply API](https://www.canva.dev/docs/apps/rest-apis/reference/comments/create-reply/).",
          "type": "string"
        },
        "design_id": {
          "description": "The ID of the design that the discussion thread is on.",
          "type": "string"
        },
        "thread_type": {
          "$ref": "#/$defs/ThreadType"
        },
        "author": {
          "$ref": "#/$defs/User"
        },
        "created_at": {
          "description": "When the thread was created, as a Unix timestamp\n(in seconds since the Unix Epoch).",
          "format": "int64",
          "type": "integer"
        },
        "updated_at": {
          "description": "When the thread was last updated, as a Unix timestamp\n(in seconds since the Unix Epoch).",
          "format": "int64",
          "type": "integer"
        }
      },
      "required": [
        "created_at",
        "design_id",
        "id",
        "thread_type",
        "updated_at"
      ],
      "type": "object"
    },
    "ThreadType": {
      "description": "The type of the discussion thread, along with additional type-specific properties.",
      "oneOf": [
        {
          "$ref": "#/$defs/CommentThreadType"
        },
        {
          "$ref": "#/$defs/SuggestionThreadType"
        }
      ],
      "type": "object"
    },
    "User": {
      "description": "Metadata for the user, consisting of the User ID and display name.",
      "properties": {
        "id": {
          "description": "The ID of the user.",
          "type": "string"
        },
        "display_name": {
          "description": "The name of the user as shown in the Canva UI.",
          "type": "string"
        }
      },
      "required": [
        "id"
      ],
      "type": "object"
    },
    "UserMention": {
      "description": "Information about the user mentioned in a comment thread or reply. Each user mention is keyed using the user's user ID and team ID separated by a colon (`user_id:team_id`).",
      "properties": {
        "tag": {
          "description": "The mention tag for the user mentioned in the comment thread or reply content. This has the format of the user's user ID and team ID separated by a colon (`user_id:team_id`).",
          "type": "string"
        },
        "user": {
          "$ref": "#/$defs/TeamUser"
        }
      },
      "required": [
        "tag",
        "user"
      ],
      "type": "object"
    }
  }
}