Skip to content

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.

&lt;Prop.Extras&gt;
  **Minimum length:** `1`

  **Maximum length:** `255`
&lt;/Prop.Extras&gt;

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

&lt;Prop.Extras&gt;
  **Minimum length:** `1`

  **Maximum length:** `50`
&lt;/Prop.Extras&gt;

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

&lt;PillAccordion title={&lt;&gt;Properties of &lt;strong&gt;folder&lt;/strong&gt;&lt;/&gt;} defaultExpanded={true}&gt;
  &lt;Prop.List&gt;
    &lt;Prop name="id" type="string" required mode="output"&gt;
      The folder ID.
    &lt;/Prop&gt;

    &lt;Prop name="name" type="string" required mode="output"&gt;
      The folder name.
    &lt;/Prop&gt;

    &lt;Prop name="created_at" type="integer" required mode="output"&gt;
      When the folder was created, as a Unix timestamp (in seconds since the
      Unix Epoch).
    &lt;/Prop&gt;

    &lt;Prop name="updated_at" type="integer" required mode="output"&gt;
      When the folder was last updated, as a Unix timestamp (in seconds since the
      Unix Epoch).
    &lt;/Prop&gt;

    &lt;Prop name="thumbnail" type="Thumbnail" mode="output"&gt;
      A thumbnail image representing the object.

      &lt;PillAccordion title={&lt;&gt;Properties of &lt;strong&gt;thumbnail&lt;/strong&gt;&lt;/&gt;}&gt;
        &lt;Prop.List&gt;
          &lt;Prop name="width" type="integer" required mode="output"&gt;
            The width of the thumbnail image in pixels.
          &lt;/Prop&gt;

          &lt;Prop name="height" type="integer" required mode="output"&gt;
            The height of the thumbnail image in pixels.
          &lt;/Prop&gt;

          &lt;Prop name="url" type="string" required mode="output"&gt;
            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.
          &lt;/Prop&gt;
        &lt;/Prop.List&gt;
      &lt;/PillAccordion&gt;
    &lt;/Prop&gt;
  &lt;/Prop.List&gt;
&lt;/PillAccordion&gt;

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

&lt;PillAccordion title={&lt;&gt;Properties of &lt;strong&gt;folder&lt;/strong&gt;&lt;/&gt;} defaultExpanded={true}&gt;
  &lt;Prop.List&gt;
    &lt;Prop name="id" type="string" required mode="output"&gt;
      The folder ID.
    &lt;/Prop&gt;

    &lt;Prop name="name" type="string" required mode="output"&gt;
      The folder name.
    &lt;/Prop&gt;

    &lt;Prop name="created_at" type="integer" required mode="output"&gt;
      When the folder was created, as a Unix timestamp (in seconds since the
      Unix Epoch).
    &lt;/Prop&gt;

    &lt;Prop name="updated_at" type="integer" required mode="output"&gt;
      When the folder was last updated, as a Unix timestamp (in seconds since the
      Unix Epoch).
    &lt;/Prop&gt;

    &lt;Prop name="thumbnail" type="Thumbnail" mode="output"&gt;
      A thumbnail image representing the object.

      &lt;PillAccordion title={&lt;&gt;Properties of &lt;strong&gt;thumbnail&lt;/strong&gt;&lt;/&gt;}&gt;
        &lt;Prop.List&gt;
          &lt;Prop name="width" type="integer" required mode="output"&gt;
            The width of the thumbnail image in pixels.
          &lt;/Prop&gt;

          &lt;Prop name="height" type="integer" required mode="output"&gt;
            The height of the thumbnail image in pixels.
          &lt;/Prop&gt;

          &lt;Prop name="url" type="string" required mode="output"&gt;
            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.
          &lt;/Prop&gt;
        &lt;/Prop.List&gt;
      &lt;/PillAccordion&gt;
    &lt;/Prop&gt;
  &lt;/Prop.List&gt;
&lt;/PillAccordion&gt;

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

