The Canva Apps SDK, Connect APIs, and MCP are now unified in the Canva Developers SDK. Learn more(opens in a new tab or window).
Canva Developers SDK
The Canva Apps SDK, Connect APIs, and MCP are now unified in the Canva Developers SDK. Learn more(opens in a new tab or window).

Automate marketing campaigns with Canva

Learn how to connect your marketing platform to Canva and automate content creation workflows

The Nourish app in action

Marketing teams juggle dozens of campaigns, each requiring on-brand assets across multiple channels. By integrating Canva into your platform using the Canva REST APIs, you can automate content creation, letting marketers generate campaign materials directly from your platform.

This app uses Brand Templates and Autofill, which require a Canva Enterprise(opens in a new tab or window) subscription. See the Autofill guide for details on requesting development access.

This guide walks you through a reference demo that shows these integration patterns in action. You'll see how to connect your platform to Canva, autofill templates with campaign data, and streamline your marketing workflows.

The Nourish demo is a reference implementation for learning purposes. Use it to understand the integration patterns you can apply to your own platform.

What you can automate

With the REST APIs, your marketing platform can:

  • OAuth authentication: Securely connect a user's Canva account to your platform.
  • Brand templates: Fetch and display templates from a user's Canva Brand Kit.
  • Autofill: Automatically populate templates with campaign data, product information, and images.
  • Design creation: Generate Canva designs programmatically from your platform.
  • Return navigation: Allow users to return to your platform after editing in Canva.

Prerequisites

Before starting, ensure you have:

Step 1: Create an app and enable the REST APIs

  1. Open Your apps(opens in a new tab or window) in the Developer Portal and click Create an app.

  2. In the modal:

    • Enter an App name, using 18 characters or fewer.
    • Under Who can use your app?, choose Public or Private. Private is only available on a Canva Enterprise plan. This can't be changed later.
    • Accept the Developer Terms.
    • Click Create app.

You land on the app's Overview page, which summarizes the app and links to the setup for each surface.

  1. Go to Outside Canva and click Start integrating.

    Until you do this, Outside Canva has no Configuration or Redirect URLs beneath it. Canva creates an auth client for your app and takes you to Configuration.

  2. On Outside Canva > Configuration, under Integration methods, check that Canva REST APIs is turned on.

    The Scopes, REST API version, and Return navigation settings are all inside this section, so they're only available while it's turned on.

  3. On the same page, under Credentials:

    • Note the Client ID. You'll need it to request an access token.
    • Click Generate secret, then store the secret somewhere secure. It isn't shown again.

Treat the client secret like a password. Don't commit it to source control, and don't include it in a client-side bundle.

  1. On Outside Canva > Configuration, under Scopes, enable:

    • asset: Read and Write
    • brandtemplate:content: Read
    • brandtemplate:meta: Read
    • design:content: Read and Write
    • design:meta: Read
    • profile: Read
  2. On Outside Canva > Redirect URLs, set URL 1 to:

    http://127.0.0.1:3001/oauth/redirect
  3. On Outside Canva > Configuration > Return navigation, turn on the toggle and set the Return URL to:

    http://127.0.0.1:3001/return-nav

Step 2: Clone and configure the demo

The starter kits for apps inside Canva (previously known as the Apps SDK) and the Canva REST APIs (previously known as the Connect APIs) are being combined in a future update. The steps here continue to work until that happens, and will be updated in the future.

  1. Clone the starter kit for the Canva REST APIs(opens in a new tab or window):

    git clone https://github.com/canva-sdks/canva-connect-api-starter-kit.git
    cd canva-connect-api-starter-kit
    SHELL
  2. Install dependencies:

    npm install
    cd demos/ecommerce_shop
    SHELL
  3. Configure your environment variables in the demos/ecommerce_shop/.env file:

    • DATABASE_ENCRYPTION_KEY: Automatically generated during installation. If missing, run npm run generate:db-key.
    • CANVA_CLIENT_ID: Your Client ID from Step 1.
    • CANVA_CLIENT_SECRET: Your client secret from Step 1.

Step 3: Set up brand templates

To use the autofill functionality, you need Brand Templates in your Canva account:

  1. Open the sample Brand Template deck(opens in a new tab or window).
  2. Click Use template to add the templates to your Canva account.
  3. Ensure the templates are saved to your Brand Kit.

Step 4: Run the demo

  1. Start the application:

    npm start
    SHELL
  2. Open http://127.0.0.1:3000(opens in a new tab or window) in your browser.

Access the app using 127.0.0.1:3000, not localhost:3000, to avoid CORS errors.

Using the demo

  1. Click Connect to Canva to authenticate with your Canva account.
  2. Browse campaigns on the Campaigns page.
  3. Select a campaign to create marketing materials.
  4. On the Configure design page:
    1. Choose a Brand Template.
    2. Select the campaign details and product information.
    3. Click Generate with Canva.
  5. The app validates the template fields, generates the design using autofill, and displays a preview.
  6. Click Edit in Canva to open the design in Canva's editor.

Integration patterns to apply

Use these patterns from the demo as a reference when integrating Canva into your own platform.

Authentication

The demo uses OAuth 2.0 with PKCE for secure authentication. Your backend should handle:

  • Generating authorization URLs with code challenges
  • Exchanging authorization codes for access tokens
  • Securely storing and refreshing tokens

For more information, see Authentication.

Autofill

Autofill lets you programmatically populate Brand Template fields with your data. On your platform, you would map your own data (such as campaign details, product information, or content from your CMS) to template placeholders.

For more information, see Autofill guide.

Return navigation

Return navigation allows users to return to your platform after editing a design in Canva. You can use this to update your UI with the edited design or trigger follow-up actions like publishing to social media or sending for approval.

For more information, see Return navigation guide.

Next steps