Building Apps Inside Canva
|
This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production. |
This page was checked against the official developer documentation at https://www.canva.dev/docs/apps/ on 2026-11-07. It covers the first of the three surfaces of the Canva Developers SDK: Apps inside Canva, the surface that older tutorials call the "Apps SDK". The other two surfaces, the REST APIs (formerly the "Connect APIs") and the Canva MCP server for AI assistants, are covered on REST APIs and the Canva MCP server page; the map of all three is on Developer Platform Overview.
Building an app needs no particular Canva plan beyond a Canva account that can open the Developer Portal at https://www.canva.com/developers/apps, and Node.js 24 with npm 11 and git on your machine. Everything on this page is generally available except where a package or API is explicitly marked as preview or beta; the @canva/app-middleware package used for JWT verification is still a beta release (0.0.0-beta.10 on npm on 2026-11-07), and the documentation states that public apps cannot be released with preview APIs. Distribution can be public (the Apps Marketplace) or private (your team); publishing is covered on Publishing and Monetizing Apps. The version baseline of this page is @canva/cli 2.17.0, @canva/design 2.14.0, @canva/app-ui-kit 5.15.0 and @canva/app-scripts 1.1.2.
The running example is Bookshelf Covers, a small app for the Bookshelf launch campaign that lists book covers in the editor side panel and inserts the one you click, or drag, into the "Book of the week" design that you meet in Brand Templates, Controls and Approvals. It uses the Design Editor intent, the default intent for editing a design.
What an app inside Canva is
An app is a JavaScript bundle that Canva loads in an iframe, in the side panel of the editor (or, for some features, an overlay). The iframe cannot touch the editor directly. It talks to the editor through the SDK packages, and it can call your own backend with fetch. What the app is allowed to do is declared as permissions in its manifest, and what users see about it (name, description, screenshots, authentication providers) lives in the Developer Portal.
Four ideas hold the rest of the page together.
-
Intents are how an app tells Canva what kind of app it is. They are mandatory for new apps. The documented intents are Design Editor, Data Connector (tabular data), Content Publisher and URL Expander, and more are planned. Apps created before intents existed behave as Design Editor apps, and a migration exists for them (see the migration table below).
-
Packages are the SDK:
@canva/designfor editing,@canva/assetfor uploads,@canva/userfor tokens and monetization,@canva/platformfor platform features and notifications, and@canva/intentsfor registering intents. -
Permissions are declared in
canva-app.jsonand checked by Canva. -
The App UI Kit,
@canva/app-ui-kit, is the React component library whose look matches the editor.
Source: Canva Developers: Apps inside Canva and Intents
Core packages at a glance
| Package | Version on 2026-11-07 | What you use it for |
|---|---|---|
|
2.17.0 |
The |
|
2.14.0 |
|
|
2.4.0 |
|
|
2.3.0 |
|
|
2.2.3 |
Feature support checks, toasts, opening external URLs |
|
2.8.0 |
|
|
5.15.0 |
React components and |
|
1.1.2 |
The build and dev server behind |
|
0.0.0-beta.10 |
Beta: JWT verification for Express and other backends |
Source: Canva Developers: API reference; versions from the npm registry on 2026-11-07
The Canva CLI
The CLI is the control centre of the workflow. Install it globally and log in once; the login opens a browser by default, and --mode manual is available for machines without one. The CLI can keep several named profiles, selected with canva profile switch or the CANVA_CLI_PROFILE environment variable.
npm install -g @canva/cli@latest
canva login
canva apps create "Bookshelf Covers" --template="hello_world" --distribution="public" --git --installDependencies
cd bookshelf-covers
canva apps start
Source: Canva Developers: Canva CLI
Choose the distribution carefully: the documentation states that --distribution (public or private) cannot be changed after the app is created. The commands you will use are the following.
| Command | What it does |
|---|---|
|
Scaffolds an app from a template; flags include |
|
Starts the development server; flags include |
|
Opens the app in the editor or in Canva AI; flags include |
|
Checks the project; with |
|
Produces the production JavaScript bundle |
|
Uploads the built bundle; |
|
Syncs the portal configuration with |
|
Runs a code migration, with |
|
Calls the REST APIs with your CLI login and prints JSON (see REST APIs) |
|
Starts the Dev MCP server for AI coding assistants (see Developer Platform Overview) |
The migration names documented by the CLI are apps-sdk-v1-v2, app-ui-kit-v5, design-editor-intent and webpack-to-app-scripts. They are the quickest route for an app written against the Apps SDK of earlier years: run each with --dry-run first, then without.
Templates, the starter kit and app scripts
canva apps create --template accepts the documented templates: hello world, data connector, content publisher, digital asset management, generative AI and multiple listing service. The hello world template is the right start for Bookshelf Covers. There is also an open-source starter kit at https://github.com/canva-sdks/canva-apps-sdk-starter-kit that bundles many feature examples; its scripts call npx @canva/cli apps start and npx @canva/cli apps build.
@canva/app-scripts is the build tool underneath. It reached 1.0.0 as generally available on 2026-08-12 and bundles with Rsbuild by default, with an opt-in webpack mode. You normally never configure it. When you must, add a canva-app.config.ts that exports defineConfig from @canva/app-scripts with entry points, an optional backend entry and the bundler choice. Apps still on a hand-written webpack setup should use the webpack-to-app-scripts migration.
Source: Canva Developers: App templates, Starter kit and Canva App Scripts
The manifest and permissions
canva-app.json is the manifest. It carries a $schema URL, the manifest_schema_version, the runtime permissions and which intents the app is enrolled in. Listing details and OAuth settings are not in the manifest; they stay in the Developer Portal.
Bookshelf Covers inserts images, so it needs two permissions, and it enrols in the Design Editor intent.
{
"$schema": "https://www.canva.dev/schemas/app/v1/manifest-schema.json",
"manifest_schema_version": 1,
"runtime": {
"permissions": [
{ "name": "canva:design:content:write", "type": "mandatory" },
{ "name": "canva:asset:private:write", "type": "mandatory" }
]
},
"intent": {
"design_editor": {
"enrolled": true
}
}
}
The permissions documented for apps inside Canva are in the next table. Request only what you use: reviewers check this, and a smaller list is easier to explain to users.
| Permission | Lets the app |
|---|---|
|
Read the content of a design |
|
Add and change content in a design |
|
Read the user’s private assets |
|
Upload assets to the user’s library |
|
Read Brand Kit information |
|
Read brand templates |
The Design Editor intent
An intent is registered once, as soon as the app loads, by calling its prepare function with a render method. Canva calls render when the user opens the app. Three rules from the documentation prevent most first-day bugs: register synchronously at load, do not draw any UI at load, and do not create global state. The recommended layout is src/intents/<intent>/index.tsx for each intent and a root src/index.tsx that registers them all.
// src/index.tsx
import { prepareDesignEditor } from "@canva/intents/design";
import designEditor from "./intents/design_editor";
prepareDesignEditor(designEditor);
Source: Canva Developers: Intents
// src/intents/design_editor/index.tsx
import { AppUiProvider } from "@canva/app-ui-kit";
import "@canva/app-ui-kit/styles.css";
import type { DesignEditorIntent } from "@canva/intents/design";
import { createRoot } from "react-dom/client";
import { App } from "./app";
async function render() {
const root = document.getElementById("root");
if (!root) {
throw new Error("Root element not found");
}
createRoot(root).render(
<AppUiProvider>
<App />
</AppUiProvider>,
);
}
const designEditor: DesignEditorIntent = { render };
export default designEditor;
The App UI Kit components, tokens and patterns are browsed in the kit’s own Storybook linked from App UI Kit. For the general React and component-library ideas behind it, see the React section of this documentation site.
Editing the design
The Design Editing API is the way an app reads and changes the open design. Everything goes through openDesign(context, callback). The context is either the current page or all pages, and the callback receives a session that holds a snapshot of the page and a sync() method.
-
Changes to the snapshot reach the live design only when you call
sync(). Unsynced edits are discarded when the callback ends. -
Each
sync()is a separate undo step for the user, so batch edits and sync once. -
A session expires after one minute; finish quickly.
-
Only absolute pages (fixed or unbounded dimensions, such as presentation slides and whiteboards) can be read or edited. A page of type
unsupported, for example a Canva Doc, cannot. Checklockedon pages and elements first; editing a locked one throws. -
Multi-page editing became generally available in
@canva/design2.10.0 (2026-06-12), and page IDs were added in 2.12.0.
import { openDesign } from "@canva/design";
await openDesign({ type: "current_page" }, async (session) => {
if (session.page.type !== "absolute" || session.page.locked) {
return;
}
// change session.page.elements here, then commit once
await session.sync();
});
For simply adding one element you do not need a session: addElementAtPoint (or addElementAtCursor in a document context) from @canva/design places an image, text, shape, table, video or app element. The element guides at Creating images, Creating text and the sibling pages for shapes, tables and videos give each type’s properties.
Assets, drag and drop
Images that come from outside the editor must be uploaded to the user’s library before they can be placed. upload from @canva/asset takes the type, MIME type, a URL, a thumbnail URL and an AI disclosure value, and returns a reference you hand to addElementAtPoint. This needs both canva:design:content:write and canva:asset:private:write. Dragging uses ui.startDragToPoint for designs with absolute pages and ui.startDragToCursor for documents; wrap the check in useFeatureSupport from @canva/app-hooks (a package published only as a beta release so far), give the element the draggable attribute and always provide a click alternative, because the documentation says drag and drop must not be the only way to add content. The documentation describes the point and cursor variants in two places with opposite wording, so confirm the mapping on the feature support page before relying on it.
Authentication
Apps that call a backend, or a service that has users, must identify the person. The documentation offers three routes, shown below.
-
Frictionless is preferred. The app asks Canva for a user token with
auth.getCanvaUserToken()from@canva/user, sends it as a bearer token to your backend and the backend verifies it. -
OAuth connects the user to a third-party provider. It is configured under Inside Canva, Auth providers in the Developer Portal (the option appears only after the app has an intent), and the app calls
auth.initOauth(), thenrequestAuthorizationandgetAccessTokenon the returned object. Start the flow from a user action or fromrender, never when the module loads. -
Manual leaves everything to you.
The tokens are JWTs. A user token contains aud (the app ID), userId and brandId (the user’s team ID); a design token, from getDesignToken, contains aud and designId. Verify them only on the backend, never in the browser, and check the audience. The recommended library is @canva/app-middleware.
Source: Canva Developers: Authenticating users and Verifying JWTs
The Express middleware reads the JWKS keys for you and caches them for 60 minutes by default. For the surrounding Express patterns (CORS, routing, error handling), see the Express section.
// backend/server.ts
import express from "express";
import cors from "cors";
import { user } from "@canva/app-middleware/express";
const app = express();
app.use(cors({ origin: process.env.CANVA_APP_ORIGIN }));
app.use(user.verifyToken({ appId: process.env.CANVA_APP_ID as string }));
app.get("/api/covers", (_req, res) => {
res.json([
{ id: "midnight-library", title: "Midnight Library", url: "https://example.com/covers/midnight-library.jpg" },
{ id: "salt-and-sea", title: "Salt and Sea", url: "https://example.com/covers/salt-and-sea.jpg" },
]);
});
app.listen(3001);
Source: Canva Developers: user.verifyToken. The appId is read from the environment; the origin of your app is a value you set per environment (see Cross-origin resource sharing).
design.verifyToken works the same way for design tokens, but it has no default token extractor, so you must pass one (for example tokenExtractors.fromQuery("design_token")). The package is in preview: it may change without warning and public apps cannot ship using preview APIs until it is stable, so check its changelog before submitting.
Procedure: create, preview and upload Bookshelf Covers
This procedure takes the app from nothing to an uploaded bundle. It assumes Node.js 24, npm 11 and git are installed and that MFA is not required for apps (it is required only for the REST APIs).
-
Install the CLI with
npm install -g @canva/cli@latestand runcanva login. Approve the login in the browser tab that opens. -
Run
canva apps create "Bookshelf Covers" --template="hello_world" --distribution="public" --git --installDependencies. Pickprivateinstead if the app is only for your team; this cannot be changed later. -
Change into the new folder and run
canva apps start. The terminal prints the local development URL. -
In the Developer Portal, open the app, go to Inside Canva, Intents and set up the Design Editor intent (or enrol it in
canva-app.json, then runcanva apps config push). -
Open the app’s preview from the portal, or run
canva apps preview. The editor opens with Bookshelf Covers in the side panel. -
Edit the code; the preview reloads. Replace the hello world UI with the Bookshelf Covers component from the next procedure.
-
Run
canva apps doctorand apply--fixif it reports fixable problems. -
Run
canva apps build, thencanva apps upload --dry-runto rehearse andcanva apps uploadto upload the bundle. The bundle is now in the portal and not yet public; submission is a separate step on Publishing and Monetizing Apps.
Source: Canva Developers: Canva CLI, Previewing apps and Bundling apps
Procedure: build the Bookshelf Covers panel
This procedure writes the UI. The component lists covers from the backend, inserts one on click and makes each tile draggable.
-
Create
src/covers.tswith the cover type and a fetch helper that sends the user token. -
Create
src/intents/design_editor/app.tsxwith the component below. -
Run
canva apps start, open the preview, open a "Book of the week" design and click a cover. The cover appears on the page. -
Drag another tile onto the canvas to check the drag path, then press the undo shortcut of your platform (Command + Z on macOS, Ctrl + Z on Windows) to confirm that one insertion is one undo step.
// src/covers.ts
import { auth } from "@canva/user";
export type Cover = { id: string; title: string; url: string };
export async function loadCovers(backendHost: string): Promise<Cover[]> {
const token = await auth.getCanvaUserToken();
const response = await fetch(`${backendHost}/api/covers`, {
headers: { Authorization: `Bearer ${token}` },
});
if (!response.ok) {
throw new Error(`Cover list failed with status ${response.status}`);
}
return response.json();
}
// src/intents/design_editor/app.tsx
import { useEffect, useState } from "react";
import { Button, Rows, Text, Title } from "@canva/app-ui-kit";
import { upload } from "@canva/asset";
import { addElementAtPoint, ui } from "@canva/design";
import { loadCovers, type Cover } from "../../covers";
const BACKEND_HOST = "http://localhost:3001"; // set per environment
export function App() {
const [covers, setCovers] = useState<Cover[]>([]);
useEffect(() => {
loadCovers(BACKEND_HOST).then(setCovers);
}, []);
async function insert(cover: Cover) {
const result = await upload({
type: "image",
mimeType: "image/jpeg",
url: cover.url,
thumbnailUrl: cover.url,
aiDisclosure: "none",
});
await addElementAtPoint({ type: "image", ref: result.ref });
}
function onDragStart(event: React.DragEvent<HTMLElement>, cover: Cover) {
ui.startDragToPoint(event, {
type: "image",
resolveImageRef: () =>
upload({
type: "image",
mimeType: "image/jpeg",
url: cover.url,
thumbnailUrl: cover.url,
aiDisclosure: "none",
}),
previewUrl: cover.url,
previewSize: { width: 120, height: 180 },
fullSize: { width: 400, height: 600 },
});
}
return (
<Rows spacing="2u">
<Title size="small">Bookshelf Covers</Title>
<Text>Click a cover to add it, or drag it onto the page.</Text>
{covers.map((cover) => (
<div key={cover.id} draggable onDragStart={(e) => onDragStart(e, cover)}>
<Button variant="secondary" stretch onClick={() => insert(cover)}>
{cover.title}
</Button>
</div>
))}
</Rows>
);
}
Source: Canva Developers: Creating images and Supporting drag and drop. The drag payload fields follow the drag-and-drop page; check the API reference at Canva Developers: API reference for the exact types of your SDK version, and add ui.startDragToPoint behind useFeatureSupport as described above before shipping.
The aiDisclosure field accepts "none" (the app does not create or significantly alter the image with AI, or the image comes from third-party hosted content) or "app_generated". Covers from a library are "none"; use "app_generated" for anything an AI step produced, since the disclosure is shown to users.
Procedure: protect the cover endpoint
-
Create
backend/server.tsfrom the Express example above and store the app ID in theCANVA_APP_IDenvironment variable. Take the ID from the app’s page in the Developer Portal; never commit secrets, and never place a secret in the app bundle because the bundle is public. -
In
.envset the backend address the app should call, and make sure the CORS origin of the backend matches the origin Canva serves your app from. -
Start the backend and the app, open the preview and confirm that the cover list loads.
-
Call
/api/coverswithcurland noAuthorizationheader and confirm the backend refuses the request. -
Open the Network panel of the browser developer tools, select the request the app made and confirm it carries a bearer token that is never logged or stored by your code.
Testing
Unit tests run with Jest and React Testing Library. Each SDK package ships an initTestEnvironment helper in its test entry point so that your tests can call openDesign, upload and the other methods without a live editor; the test harness page walks through the setup, and the feature examples include UI and snapshot tests of App UI Kit screens. For Bookshelf Covers, test three things: the list renders the covers returned by a mocked loadCovers, a click calls upload and then addElementAtPoint with the returned reference, and the backend rejects a request that has no token. Run canva apps doctor as part of continuous integration as well.
Source: Canva Developers: Unit testing and Test harness
Desktop, mobile and other differences
-
Apps run in the web editor and in the desktop app; availability on the mobile apps varies by app and feature, so check the feature support APIs (
@canva/platform) rather than assuming. -
Some SDK methods work only for certain design types. Docs are the usual exception: the Design Editing API is not compatible with Canva Docs, and drag and drop uses the cursor variant there.
-
Keyboard shortcuts such as undo work as in the rest of the editor: Command + Z on macOS and Ctrl + Z on Windows.
-
Apps load in the editor also when the user is on the Free plan, but what your app is allowed to do depends on the permissions you declared and on the user’s own rights in the design; locked pages and elements throw when edited.
Pitfalls
-
Calling
prepareDesignEditorlate, twice or inside a React component: intents register once, at load. -
Forgetting
sync()and wondering why nothing changed, or callingsync()in a loop and flooding the undo history. -
Editing after the one-minute session expiry.
-
Requesting more permissions than the app uses, which slows review.
-
Verifying a JWT in the browser, or skipping the audience check.
-
Starting OAuth when the module loads instead of from
renderor a click. -
Treating
--distributionas reversible. -
Using
config pushwithout checkingconfig status: it replaces the whole portal configuration. -
Shipping a public app that depends on a preview API.
Recent changes
| Date | Change |
|---|---|
2026-06-12 |
Multi-page editing generally available in |
2026-08-12 |
|
2026-09-21 |
|
2026-10-28 |
|
2026-11-02 |
|
Older tutorials describe an "Apps SDK" with a hand-written webpack build, and apps that render without an intent. In the current documentation the Apps SDK is the Apps inside Canva surface of the Canva Developers SDK, intents are mandatory for new apps, and the build is @canva/app-scripts. The "Canva Button" from the same period is retired and is not part of the platform.
References
-
Canva Developers, Apps inside Canva: https://www.canva.dev/docs/apps/apps-inside-canva/
-
Canva Developers, Intents: https://www.canva.dev/docs/apps/intents/
-
Canva Developers, Canva CLI: https://www.canva.dev/docs/apps/canva-cli/
-
Canva Developers, canva-app.json: https://www.canva.dev/docs/apps/app-configuration/canva-app-json/
-
Canva Developers, Design Editing API: https://www.canva.dev/docs/apps/design-editing/
-
Canva Developers, Authenticating users: https://www.canva.dev/docs/apps/authenticating-users/
-
Canva Developers, Verifying JWTs: https://www.canva.dev/docs/apps/verifying-jwts/
-
Canva Developers, App UI Kit: https://www.canva.dev/docs/apps/app-ui-kit/
-
Canva Developers, Starter kit: https://www.canva.dev/docs/apps/setting-up-starter-kit/
-
Canva Developers, full documentation index: https://www.canva.dev/docs/apps/llms.txt
-
Developer Portal: https://www.canva.com/developers/apps