&lt;Prop.Extras&gt;
  **Minimum length:** `1`

  **Maximum length:** `255`
&lt;/Prop.Extras&gt;

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

&lt;PillAccordion title={&lt;&gt;Properties of &lt;strong&gt;folder&lt;/strong&gt;&lt;/&gt;} defaultExpanded={true}&gt;
  &lt;Prop.List&gt;
    &lt;Prop name="id" type="string" required mode="output"&gt;
      The folder ID.
    &lt;/Prop&gt;

    &lt;Prop name="name" type="string" required mode="output"&gt;
      The folder name.
    &lt;/Prop&gt;

    &lt;Prop name="created_at" type="integer" required mode="output"&gt;
      When the folder was created, as a Unix timestamp (in seconds since the
      Unix Epoch).
    &lt;/Prop&gt;

    &lt;Prop name="updated_at" type="integer" required mode="output"&gt;
      When the folder was last updated, as a Unix timestamp (in seconds since the
      Unix Epoch).
    &lt;/Prop&gt;

    &lt;Prop name="thumbnail" type="Thumbnail" mode="output"&gt;
      A thumbnail image representing the object.

      &lt;PillAccordion title={&lt;&gt;Properties of &lt;strong&gt;thumbnail&lt;/strong&gt;&lt;/&gt;}&gt;
        &lt;Prop.List&gt;
          &lt;Prop name="width" type="integer" required mode="output"&gt;
            The width of the thumbnail image in pixels.
          &lt;/Prop&gt;

          &lt;Prop name="height" type="integer" required mode="output"&gt;
            The height of the thumbnail image in pixels.
          &lt;/Prop&gt;

          &lt;Prop name="url" type="string" required mode="output"&gt;
            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.
          &lt;/Prop&gt;
        &lt;/Prop.List&gt;
      &lt;/PillAccordion&gt;
    &lt;/Prop&gt;
  &lt;/Prop.List&gt;
&lt;/PillAccordion&gt;

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

&lt;Prop.Extras&gt;
  **Minimum:** `1`

  **Maximum:** `100`

  **Default value:** `50`
&lt;/Prop.Extras&gt;

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

&lt;Prop.Extras&gt;
  **Available values:**

  * `design`
  * `folder`
  * `image`
&lt;/Prop.Extras&gt;

</Prop>

<Prop name="sort_by" type="string"> Sort the list of folder items.

&lt;Prop.Extras&gt;
  **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.
&lt;/Prop.Extras&gt;

</Prop>

<Prop name="pin_status" type="string"> Filter folder items by their pinned status.

&lt;Prop.Extras&gt;
  **Default value:** `any`

  **Available values:**

  * `any`: Return all items regardless of pinned status (default).
  * `pinned`: Return only pinned items.
&lt;/Prop.Extras&gt;

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

