Appearance
Connect API — Folders
Folders Overview
The Canva Connect APIs for managing folders.
The folders endpoint enables you to create, edit, update, delete, and manage folders in a user’s Canva library.
Use folders to organize your library content in a structured way. Folder names can make the library more readable and searchable.
The top level of the user's content library is represented by the folder with the ID root. The user's Uploads folder is represented with the ID uploads.
For more information about Canva folders, see Canva concepts.
Folders APIs
- Create folder: Create a new folder in the user's Projects.
- Get folder: Retrieve a folder's metadata.
- Update folder: Update a folder's metadata.
- Delete folder: Delete a folder.
- List folder items: List the contents of a folder.
- Move folder item: Move an item from one folder to another.
Create Folder
Create a new folder in the user's Projects.
Creates a folder in one of the following locations:
- The top level of a Canva user's projects (using the ID
root), - The user's Uploads folder (using the ID
uploads), - Another folder (using the parent folder's ID).
When a folder is successfully created, the endpoint returns its folder ID, along with other information.
HTTP method and URL path
POST https://api.canva.com/rest/v1/folders
This operation is rate limited to 20 requests per minute for each user of your integration.
Authentication and authorization
This endpoint requires a valid access token that acts on behalf of a user.
Scopes
The access token must have all the following scopes (permissions):
folder:write
Header parameters
<Prop.List> <Prop name="Authorization" type="string" required> Provides credentials to authenticate the request, in the form of a Bearer token.
For example: `Authorization: Bearer {token}`
</Prop>
<Prop name="Content-Type" type="string" required> Indicates the media type of the information sent in the request. This must be set to application/json.
For example: `Content-Type: application/json`
</Prop> </Prop.List>
Body parameters
<Prop.List> <Prop name="name" type="string" required> The name of the folder.
<Prop.Extras>
**Minimum length:** `1`
**Maximum length:** `255`
</Prop.Extras>
</Prop>
<Prop name="parent_folder_id" type="string" required> The folder ID of the parent folder. To create a new folder at the top level of a user's projects, use the ID root. To create it in their Uploads folder, use uploads.
<Prop.Extras>
**Minimum length:** `1`
**Maximum length:** `50`
</Prop.Extras>
</Prop> </Prop.List>
Example request
Examples for using the /v1/folders endpoint:
<Tabs storageKey="example.language" disableContentTransition> <Tab name="cURL"> sh curl --request POST 'https://api.canva.com/rest/v1/folders' \ --header 'Authorization: Bearer {token}' \ --header 'Content-Type: application/json' \ --data '{ "name": "My awesome holiday", "parent_folder_id": "FAF2lZtloor" }' </Tab>
<Tab name="Node.js"> ```js const fetch = require("node-fetch");
fetch("https://api.canva.com/rest/v1/folders", {
method: "POST",
headers: {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "My awesome holiday",
"parent_folder_id": "FAF2lZtloor"
}),
})
.then(async (response) => {
const data = await response.json();
console.log(data);
})
.catch(err => console.error(err));
```
</Tab>
<Tab name="Java"> ```java 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/folders"))
.header("Authorization", "Bearer {token}")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\"name\": \"My awesome holiday\", \"parent_folder_id\": \"FAF2lZtloor\"}"))
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(
request,
HttpResponse.BodyHandlers.ofString()
);
System.out.println(response.body());
}
}
```
</Tab>
<Tab name="Python"> ```py import requests
headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json"
}
data = {
"name": "My awesome holiday",
"parent_folder_id": "FAF2lZtloor"
}
response = requests.post("https://api.canva.com/rest/v1/folders",
headers=headers,
json=data
)
print(response.json())
```
</Tab>
<Tab name="C#"> ```csharp using System.Net.Http;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("https://api.canva.com/rest/v1/folders"),
Headers =
{
{ "Authorization", "Bearer {token}" },
},
Content = new StringContent(
"{\"name\": \"My awesome holiday\", \"parent_folder_id\": \"FAF2lZtloor\"}",
Encoding.UTF8,
"application/json"
),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
};
```
</Tab>
<Tab name="Go"> ```go package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader(`{
"name": "My awesome holiday",
"parent_folder_id": "FAF2lZtloor"
}`)
url := "https://api.canva.com/rest/v1/folders"
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer {token}")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
```
</Tab>
<Tab name="PHP"> ```php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.canva.com/rest/v1/folders", CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => array( 'Authorization: Bearer {token}', 'Content-Type: application/json', ), CURLOPT_POSTFIELDS => json_encode([ "name" => "My awesome holiday", "parent_folder_id" => "FAF2lZtloor" ]) ));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if (empty($err)) {
echo $response;
} else {
echo "Error: " . $err;
}
```
</Tab>
<Tab name="Ruby"> ```ruby require 'net/http' require 'uri'
url = URI('https://api.canva.com/rest/v1/folders')
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request['Authorization'] = 'Bearer {token}'
request['Content-Type'] = 'application/json'
request.body = <<REQUEST_BODY
{
"name": "My awesome holiday",
"parent_folder_id": "FAF2lZtloor"
}
REQUEST_BODY
response = http.request(request)
puts response.read_body
```
</Tab> </Tabs>
Success response
If successful, the endpoint returns a 200 response with a JSON body with the following parameters:
<Prop.List> <Prop name="folder" type="Folder" mode="output"> The folder object, which contains metadata about the folder.
<PillAccordion title={<>Properties of <strong>folder</strong></>} defaultExpanded={true}>
<Prop.List>
<Prop name="id" type="string" required mode="output">
The folder ID.
</Prop>
<Prop name="name" type="string" required mode="output">
The folder name.
</Prop>
<Prop name="created_at" type="integer" required mode="output">
When the folder was created, as a Unix timestamp (in seconds since the
Unix Epoch).
</Prop>
<Prop name="updated_at" type="integer" required mode="output">
When the folder was last updated, as a Unix timestamp (in seconds since the
Unix Epoch).
</Prop>
<Prop name="thumbnail" type="Thumbnail" mode="output">
A thumbnail image representing the object.
<PillAccordion title={<>Properties of <strong>thumbnail</strong></>}>
<Prop.List>
<Prop name="width" type="integer" required mode="output">
The width of the thumbnail image in pixels.
</Prop>
<Prop name="height" type="integer" required mode="output">
The height of the thumbnail image in pixels.
</Prop>
<Prop name="url" type="string" required mode="output">
A URL for retrieving the thumbnail image.
This URL expires after 15 minutes. This URL includes a query string
that's required for retrieving the thumbnail.
</Prop>
</Prop.List>
</PillAccordion>
</Prop>
</Prop.List>
</PillAccordion>
</Prop> </Prop.List>
Example response
json
{
"folder": {
"id": "FAF2lZtloor",
"name": "My awesome holiday",
"created_at": 1377396000,
"updated_at": 1692928800,
"thumbnail": {
"width": 595,
"height": 335,
"url": "https://document-export.canva.com/Vczz9/zF9vzVtdADc/2/thumbnail/0001.png?<query-string>"
}
}
}Get Folder
Retrieve a folder's metadata.
Gets the name and other details of a folder using a folder's folderID.
HTTP method and URL path
GET https://api.canva.com/rest/v1/folders/{folderId}
This operation is rate limited to 100 requests per minute for each user of your integration.
Authentication and authorization
This endpoint requires a valid access token that acts on behalf of a user.
Scopes
The access token must have all the following scopes (permissions):
folder:read
Header parameters
<Prop.List> <Prop name="Authorization" type="string" required> Provides credentials to authenticate the request, in the form of a Bearer token.
For example: `Authorization: Bearer {token}`
</Prop> </Prop.List>
Path parameters
<Prop.List> <Prop name="folderId" type="string" required> The folder ID. </Prop> </Prop.List>
Example request
Examples for using the /v1/folders/{folderId} endpoint:
<Tabs storageKey="example.language" disableContentTransition> <Tab name="cURL"> sh curl --request GET 'https://api.canva.com/rest/v1/folders/{folderId}' \ --header 'Authorization: Bearer {token}' </Tab>
<Tab name="Node.js"> ```js const fetch = require("node-fetch");
fetch("https://api.canva.com/rest/v1/folders/{folderId}", {
method: "GET",
headers: {
"Authorization": "Bearer {token}",
},
})
.then(async (response) => {
const data = await response.json();
console.log(data);
})
.catch(err => console.error(err));
```
</Tab>
<Tab name="Java"> ```java 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/folders/{folderId}"))
.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());
}
}
```
</Tab>
<Tab name="Python"> ```py import requests
headers = {
"Authorization": "Bearer {token}"
}
response = requests.get("https://api.canva.com/rest/v1/folders/{folderId}",
headers=headers
)
print(response.json())
```
</Tab>
<Tab name="C#"> ```csharp using System.Net.Http;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://api.canva.com/rest/v1/folders/{folderId}"),
Headers =
{
{ "Authorization", "Bearer {token}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
};
```
</Tab>
<Tab name="Go"> ```go package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.canva.com/rest/v1/folders/{folderId}"
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))
}
```
</Tab>
<Tab name="PHP"> ```php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.canva.com/rest/v1/folders/{folderId}", 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;
}
```
</Tab>
<Tab name="Ruby"> ```ruby require 'net/http' require 'uri'
url = URI('https://api.canva.com/rest/v1/folders/{folderId}')
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
```
</Tab> </Tabs>
Success response
If successful, the endpoint returns a 200 response with a JSON body with the following parameters:
<Prop.List> <Prop name="folder" type="Folder" required mode="output"> The folder object, which contains metadata about the folder.
<PillAccordion title={<>Properties of <strong>folder</strong></>} defaultExpanded={true}>
<Prop.List>
<Prop name="id" type="string" required mode="output">
The folder ID.
</Prop>
<Prop name="name" type="string" required mode="output">
The folder name.
</Prop>
<Prop name="created_at" type="integer" required mode="output">
When the folder was created, as a Unix timestamp (in seconds since the
Unix Epoch).
</Prop>
<Prop name="updated_at" type="integer" required mode="output">
When the folder was last updated, as a Unix timestamp (in seconds since the
Unix Epoch).
</Prop>
<Prop name="thumbnail" type="Thumbnail" mode="output">
A thumbnail image representing the object.
<PillAccordion title={<>Properties of <strong>thumbnail</strong></>}>
<Prop.List>
<Prop name="width" type="integer" required mode="output">
The width of the thumbnail image in pixels.
</Prop>
<Prop name="height" type="integer" required mode="output">
The height of the thumbnail image in pixels.
</Prop>
<Prop name="url" type="string" required mode="output">
A URL for retrieving the thumbnail image.
This URL expires after 15 minutes. This URL includes a query string
that's required for retrieving the thumbnail.
</Prop>
</Prop.List>
</PillAccordion>
</Prop>
</Prop.List>
</PillAccordion>
</Prop> </Prop.List>
Example response
json
{
"folder": {
"id": "FAF2lZtloor",
"name": "My awesome holiday",
"created_at": 1377396000,
"updated_at": 1692928800,
"thumbnail": {
"width": 595,
"height": 335,
"url": "https://document-export.canva.com/Vczz9/zF9vzVtdADc/2/thumbnail/0001.png?<query-string>"
}
}
}Update Folder
Update a folder's metadata.
Updates a folder's details using its folderID. Currently, you can only update a folder's name.
HTTP method and URL path
PATCH https://api.canva.com/rest/v1/folders/{folderId}
This operation is rate limited to 20 requests per minute for each user of your integration.
Authentication and authorization
This endpoint requires a valid access token that acts on behalf of a user.
Scopes
The access token must have all the following scopes (permissions):
folder:write
Header parameters
<Prop.List> <Prop name="Authorization" type="string" required> Provides credentials to authenticate the request, in the form of a Bearer token.
For example: `Authorization: Bearer {token}`
</Prop>
<Prop name="Content-Type" type="string" required> Indicates the media type of the information sent in the request. This must be set to application/json.
For example: `Content-Type: application/json`
</Prop> </Prop.List>
Path parameters
<Prop.List> <Prop name="folderId" type="string" required> The folder ID. </Prop> </Prop.List>
Body parameters
<Prop.List> <Prop name="name" type="string" required> The folder name, as shown in the Canva UI.
<Prop.Extras>
**Minimum length:** `1`
**Maximum length:** `255`
</Prop.Extras>
</Prop> </Prop.List>
Example request
Examples for using the /v1/folders/{folderId} endpoint:
<Tabs storageKey="example.language" disableContentTransition> <Tab name="cURL"> sh curl --request PATCH 'https://api.canva.com/rest/v1/folders/{folderId}' \ --header 'Authorization: Bearer {token}' \ --header 'Content-Type: application/json' \ --data '{ "name": "My awesome holiday" }' </Tab>
<Tab name="Node.js"> ```js const fetch = require("node-fetch");
fetch("https://api.canva.com/rest/v1/folders/{folderId}", {
method: "PATCH",
headers: {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "My awesome holiday"
}),
})
.then(async (response) => {
const data = await response.json();
console.log(data);
})
.catch(err => console.error(err));
```
</Tab>
<Tab name="Java"> ```java 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/folders/{folderId}"))
.header("Authorization", "Bearer {token}")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\"name\": \"My awesome holiday\"}"))
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(
request,
HttpResponse.BodyHandlers.ofString()
);
System.out.println(response.body());
}
}
```
</Tab>
<Tab name="Python"> ```py import requests
headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json"
}
data = {
"name": "My awesome holiday"
}
response = requests.patch("https://api.canva.com/rest/v1/folders/{folderId}",
headers=headers,
json=data
)
print(response.json())
```
</Tab>
<Tab name="C#"> ```csharp using System.Net.Http;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("https://api.canva.com/rest/v1/folders/{folderId}"),
Headers =
{
{ "Authorization", "Bearer {token}" },
},
Content = new StringContent(
"{\"name\": \"My awesome holiday\"}",
Encoding.UTF8,
"application/json"
),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
};
```
</Tab>
<Tab name="Go"> ```go package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader(`{
"name": "My awesome holiday"
}`)
url := "https://api.canva.com/rest/v1/folders/{folderId}"
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer {token}")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
```
</Tab>
<Tab name="PHP"> ```php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.canva.com/rest/v1/folders/{folderId}", CURLOPT_CUSTOMREQUEST => "PATCH", CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => array( 'Authorization: Bearer {token}', 'Content-Type: application/json', ), CURLOPT_POSTFIELDS => json_encode([ "name" => "My awesome holiday" ]) ));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if (empty($err)) {
echo $response;
} else {
echo "Error: " . $err;
}
```
</Tab>
<Tab name="Ruby"> ```ruby require 'net/http' require 'uri'
url = URI('https://api.canva.com/rest/v1/folders/{folderId}')
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request['Authorization'] = 'Bearer {token}'
request['Content-Type'] = 'application/json'
request.body = <<REQUEST_BODY
{
"name": "My awesome holiday"
}
REQUEST_BODY
response = http.request(request)
puts response.read_body
```
</Tab> </Tabs>
Success response
If successful, the endpoint returns a 200 response with a JSON body with the following parameters:
<Prop.List> <Prop name="folder" type="Folder" mode="output"> The folder object, which contains metadata about the folder.
<PillAccordion title={<>Properties of <strong>folder</strong></>} defaultExpanded={true}>
<Prop.List>
<Prop name="id" type="string" required mode="output">
The folder ID.
</Prop>
<Prop name="name" type="string" required mode="output">
The folder name.
</Prop>
<Prop name="created_at" type="integer" required mode="output">
When the folder was created, as a Unix timestamp (in seconds since the
Unix Epoch).
</Prop>
<Prop name="updated_at" type="integer" required mode="output">
When the folder was last updated, as a Unix timestamp (in seconds since the
Unix Epoch).
</Prop>
<Prop name="thumbnail" type="Thumbnail" mode="output">
A thumbnail image representing the object.
<PillAccordion title={<>Properties of <strong>thumbnail</strong></>}>
<Prop.List>
<Prop name="width" type="integer" required mode="output">
The width of the thumbnail image in pixels.
</Prop>
<Prop name="height" type="integer" required mode="output">
The height of the thumbnail image in pixels.
</Prop>
<Prop name="url" type="string" required mode="output">
A URL for retrieving the thumbnail image.
This URL expires after 15 minutes. This URL includes a query string
that's required for retrieving the thumbnail.
</Prop>
</Prop.List>
</PillAccordion>
</Prop>
</Prop.List>
</PillAccordion>
</Prop> </Prop.List>
Example response
json
{
"folder": {
"id": "FAF2lZtloor",
"name": "My awesome holiday",
"created_at": 1377396000,
"updated_at": 1692928800,
"thumbnail": {
"width": 595,
"height": 335,
"url": "https://document-export.canva.com/Vczz9/zF9vzVtdADc/2/thumbnail/0001.png?<query-string>"
}
}
}Delete Folder
Delete a folder.
Deletes a folder with the specified folderID. Deleting a folder moves the user's content in the folder to the Trash and content owned by other users is moved to the top level of the owner's projects.
HTTP method and URL path
DELETE https://api.canva.com/rest/v1/folders/{folderId}
This operation is rate limited to 20 requests per minute for each user of your integration.
Authentication and authorization
This endpoint requires a valid access token that acts on behalf of a user.
Scopes
The access token must have all the following scopes (permissions):
folder:write
Header parameters
<Prop.List> <Prop name="Authorization" type="string" required> Provides credentials to authenticate the request, in the form of a Bearer token.
For example: `Authorization: Bearer {token}`
</Prop> </Prop.List>
Path parameters
<Prop.List> <Prop name="folderId" type="string" required> The folder ID. </Prop> </Prop.List>
Example request
Examples for using the /v1/folders/{folderId} endpoint:
<Tabs storageKey="example.language" disableContentTransition> <Tab name="cURL"> sh curl --request DELETE 'https://api.canva.com/rest/v1/folders/{folderId}' \ --header 'Authorization: Bearer {token}' </Tab>
<Tab name="Node.js"> ```js const fetch = require("node-fetch");
fetch("https://api.canva.com/rest/v1/folders/{folderId}", {
method: "DELETE",
headers: {
"Authorization": "Bearer {token}",
},
})
.then(async (response) => {
const data = await response.json();
console.log(data);
})
.catch(err => console.error(err));
```
</Tab>
<Tab name="Java"> ```java 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/folders/{folderId}"))
.header("Authorization", "Bearer {token}")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(
request,
HttpResponse.BodyHandlers.ofString()
);
System.out.println(response.body());
}
}
```
</Tab>
<Tab name="Python"> ```py import requests
headers = {
"Authorization": "Bearer {token}"
}
response = requests.delete("https://api.canva.com/rest/v1/folders/{folderId}",
headers=headers
)
print(response.json())
```
</Tab>
<Tab name="C#"> ```csharp using System.Net.Http;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("https://api.canva.com/rest/v1/folders/{folderId}"),
Headers =
{
{ "Authorization", "Bearer {token}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
};
```
</Tab>
<Tab name="Go"> ```go package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.canva.com/rest/v1/folders/{folderId}"
req, _ := http.NewRequest("DELETE", 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))
}
```
</Tab>
<Tab name="PHP"> ```php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.canva.com/rest/v1/folders/{folderId}", CURLOPT_CUSTOMREQUEST => "DELETE", 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;
}
```
</Tab>
<Tab name="Ruby"> ```ruby require 'net/http' require 'uri'
url = URI('https://api.canva.com/rest/v1/folders/{folderId}')
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request['Authorization'] = 'Bearer {token}'
response = http.request(request)
puts response.read_body
```
</Tab> </Tabs>
Success response
If successful, the endpoint returns the status code 204 No content without a response body.
List Folder Items
List the contents of a folder.
Lists the items in a folder, including each item's type.
Folders can contain:
- Other folders.
- Designs, such as Instagram posts, Presentations, and Documents (Canva Docs).
- Image assets.
Currently, video assets are not returned in the response.
HTTP method and URL path
GET https://api.canva.com/rest/v1/folders/{folderId}/items
This operation is rate limited to 100 requests per minute for each user of your integration.
Authentication and authorization
This endpoint requires a valid access token that acts on behalf of a user.
Scopes
The access token must have all the following scopes (permissions):
folder:read
Header parameters
<Prop.List> <Prop name="Authorization" type="string" required> Provides credentials to authenticate the request, in the form of a Bearer token.
For example: `Authorization: Bearer {token}`
</Prop> </Prop.List>
Path parameters
<Prop.List> <Prop name="folderId" type="string" required> The folder ID. </Prop> </Prop.List>
Query parameters
<Prop.List> <Prop name="continuation" type="string"> If the success response contains a continuation token, the folder contains more items you can list. You can use this token as a query parameter and retrieve more items from the list, for example /v1/folders/{folderId}/items?continuation={continuation}.
To retrieve all the items in a folder, you might need to make multiple requests.
</Prop>
<Prop name="limit" type="integer"> The number of folder items to return.
<Prop.Extras>
**Minimum:** `1`
**Maximum:** `100`
**Default value:** `50`
</Prop.Extras>
</Prop>
<Prop name="item_types" type="string[]"> Filter the folder items to only return specified types. The available types are: design, folder, and image. To filter for more than one item type, provide a comma- delimited list.
<Prop.Extras>
**Available values:**
* `design`
* `folder`
* `image`
</Prop.Extras>
</Prop>
<Prop name="sort_by" type="string"> Sort the list of folder items.
<Prop.Extras>
**Default value:** `modified_descending`
**Available values:**
* `created_ascending`: Sort results by creation date, in ascending order.
* `created_descending`: Sort results by creation date, in descending order.
* `modified_ascending`: Sort results by the last modified date, in ascending order.
* `modified_descending`: Sort results by the last modified date, in descending order.
* `title_ascending`: Sort results by title, in ascending order. The title is either the `name` field for a folder or asset, or the `title` field for a design.
* `title_descending`: Sort results by title, in descending order. The title is either the `name` field for a folder or asset, or the `title` field for a design.
</Prop.Extras>
</Prop>
<Prop name="pin_status" type="string"> Filter folder items by their pinned status.
<Prop.Extras>
**Default value:** `any`
**Available values:**
* `any`: Return all items regardless of pinned status (default).
* `pinned`: Return only pinned items.
</Prop.Extras>
</Prop> </Prop.List>
Example request
Examples for using the /v1/folders/{folderId}/items endpoint:
<Tabs storageKey="example.language" disableContentTransition> <Tab name="cURL"> sh curl --request GET 'https://api.canva.com/rest/v1/folders/{folderId}/items' \ --header 'Authorization: Bearer {token}' </Tab>
<Tab name="Node.js"> ```js const fetch = require("node-fetch");
fetch("https://api.canva.com/rest/v1/folders/{folderId}/items", {
method: "GET",
headers: {
"Authorization": "Bearer {token}",
},
})
.then(async (response) => {
const data = await response.json();
console.log(data);
})
.catch(err => console.error(err));
```
</Tab>
<Tab name="Java"> ```java 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/folders/{folderId}/items"))
.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());
}
}
```
</Tab>
<Tab name="Python"> ```py import requests
headers = {
"Authorization": "Bearer {token}"
}
response = requests.get("https://api.canva.com/rest/v1/folders/{folderId}/items",
headers=headers
)
print(response.json())
```
</Tab>
<Tab name="C#"> ```csharp using System.Net.Http;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://api.canva.com/rest/v1/folders/{folderId}/items"),
Headers =
{
{ "Authorization", "Bearer {token}" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
};
```
</Tab>
<Tab name="Go"> ```go package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.canva.com/rest/v1/folders/{folderId}/items"
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))
}
```
</Tab>
<Tab name="PHP"> ```php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.canva.com/rest/v1/folders/{folderId}/items", 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;
}
```
</Tab>
<Tab name="Ruby"> ```ruby require 'net/http' require 'uri'
url = URI('https://api.canva.com/rest/v1/folders/{folderId}/items')
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
```
</Tab> </Tabs>
Success response
If successful, the endpoint returns a 200 response with a JSON body with the following parameters:
<Prop.List> <Prop name="items" type="FolderItemSummary[]" required mode="output"> An array of items in the folder.
<Tabs>
<Tab name="folder">
Details about the folder.
<Prop.List>
<Prop name="type" type="string" required mode="output">
<Prop.Extras>
**Available values:** The only valid value is `folder`.
</Prop.Extras>
</Prop>
<Prop name="folder" type="Folder" required mode="output">
The folder object, which contains metadata about the folder.
<PillAccordion title={<>Properties of <strong>folder</strong></>}>
<Prop.List>
<Prop name="id" type="string" required mode="output">
The folder ID.
</Prop>
<Prop name="name" type="string" required mode="output">
The folder name.
</Prop>
<Prop name="created_at" type="integer" required mode="output">
When the folder was created, as a Unix timestamp (in seconds since the
Unix Epoch).
</Prop>
<Prop name="updated_at" type="integer" required mode="output">
When the folder was last updated, as a Unix timestamp (in seconds since the
Unix Epoch).
</Prop>
<Prop name="thumbnail" type="Thumbnail" mode="output">
A thumbnail image representing the object.
<PillAccordion title={<>Properties of <strong>thumbnail</strong></>}>
<Prop.List>
<Prop name="width" type="integer" required mode="output">
The width of the thumbnail image in pixels.
</Prop>
<Prop name="height" type="integer" required mode="output">
The height of the thumbnail image in pixels.
</Prop>
<Prop name="url" type="string" required mode="output">
A URL for retrieving the thumbnail image.
This URL expires after 15 minutes. This URL includes a query string
that's required for retrieving the thumbnail.
</Prop>
</Prop.List>
</PillAccordion>
</Prop>
</Prop.List>
</PillAccordion>
</Prop>
</Prop.List>
</Tab>
<Tab name="design">
Details about the design.
<Prop.List>
<Prop name="type" type="string" required mode="output">
<Prop.Extras>
**Available values:** The only valid value is `design`.
</Prop.Extras>
</Prop>
<Prop name="design" type="DesignSummary" required mode="output">
Basic details about the design, such as the design's ID, title, and URL.
<PillAccordion title={<>Properties of <strong>design</strong></>}>
<Prop.List>
<Prop name="id" type="string" required mode="output">
The design ID.
</Prop>
<Prop name="urls" type="DesignLinks" required mode="output">
A temporary set of URLs for viewing or editing the design.
<PillAccordion title={<>Properties of <strong>urls</strong></>}>
<Prop.List>
<Prop name="edit_url" type="string" required mode="output">
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 workflows.
NOTE: This is not a permanent URL, it is only valid for 30 days.
</Prop>
<Prop name="view_url" type="string" required mode="output">
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 workflows.
NOTE: This is not a permanent URL, it is only valid for 30 days.
</Prop>
</Prop.List>
</PillAccordion>
</Prop>
<Prop name="created_at" type="integer" required mode="output">
When the design was created in Canva, as a Unix timestamp (in seconds since the Unix
Epoch).
</Prop>
<Prop name="updated_at" type="integer" required mode="output">
When the design was last updated in Canva, as a Unix timestamp (in seconds since the
Unix Epoch).
</Prop>
<Prop name="title" type="string" mode="output">
The design title.
</Prop>
<Prop name="url" type="string" mode="output">
URL of the design.
</Prop>
<Prop name="thumbnail" type="Thumbnail" mode="output">
A thumbnail image representing the object.
<PillAccordion title={<>Properties of <strong>thumbnail</strong></>}>
<Prop.List>
<Prop name="width" type="integer" required mode="output">
The width of the thumbnail image in pixels.
</Prop>
<Prop name="height" type="integer" required mode="output">
The height of the thumbnail image in pixels.
</Prop>
<Prop name="url" type="string" required mode="output">
A URL for retrieving the thumbnail image.
This URL expires after 15 minutes. This URL includes a query string
that's required for retrieving the thumbnail.
</Prop>
</Prop.List>
</PillAccordion>
</Prop>
<Prop name="page_count" type="integer" mode="output">
The total number of pages in the design. Some design types don't have pages (for example, Canva docs).
</Prop>
</Prop.List>
</PillAccordion>
</Prop>
</Prop.List>
</Tab>
<Tab name="image">
Details about the image asset.
<Prop.List>
<Prop name="type" type="string" required mode="output">
<Prop.Extras>
**Available values:** The only valid value is `image`.
</Prop.Extras>
</Prop>
<Prop name="image" type="AssetSummary" required mode="output">
An object representing an asset with associated metadata.
<PillAccordion title={<>Properties of <strong>image</strong></>}>
<Prop.List>
<Prop name="type" type="string" required mode="output">
Type of an asset.
<Prop.Extras>
**Available values:**
* `image`
* `video`
</Prop.Extras>
</Prop>
<Prop name="id" type="string" required mode="output">
The ID of the asset.
</Prop>
<Prop name="name" type="string" required mode="output">
The name of the asset.
</Prop>
<Prop name="tags" type="string[]" required mode="output">
The user-facing tags attached to the asset.
Users can add these tags to their uploaded assets, and they can search their uploaded
assets in the Canva UI by searching for these tags. For information on how users use
tags, see the
Canva Help Center page on asset tags.
</Prop>
<Prop name="created_at" type="integer" required mode="output">
When the asset was added to Canva, as a Unix timestamp (in seconds since the Unix
Epoch).
</Prop>
<Prop name="updated_at" type="integer" required mode="output">
When the asset was last updated in Canva, as a Unix timestamp (in seconds since the
Unix Epoch).
</Prop>
<Prop name="thumbnail" type="Thumbnail" mode="output">
A thumbnail image representing the object.
<PillAccordion title={<>Properties of <strong>thumbnail</strong></>}>
<Prop.List>
<Prop name="width" type="integer" required mode="output">
The width of the thumbnail image in pixels.
</Prop>
<Prop name="height" type="integer" required mode="output">
The height of the thumbnail image in pixels.
</Prop>
<Prop name="url" type="string" required mode="output">
A URL for retrieving the thumbnail image.
This URL expires after 15 minutes. This URL includes a query string
that's required for retrieving the thumbnail.
</Prop>
</Prop.List>
</PillAccordion>
</Prop>
</Prop.List>
</PillAccordion>
</Prop>
</Prop.List>
</Tab>
</Tabs>
</Prop>
<Prop name="continuation" type="string" mode="output"> If the success response contains a continuation token, the folder contains more items you can list. You can use this token as a query parameter and retrieve more items from the list, for example /v1/folders/{folderId}/items?continuation={continuation}.
To retrieve all the items in a folder, you might need to make multiple requests.
</Prop> </Prop.List>
Example response
json
{
"items": [
{
"type": "folder",
"folder": {
"id": "FAF2lZtloor",
"name": "My awesome holiday",
"created_at": 1377396000,
"updated_at": 1692928800,
"thumbnail": {
"width": 595,
"height": 335,
"url": "https://document-export.canva.com/Vczz9/zF9vzVtdADc/2/thumbnail/0001.png?<query-string>"
}
}
},
{
"type": "design",
"design": {
"id": "DAFVztcvd9z",
"title": "My summer holiday",
"url": "https://www.canva.com/design/DAFVztcvd9z/edit",
"thumbnail": {
"width": 595,
"height": 335,
"url": "https://document-export.canva.com/Vczz9/zF9vzVtdADc/2/thumbnail/0001.png?<query-string>"
},
"urls": {
"edit_url": "https://www.canva.com/api/design/eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIiwiZXhwaXJ5IjoxNzQyMDk5NDAzMDc5fQ..GKLx2hrJa3wSSDKQ.hk3HA59qJyxehR-ejzt2DThBW0cbRdMBz7Fb5uCpwD-4o485pCf4kcXt_ypUYX0qMHVeZ131YvfwGPIhbk-C245D8c12IIJSDbZUZTS7WiCOJZQ.sNz3mPSQxsETBvl_-upMYA/edit",
"view_url": "https://www.canva.com/api/design/eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIiwiZXhwaXJ5IjoxNzQyMDk5NDAzMDc5fQ..GKLx2hrJa3wSSDKQ.hk3HA59qJyxehR-ejzt2DThBW0cbRdMBz7Fb5uCpwD-4o485pCf4kcXt_ypUYX0qMHVeZ131YvfwGPIhbk-C245D8c12IIJSDbZUZTS7WiCOJZQ.sNz3mPSQxsETBvl_-upMYA/view"
},
"created_at": 1377396000,
"updated_at": 1692928800,
"page_count": 3
}
},
{
"type": "image",
"image": {
"type": "image",
"id": "Msd59349ff",
"name": "My Awesome Upload",
"tags": [
"image",
"holiday",
"best day ever"
],
"created_at": 1377396000,
"updated_at": 1692928800,
"thumbnail": {
"width": 595,
"height": 335,
"url": "https://document-export.canva.com/Vczz9/zF9vzVtdADc/2/thumbnail/0001.png?<query-string>"
}
}
}
],
"continuation": "RkFGMgXlsVTDbMd:MR3L0QjiaUzycIAjx0yMyuNiV0OildoiOwL0x32G4NjNu4FwtAQNxowUQNMMYN"
}Move Folder Item
Move an item from one folder to another.
Moves an item to another folder. You must specify the folder ID of the destination folder, as well as the ID of the item you want to move.
NOTE: In some situations, a single item can exist in multiple folders. If you attempt to move an item that exists in multiple folders, the API returns an item_in_multiple_folders error. In this case, you must use the Canva UI to move the item to another folder.
HTTP method and URL path
POST https://api.canva.com/rest/v1/folders/move
This operation is rate limited to 100 requests per minute for each user of your integration.
Authentication and authorization
This endpoint requires a valid access token that acts on behalf of a user.
Scopes
The access token must have all the following scopes (permissions):
folder:write
Header parameters
<Prop.List> <Prop name="Authorization" type="string" required> Provides credentials to authenticate the request, in the form of a Bearer token.
For example: `Authorization: Bearer {token}`
</Prop>
<Prop name="Content-Type" type="string" required> Indicates the media type of the information sent in the request. This must be set to application/json.
For example: `Content-Type: application/json`
</Prop> </Prop.List>
Body parameters
<Prop.List> <Prop name="to_folder_id" type="string" required> The ID of the folder you want to move the item to (the destination folder). If you want to move the item to the top level of a Canva user's projects, use the ID root.
<Prop.Extras>
**Minimum length:** `1`
**Maximum length:** `50`
</Prop.Extras>
</Prop>
<Prop name="item_id" type="string" required> The ID of the item you want to move. Currently, video assets are not supported.
<Prop.Extras>
**Minimum length:** `1`
**Maximum length:** `50`
</Prop.Extras>
</Prop> </Prop.List>
Example request
Examples for using the /v1/folders/move endpoint:
<Tabs storageKey="example.language" disableContentTransition> <Tab name="cURL"> sh curl --request POST 'https://api.canva.com/rest/v1/folders/move' \ --header 'Authorization: Bearer {token}' \ --header 'Content-Type: application/json' \ --data '{ "to_folder_id": "FAF2lZtloor", "item_id": "Msd59349ff" }' </Tab>
<Tab name="Node.js"> ```js const fetch = require("node-fetch");
fetch("https://api.canva.com/rest/v1/folders/move", {
method: "POST",
headers: {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
},
body: JSON.stringify({
"to_folder_id": "FAF2lZtloor",
"item_id": "Msd59349ff"
}),
})
.then(async (response) => {
const data = await response.json();
console.log(data);
})
.catch(err => console.error(err));
```
</Tab>
<Tab name="Java"> ```java 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/folders/move"))
.header("Authorization", "Bearer {token}")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\"to_folder_id\": \"FAF2lZtloor\", \"item_id\": \"Msd59349ff\"}"))
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(
request,
HttpResponse.BodyHandlers.ofString()
);
System.out.println(response.body());
}
}
```
</Tab>
<Tab name="Python"> ```py import requests
headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json"
}
data = {
"to_folder_id": "FAF2lZtloor",
"item_id": "Msd59349ff"
}
response = requests.post("https://api.canva.com/rest/v1/folders/move",
headers=headers,
json=data
)
print(response.json())
```
</Tab>
<Tab name="C#"> ```csharp using System.Net.Http;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("https://api.canva.com/rest/v1/folders/move"),
Headers =
{
{ "Authorization", "Bearer {token}" },
},
Content = new StringContent(
"{\"to_folder_id\": \"FAF2lZtloor\", \"item_id\": \"Msd59349ff\"}",
Encoding.UTF8,
"application/json"
),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
};
```
</Tab>
<Tab name="Go"> ```go package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader(`{
"to_folder_id": "FAF2lZtloor",
"item_id": "Msd59349ff"
}`)
url := "https://api.canva.com/rest/v1/folders/move"
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer {token}")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
```
</Tab>
<Tab name="PHP"> ```php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.canva.com/rest/v1/folders/move", CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => array( 'Authorization: Bearer {token}', 'Content-Type: application/json', ), CURLOPT_POSTFIELDS => json_encode([ "to_folder_id" => "FAF2lZtloor", "item_id" => "Msd59349ff" ]) ));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if (empty($err)) {
echo $response;
} else {
echo "Error: " . $err;
}
```
</Tab>
<Tab name="Ruby"> ```ruby require 'net/http' require 'uri'
url = URI('https://api.canva.com/rest/v1/folders/move')
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request['Authorization'] = 'Bearer {token}'
request['Content-Type'] = 'application/json'
request.body = <<REQUEST_BODY
{
"to_folder_id": "FAF2lZtloor",
"item_id": "Msd59349ff"
}
REQUEST_BODY
response = http.request(request)
puts response.read_body
```
</Tab> </Tabs>
Success response
If successful, the endpoint returns the status code 204 No content without a response body.