Back

Canva API Essential Guide

Aug 7, 20246 minute read

What type of API does Canva provide?

Based on the search results provided, there is no specific information about what type of API Canva uses. The search results contain general information about different types of APIs like REST, GraphQL, SOAP, and gRPC, but do not mention Canva's API specifically.

The most common types of APIs used today are REST, GraphQL, SOAP, and gRPC. REST APIs are widely used for web and mobile applications due to their simplicity and scalability. GraphQL APIs have gained popularity recently for their flexibility in data fetching. SOAP APIs are still used in some enterprise environments. The choice of API type depends on the specific needs and requirements of the application.

When determining the API type of a specific service, always refer to the official documentation provided by the company. If the information is not publicly available, you may need to contact the company's developer support for accurate details about their API.

Does the Canva API have webhooks?

Yes, the official Canva API does have webhooks. Here are the key points about Canva's webhook functionality:

Webhook Support

  • Canva offers webhook notifications as a preview feature for their API.
  • Webhooks allow Canva to send real-time information to your integration without polling or manual intervention.

Event Types

You can subscribe to the following types of events via Canva webhooks:

  1. Comment
  2. Design access requested
  3. Design approval requested
  4. Design approval response
  5. Design approval reviewer invalidated
  6. Design mention
  7. Folder access requested
  8. Share design
  9. Share folder
  10. Team invite

How It Works

  1. An event occurs in Canva (e.g., a user comments on a design)
  2. Canva sends the event information to your integration as a POST request
  3. The request contains event details (e.g., comment content, timestamp, design ID)
  4. Your integration receives the request and sends a 200 status code back to Canva to confirm receipt

Required Scopes

To receive specific webhook notifications, you need to enable certain scopes for your integration:

  • Comments: collaboration:event, design:meta:read, comment:read
  • Design access requests: collaboration:event, design:meta:read
  • Design approvals: collaboration:event, design:meta:read
  • Design sharing events: collaboration:event, design:meta:read
  • Folder access requests: collaboration:event, folder:permission:write
  • Folder sharing events: collaboration:event, folder:read
  • Team access invitations: collaboration:event

Important Considerations

  • Webhook notifications are currently provided as a preview feature, which means there might be unannounced breaking changes.
  • Public integrations using preview features will not pass the review process and can't be made available to all Canva users.
  • Canva only supports outgoing webhooks.

By implementing webhooks, your integration can receive real-time updates from Canva and perform actions based on the event information, enabling more dynamic and responsive integrations with the Canva platform.

Rate Limits and other limitations

Here are the key points about the API rate limits for the Canva API:

Rate Limits

  • The Design Request Export API method has a rate limit of 10 requests every 10 seconds.

  • The Design Add Native Element API method has a rate limit of 20 requests every 10 seconds.

Key Considerations

  • Rate limits are applied on a per-method basis, with different limits for different API endpoints.

  • The limits are based on a fixed number of requests allowed within a 10 second time window.

  • Exceeding the rate limit will likely result in requests being throttled or rejected.

  • Applications should be prepared to handle rate limit errors and implement appropriate retry logic.

Best Practices

  • Implement request throttling on the client-side to stay within the rate limits.

  • Add delays between requests if making multiple calls in quick succession.

  • Monitor the rate limit headers returned in API responses to track remaining quota.

  • Consider caching data where possible to reduce the number of API calls needed.

  • Spread out requests over time rather than making many parallel requests.

It's important to note that these rate limits are specific to the Canva API. The search results also included information about Canvas LMS API throttling, but that is a separate system with different rate limiting mechanisms. When working with the Canva API, focus on adhering to the per-method rate limits specified in the Canva API documentation.

Latest API Version

Based on the search results provided, I can answer your question about the most recent version of the Canva API:

The Canva Connect APIs use a date-based versioning system. The most recent version is not explicitly stated in the search results. However, the documentation provides some key information about the API versioning:

API Versioning System

  1. Canva uses a date-based version for their Connect APIs.

  2. The version identifier is based on the change date, for example "2024-01-31".

  3. When a breaking change is made, a new Connect API version is released.