&lt;Tabs&gt;
  &lt;Tab name="folder"&gt;
    Details about the folder.

    &lt;Prop.List&gt;
      &lt;Prop name="type" type="string" required mode="output"&gt;
        &lt;Prop.Extras&gt;
          **Available values:** The only valid value is `folder`.
        &lt;/Prop.Extras&gt;
      &lt;/Prop&gt;

      &lt;Prop name="folder" type="Folder" required mode="output"&gt;
        The folder object, which contains metadata about the folder.

        &lt;PillAccordion title={&lt;&gt;Properties of &lt;strong&gt;folder&lt;/strong&gt;&lt;/&gt;}&gt;
          &lt;Prop.List&gt;
            &lt;Prop name="id" type="string" required mode="output"&gt;
              The folder ID.
            &lt;/Prop&gt;

            &lt;Prop name="name" type="string" required mode="output"&gt;
              The folder name.
            &lt;/Prop&gt;

            &lt;Prop name="created_at" type="integer" required mode="output"&gt;
              When the folder was created, as a Unix timestamp (in seconds since the
              Unix Epoch).
            &lt;/Prop&gt;

            &lt;Prop name="updated_at" type="integer" required mode="output"&gt;
              When the folder was last updated, as a Unix timestamp (in seconds since the
              Unix Epoch).
            &lt;/Prop&gt;

            &lt;Prop name="thumbnail" type="Thumbnail" mode="output"&gt;
              A thumbnail image representing the object.

              &lt;PillAccordion title={&lt;&gt;Properties of &lt;strong&gt;thumbnail&lt;/strong&gt;&lt;/&gt;}&gt;
                &lt;Prop.List&gt;
                  &lt;Prop name="width" type="integer" required mode="output"&gt;
                    The width of the thumbnail image in pixels.
                  &lt;/Prop&gt;

                  &lt;Prop name="height" type="integer" required mode="output"&gt;
                    The height of the thumbnail image in pixels.
                  &lt;/Prop&gt;

                  &lt;Prop name="url" type="string" required mode="output"&gt;
                    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.
                  &lt;/Prop&gt;
                &lt;/Prop.List&gt;
              &lt;/PillAccordion&gt;
            &lt;/Prop&gt;
          &lt;/Prop.List&gt;
        &lt;/PillAccordion&gt;
      &lt;/Prop&gt;
    &lt;/Prop.List&gt;
  &lt;/Tab&gt;

  &lt;Tab name="design"&gt;
    Details about the design.

    &lt;Prop.List&gt;
      &lt;Prop name="type" type="string" required mode="output"&gt;
        &lt;Prop.Extras&gt;
          **Available values:** The only valid value is `design`.
        &lt;/Prop.Extras&gt;
      &lt;/Prop&gt;

      &lt;Prop name="design" type="DesignSummary" required mode="output"&gt;
        Basic details about the design, such as the design's ID, title, and URL.

        &lt;PillAccordion title={&lt;&gt;Properties of &lt;strong&gt;design&lt;/strong&gt;&lt;/&gt;}&gt;
          &lt;Prop.List&gt;
            &lt;Prop name="id" type="string" required mode="output"&gt;
              The design ID.
            &lt;/Prop&gt;

            &lt;Prop name="urls" type="DesignLinks" required mode="output"&gt;
              A temporary set of URLs for viewing or editing the design.

              &lt;PillAccordion title={&lt;&gt;Properties of &lt;strong&gt;urls&lt;/strong&gt;&lt;/&gt;}&gt;
                &lt;Prop.List&gt;
                  &lt;Prop name="edit_url" type="string" required mode="output"&gt;
                    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.
                  &lt;/Prop&gt;

                  &lt;Prop name="view_url" type="string" required mode="output"&gt;
                    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.
                  &lt;/Prop&gt;
                &lt;/Prop.List&gt;
              &lt;/PillAccordion&gt;
            &lt;/Prop&gt;

            &lt;Prop name="created_at" type="integer" required mode="output"&gt;
              When the design was created in Canva, as a Unix timestamp (in seconds since the Unix
              Epoch).
            &lt;/Prop&gt;

            &lt;Prop name="updated_at" type="integer" required mode="output"&gt;
              When the design was last updated in Canva, as a Unix timestamp (in seconds since the
              Unix Epoch).
            &lt;/Prop&gt;

            &lt;Prop name="title" type="string" mode="output"&gt;
              The design title.
            &lt;/Prop&gt;

            &lt;Prop name="url" type="string" mode="output"&gt;
              URL of the design.
            &lt;/Prop&gt;

            &lt;Prop name="thumbnail" type="Thumbnail" mode="output"&gt;
              A thumbnail image representing the object.

              &lt;PillAccordion title={&lt;&gt;Properties of &lt;strong&gt;thumbnail&lt;/strong&gt;&lt;/&gt;}&gt;
                &lt;Prop.List&gt;
                  &lt;Prop name="width" type="integer" required mode="output"&gt;
                    The width of the thumbnail image in pixels.
                  &lt;/Prop&gt;

                  &lt;Prop name="height" type="integer" required mode="output"&gt;
                    The height of the thumbnail image in pixels.
                  &lt;/Prop&gt;

                  &lt;Prop name="url" type="string" required mode="output"&gt;
                    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.
                  &lt;/Prop&gt;
                &lt;/Prop.List&gt;
              &lt;/PillAccordion&gt;
            &lt;/Prop&gt;

            &lt;Prop name="page_count" type="integer" mode="output"&gt;
              The total number of pages in the design. Some design types don't have pages (for example, Canva docs).
            &lt;/Prop&gt;
          &lt;/Prop.List&gt;
        &lt;/PillAccordion&gt;
      &lt;/Prop&gt;
    &lt;/Prop.List&gt;
  &lt;/Tab&gt;

  &lt;Tab name="image"&gt;
    Details about the image asset.

    &lt;Prop.List&gt;
      &lt;Prop name="type" type="string" required mode="output"&gt;
        &lt;Prop.Extras&gt;
          **Available values:** The only valid value is `image`.
        &lt;/Prop.Extras&gt;
      &lt;/Prop&gt;

      &lt;Prop name="image" type="AssetSummary" required mode="output"&gt;
        An object representing an asset with associated metadata.

        &lt;PillAccordion title={&lt;&gt;Properties of &lt;strong&gt;image&lt;/strong&gt;&lt;/&gt;}&gt;
          &lt;Prop.List&gt;
            &lt;Prop name="type" type="string" required mode="output"&gt;
              Type of an asset.

              &lt;Prop.Extras&gt;
                **Available values:**

                * `image`
                * `video`
              &lt;/Prop.Extras&gt;
            &lt;/Prop&gt;

            &lt;Prop name="id" type="string" required mode="output"&gt;
              The ID of the asset.
            &lt;/Prop&gt;

            &lt;Prop name="name" type="string" required mode="output"&gt;
              The name of the asset.
            &lt;/Prop&gt;

            &lt;Prop name="tags" type="string[]" required mode="output"&gt;
              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.
            &lt;/Prop&gt;

            &lt;Prop name="created_at" type="integer" required mode="output"&gt;
              When the asset was added to Canva, as a Unix timestamp (in seconds since the Unix
              Epoch).
            &lt;/Prop&gt;

            &lt;Prop name="updated_at" type="integer" required mode="output"&gt;
              When the asset was last updated in Canva, as a Unix timestamp (in seconds since the
              Unix Epoch).
            &lt;/Prop&gt;

            &lt;Prop name="thumbnail" type="Thumbnail" mode="output"&gt;
              A thumbnail image representing the object.

              &lt;PillAccordion title={&lt;&gt;Properties of &lt;strong&gt;thumbnail&lt;/strong&gt;&lt;/&gt;}&gt;
                &lt;Prop.List&gt;
                  &lt;Prop name="width" type="integer" required mode="output"&gt;
                    The width of the thumbnail image in pixels.
                  &lt;/Prop&gt;

                  &lt;Prop name="height" type="integer" required mode="output"&gt;
                    The height of the thumbnail image in pixels.
                  &lt;/Prop&gt;

                  &lt;Prop name="url" type="string" required mode="output"&gt;
                    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.
                  &lt;/Prop&gt;
                &lt;/Prop.List&gt;
              &lt;/PillAccordion&gt;
            &lt;/Prop&gt;
          &lt;/Prop.List&gt;
        &lt;/PillAccordion&gt;
      &lt;/Prop&gt;
    &lt;/Prop.List&gt;
  &lt;/Tab&gt;
&lt;/Tabs&gt;

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

&lt;Prop.Extras&gt;
  **Minimum length:** `1`

  **Maximum length:** `50`
&lt;/Prop.Extras&gt;

</Prop>

<Prop name="item_id" type="string" required> The ID of the item you want to move. Currently, video assets are not supported.

&lt;Prop.Extras&gt;
  **Minimum length:** `1`

  **Maximum length:** `50`
&lt;/Prop.Extras&gt;

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

Canva Developer Documentation SOP Site