Get thread

Get metadata for a comment thread.

This API is currently provided as a preview. Be aware of the following:

  • There might be unannounced breaking changes.
  • Any breaking changes to preview APIs won't produce a new API version.
  • Public integrations that use preview APIs will not pass the review process, and can't be made available to all Canva users.

Gets a comment thread. To retrieve a reply to a comment thread, use the Get reply API. For information on comments and how they're used in the Canva UI, see the Canva Help Center(opens in a new tab or window).

HTTP method and URL path

GET https://api.canva.com/rest/v1/designs/{designId}/comments/{threadId}

This operation is rate limited to 100 requests per minute for each user of your integration.

Authentication

This endpoint requires a valid access token that acts on behalf of a user. The token must have the following scopes (permissions):

  • comment:read

For more information, see Scopes.

Header parameters

Authorizationstring
REQUIRED

Provides credentials to authenticate the request, in the form of a Bearer token.

For example: Authorization: Bearer {token}

Path parameters

designIdstring
REQUIRED

The design ID.

threadIdstring
REQUIRED

The ID of the thread.

Example request

Examples for using the /v1/designs/{designId}/comments/{threadId} endpoint:

curl --request GET 'https://api.canva.com/rest/v1/designs/{designId}/comments/{threadId}' \
--header 'Authorization: Bearer {token}'
SH
const fetch = require("node-fetch");
fetch("https://api.canva.com/rest/v1/designs/{designId}/comments/{threadId}", {
method: "GET",
headers: {
"Authorization": "Bearer {token}",
},
})
.then(async (response) => {
const data = await response.json();
console.log(data);
})
.catch(err => console.error(err));
JS
import java.io.IOException;
import java.net.URI;
import java.net.http.*;
public class ApiExample {
public static void main(String[] args) throws IOException, InterruptedException {
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.canva.com/rest/v1/designs/{designId}/comments/{threadId}"))
.header("Authorization", "Bearer {token}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(
request,
HttpResponse.BodyHandlers.ofString()
);
System.out.println(response.body());
}
}
JAVA
import requests
headers = {
"Authorization": "Bearer {token}"
}
response = requests.get("https://api.canva.com/rest/v1/designs/{designId}/comments/{threadId}",
headers=headers
)
print(response.json())
PY
using System.Net.Http;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://api.canva.com/rest/v1/designs/{designId}/comments/{threadId}"),
Headers =
{
{ "Authorization", "Bearer {token}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
};
CSHARP
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.canva.com/rest/v1/designs/{designId}/comments/{threadId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer {token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
GO
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.canva.com/rest/v1/designs/{designId}/comments/{threadId}",
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {token}',
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if (empty($err)) {
echo $response;
} else {
echo "Error: " . $err;
}
PHP
require 'net/http'
require 'uri'
url = URI('https://api.canva.com/rest/v1/designs/{designId}/comments/{threadId}')
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request['Authorization'] = 'Bearer {token}'
response = http.request(request)
puts response.read_body
RUBY

Success response

If successful, the endpoint returns a 200 response with a JSON body with the following parameters:

threadThread
OPTIONAL

A discussion thread on a design.

The type of the thread can be found in the thread_type object, along with additional type-specific properties. The author of the thread might be missing if that user account no longer exists.

Properties of thread
idstring

The ID of the thread.

You can use this ID to create replies to the thread using the Create reply API.

design_idstring

The ID of the design that the discussion thread is on.

thread_typeThreadType

The type of the discussion thread, along with additional type-specific properties.

Properties of thread_type
typestring

This can be one of the following:

  • comment: A comment thread.
  • suggestion: A suggestion thread.
contentCommentContent
CONDITIONAL

The content of a comment thread or reply.

Properties of content
plaintextstring

The content in plaintext. Any user mention tags are shown in the format [user_id:team_id].

markdownstring
OPTIONAL

The content in markdown. Any user mention tags are shown in the format [user_id:team_id]

mentionsobject
CONDITIONAL

The Canva users mentioned in the comment thread or reply.

Properties of mentions
<KEY>object of UserMentions

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).

{
"oUnPjZ2k2yuhftbWF7873o:oBpVhLW22VrqtwKgaayRbP": {
"tag": "oUnPjZ2k2yuhftbWF7873o:oBpVhLW22VrqtwKgaayRbP",
"user": {
"user_id": "oUnPjZ2k2yuhftbWF7873o",
"team_id": "oBpVhLW22VrqtwKgaayRbP",
"display_name": "John Doe"
}
}
}
JSON
tagstring

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).

userTeamUser

Metadata for the user, consisting of the User ID, Team ID, and display name.

Properties of user
user_idstring
OPTIONAL

The ID of the user.

team_idstring
OPTIONAL

The ID of the user's Canva Team.

display_namestring
OPTIONAL

The name of the user as shown in the Canva UI.

suggested_editsSuggestedEdit[]
CONDITIONAL

The type of the suggested edit, along with additional type-specific properties.

Minimum items: 1

Properties of suggested_edits
typestring

This can be one of the following:

  • add: A suggestion to add some text.
  • delete: A suggestion to delete some text.
  • format: A suggestion to format some text.
textstring
CONDITIONAL
formatstring
CONDITIONAL

The suggested format change.

Available values:

  • font_family
  • font_size
  • font_weight
  • font_style
  • color
  • decoration
  • strikethrough
  • link
  • letter_spacing
  • line_height
  • direction
  • text_align
  • list_marker
  • list_level
  • margin_inline_start
  • text_indent
statusstring
CONDITIONAL

The current status of the suggestion.

Available values:

  • open: A suggestion was made, but it hasn't been accepted or rejected yet.
  • accepted: A suggestion was accepted and applied to the design.
  • rejected: A suggestion was rejected and not applied to the design.
assigneeUser
OPTIONAL

Metadata for the user, consisting of the User ID and display name.

Properties of assignee
idstring

The ID of the user.

display_namestring
OPTIONAL

The name of the user as shown in the Canva UI.

resolverUser
OPTIONAL

Metadata for the user, consisting of the User ID and display name.

Properties of resolver
idstring

The ID of the user.

display_namestring
OPTIONAL

The name of the user as shown in the Canva UI.

created_atinteger

When the thread was created, as a Unix timestamp (in seconds since the Unix Epoch).

updated_atinteger

When the thread was last updated, as a Unix timestamp (in seconds since the Unix Epoch).

authorUser
OPTIONAL

Metadata for the user, consisting of the User ID and display name.

Properties of author
idstring

The ID of the user.

display_namestring
OPTIONAL

The name of the user as shown in the Canva UI.

commentComment
DEPRECATED

The comment object, which contains metadata about the comment. Deprecated in favor of the new Thread type.

Properties of comment
typestring

This can be one of the following:

  • parent: The type of comment. When creating a new parent (top-level) comment, the type is parent.
  • reply: The type of comment. When creating a reply to a top-level comment, the type is reply.
idstring

The ID of the comment.

You can use this ID to create replies to the comment using the Create reply API.

messagestring

The comment message. This is the comment body shown in the Canva UI. User mentions are shown here in the format [user_id:team_id].

authorUser

Metadata for the user, consisting of the User ID and display name.

Properties of author
idstring

The ID of the user.

display_namestring
DEPRECATED

The name of the user as shown in the Canva UI.

thread_idstring
CONDITIONAL

The ID of the comment thread this reply is in. This ID is the same as the id of the parent comment.

created_atinteger
DEPRECATED

When the comment or reply was created, as a Unix timestamp (in seconds since the Unix Epoch).

updated_atinteger
DEPRECATED

When the comment or reply was last updated, as a Unix timestamp (in seconds since the Unix Epoch).

assigneeUser
DEPRECATED

Metadata for the user, consisting of the User ID and display name.

Properties of assignee
idstring

The ID of the user.

display_namestring
DEPRECATED

The name of the user as shown in the Canva UI.

resolverUser
DEPRECATED

Metadata for the user, consisting of the User ID and display name.

Properties of resolver
idstring

The ID of the user.

display_namestring
DEPRECATED

The name of the user as shown in the Canva UI.

mentionsobject

The Canva users mentioned in the comment.

Properties of mentions
<KEY>object of TeamUsers

Metadata for the user, consisting of the User ID, Team ID, and display name.

user_idstring
DEPRECATED

The ID of the user.

team_idstring
DEPRECATED

The ID of the user's Canva Team.

display_namestring
DEPRECATED

The name of the user as shown in the Canva UI.

attached_toCommentObject
DEPRECATED

Identifying information about the object (such as a design) that the comment is attached to.

Properties of attached_to
typestring

This can be one of the following:

  • design: If the comment is attached to a Canva Design.
design_idstring

The ID of the design this comment is attached to.

Example response

{
"thread": {
"id": "KeAbiEAjZEj",
"design_id": "DAFVztcvd9z",
"thread_type": {
"type": "comment",
"content": {
"plaintext": "Great work [oUnPjZ2k2yuhftbWF7873o:oBpVhLW22VrqtwKgaayRbP]!",
"markdown": "*_Great work_* [oUnPjZ2k2yuhftbWF7873o:oBpVhLW22VrqtwKgaayRbP]!"
},
"mentions": {
"oUnPjZ2k2yuhftbWF7873o:oBpVhLW22VrqtwKgaayRbP": {
"tag": "oUnPjZ2k2yuhftbWF7873o:oBpVhLW22VrqtwKgaayRbP",
"user": {
"user_id": "oUnPjZ2k2yuhftbWF7873o",
"team_id": "oBpVhLW22VrqtwKgaayRbP",
"display_name": "John Doe"
}
}
},
"assignee": {
"id": "uKakKUfI03Fg8k2gZ6OkT",
"display_name": "John Doe"
},
"resolver": {
"id": "uKakKUfI03Fg8k2gZ6OkT",
"display_name": "John Doe"
}
},
"author": {
"id": "uKakKUfI03Fg8k2gZ6OkT",
"display_name": "John Doe"
},
"created_at": 1692928800,
"updated_at": 1692928900
}
}
JSON

Try it out

Step 1: Enter your access token

To get started, generate an access token or provide your own below