Key Points to Consider

  • Superseded versions of the API are expected to remain supported for at least 6 months before being deprecated and removed.

  • The version number included in endpoint paths (e.g., the 'v1' in https://api.canva.com/rest/v1/) is not used for the API versioning described. This is reserved for potential future epoch-level changes.

  • Breaking changes to APIs and features marked as "Beta" or "Preview" don't produce a new API version.

Managing API Versions

  • Canva plans to introduce a setting in the Canva Developer Portal to control which API version your integration uses by default.

  • Documentation for managing API versions will be provided before any additional Connect API versions are released.

Best Practices

  1. Keep an eye on the Canva Developer Portal for updates on new API versions.

  2. Check the Changelog regularly for a list of API versions and logs of breaking and non-breaking changes.

  3. When developing integrations, be prepared to update your code when new versions are released, especially if you're using features that might be affected by breaking changes.

While the exact most recent version is not provided, you can stay up-to-date with the latest API version by monitoring the Canva Developer Portal and checking the Changelog regularly.

How to get a Canva developer account and API Keys?

To get a developer account for Canva and create an API integration, you need to follow these steps:

1. Sign up for a Canva account

First, you need to sign up for a Canva.com account if you don't already have one.

2. Set up Multi-Factor Authentication (MFA)

Enable Multi-Factor Authentication (MFA) on your Canva account for enhanced security.

3. Create a Canva integration

To create a Canva integration:

  1. Go to the Canva Developers portal (https://www.canva.com/developers/).
  2. Choose between creating a public or private integration:
    • Public integrations are available to all Canva users but require review by Canva.
    • Private integrations are only available to your team on a Canva Enterprise plan.
  3. Agree to the Canva Developer Terms by selecting the checkbox.

4. Configure your integration

After creating the integration, you need to configure it:

  1. Set the integration name.
  2. Note down the Client ID provided.
  3. Generate a secret and save it securely.
  4. Set the required scopes for your integration. For example:
    • design:content (Read and Write)
    • design:meta (Read)
    • asset (Read and Write)
    • brandtemplate:meta (Read)
    • brandtemplate:content (Read)
    • profile (Read)
  5. Add an authentication URL (e.g., http://127.0.0.1:3001/oauth/redirect for local development).

5. Set up your development environment

To start developing your integration:

  1. Install git, Node.js (v20.14.0), and npm (v9 or v10).
  2. Clone the Canva Connect API Starter Kit repository:
    git clone https://github.com/canva-sdks/canva-connect-api-starter-kit.git
    
  3. Install dependencies:
    cd canva-connect-api-starter-kit
    npm install
    cd demos/ecommerce_shop
    npm install
    
  4. Configure the .env file with your integration settings (Client ID and Client Secret).

6. Develop and test your integration

Use the Starter Kit as a base for your integration. It includes an example app demonstrating the main features of the Connect APIs.

7. Submit for review (for public integrations)

If you're creating a public integration, you'll need to submit it for review by Canva and ensure it meets the integration requirements before it can be made available to all Canva users.

What can you do with the Canva API?

Based on the available information, here's a list of data models you can interact with using the Canva API, along with what is possible for each:

Assets

  • Upload assets to Canva
  • Sync assets between Canva and external systems

Designs

  • Create designs programmatically
  • Export finished designs
  • Sync designs between Canva and external systems

Comments

  • Create and sync comments

Brand Templates

  • Interact with brand templates

Folders

  • Manage folders for organizing assets and designs

Users

  • Retrieve user information

Autofill

  • Implement autofill functionality for designs

Design Imports

  • Import designs into Canva

Exports

  • Export designs from Canva

Webhooks

  • Receive webhook notifications for various events

Key points to consider:

  • The Canva Connect APIs allow integration of Canva's capabilities into external apps and platforms
  • Some APIs and features are provided as previews and are not recommended for production use
  • Integrations can be public (available to all Canva users) or private (available only to your team on a Canva Enterprise plan)

Best practices:

  • Use the Starter Kit repository provided by Canva to get started with the Connect APIs
  • Be aware of the limitations and potential changes in preview APIs
  • Follow the integration requirements for public integrations to be approved by Canva

It's important to note that the specific capabilities and endpoints for each data model may vary, and you should refer to the detailed API documentation for the most up-to-date and comprehensive information on interacting with these data models.