# Canva on boxd

> Canva offers a drag-and-drop design suite for creating social media graphics, presentations, and marketing materials with prebuilt templates and a vast element library.

- Page: https://boxd.sh/integrations/canva/
- CLI: `run canva` (48 commands, 23 marked common)
- SDK: `import { canva } from "@boxd/run"`; every parameter and response type is at `@boxd/run/canva`
- Triggers: none
- Connect: `run auth canva` (Sign in with Canva), or https://app.boxd.sh/integrations/detail/canva
- All integrations: https://boxd.sh/integrations/ (Markdown: https://boxd.sh/integrations/index.md)

## From the shell

```sh
run auth canva      # once: prints a link to connect your account
run canva           # list its commands
run canva list-user-designs
```

Parameters are flags (`--flag value`); object and array parameters take a JSON string. Output is YAML, or JSON with `--json`. Calls use your own connection; `--scope <name>` uses a connection shared with your team.

## From a script

```ts
import { every, canva } from "@boxd/run";

every("1 hour", async () => {
  const result = await canva.listUserDesigns({});
  console.log(result);
});
```

Run it with `run canva.run.ts`. Canva has no triggers; `every()` polls on a schedule, keeps the script running as a job, and wakes the machine when it is due.

## Commands

Required flags are listed; `run canva <command> --help` lists the optional ones. "common" marks what `run canva` shows without `--all`.

| Command | SDK method | Required flags | Optional | Description |
|---|---|---|---|---|
| `access-user-specific-brand-templates-list` | `canva.accessUserSpecificBrandTemplatesList()` | — | 5 | Lists brand templates available to the user (Canva Enterprise only) |
| `create-asset-upload-job` ·common | `canva.createAssetUploadJob()` | `--file` `--name` | 0 | Uploads an asset file to the user's Canva content library |
| `create-comment-reply-in-design` | `canva.createCommentReplyInDesign()` | `--attached-to` `--commentId` `--message` | 0 | This preview API allows replying to comments within a design on Canva, with a limit of 100 replies per comment |
| `create-design-comment-in-preview-api` ·common | `canva.createDesignCommentInPreviewApi()` | `--attached-to` `--design-id` `--message` | 1 | Creates a new comment thread on a Canva design |
| `create-design-export-job` ·common ·deprecated | `canva.createDesignExportJob()` | `--design-id` `--format` | 0 | Use post-exports instead |
| `create-design-import-job` ·common | `canva.createDesignImportJob()` | `--file` `--title` | 1 | Imports an external file as a new Canva design |
| `create-design-resize-job` ·common | `canva.createDesignResizeJob()` | `--design-id` `--design-type` | 0 | Creates a resized copy of an existing design (Canva Pro/Enterprise only) |
| `create-design-with-optional-asset` ·common ·deprecated | `canva.createDesignWithOptionalAsset()` | — | 3 | Use post-designs instead |
| `create-url-asset-upload-job` ·common | `canva.createUrlAssetUploadJob()` | `--name` `--url` | 0 | Create an asynchronous Canva asset import job from a public URL |
| `delete-asset-by-id` | `canva.deleteAssetById()` | `--assetId` | 0 | You can delete an asset by specifying its `assetId` |
| `exchange-oauth20-access-or-refresh-token` | `canva.exchangeOauth20AccessOrRefreshToken()` | — | 0 | The OAuth 2.0 endpoint issues time-limited (4-hour) access tokens of up to 4KB for user authorization via codes or refresh tokens |
| `fetch-asset-upload-job-status` ·common | `canva.fetchAssetUploadJobStatus()` | `--jobId` | 0 | Polls for asset upload job completion status |
| `fetch-connect-signing-public-keys` | `canva.fetchConnectSigningPublicKeys()` | — | 0 | The API for verifying Canva webhooks, 'connect/keys,' is in preview, meaning unstable, not for public integrations, and provides a rotating JWK for signature verification to prevent replay attacks |
| `fetch-current-user-details` ·common | `canva.fetchCurrentUserDetails()` | — | 0 | Returns the User ID, Team ID, and display name of the user account associated with the provided access token |
| `fetch-design-metadata-and-access-information` ·common | `canva.fetchDesignMetadataAndAccessInformation()` | `--designId` | 0 | Gets the metadata for a design |
| `get-design-comment-replies` | `canva.getDesignCommentReplies()` | `--designId` `--threadId` | 2 | Retrieves a list of replies for a comment or suggestion thread on a design |
| `get-design-comment-reply` | `canva.getDesignCommentReply()` | `--designId` `--replyId` `--threadId` | 0 | Retrieves a specific reply to a comment or suggestion thread on a design |
| `get-design-export-job-result` ·common | `canva.getDesignExportJobResult()` | `--exportId` | 0 | Polls for design export job completion status |
| `get-designs-designid-comments-threadid` | `canva.getDesignsDesignidCommentsThreadid()` | `--designId` `--threadId` | 0 | Retrieves metadata for a comment or suggestion thread on a design |
| `get-designs-designid-export-formats` ·common | `canva.getDesignsDesignidExportFormats()` | `--designId` | 0 | Lists available file formats for exporting a design |
| `get-url-asset-uploads-jobid` ·common | `canva.getUrlAssetUploadsJobid()` | `--jobId` | 0 | Retrieve the status and result of a URL-based asset upload job |
| `get-url-imports-jobid` ·common | `canva.getUrlImportsJobid()` | `--jobId` | 0 | Polls for URL import job completion status |
| `get-users-me-capabilities` ·common | `canva.getUsersMeCapabilities()` | — | 0 | Lists the API capabilities for the user account associated with the provided access token |
| `initiate-design-autofill-job` | `canva.initiateDesignAutofillJob()` | `--brand-template-id` `--data` | 1 | Upcoming brand template ID updates require migration within 6 months |
| `list-design-pages-with-pagination` | `canva.listDesignPagesWithPagination()` | `--designId` | 2 | Preview API for Canva: subject to unannounced changes and not for public integrations |
| `list-folder-items-by-type-with-sorting` | `canva.listFolderItemsByTypeWithSorting()` | `--folderId` | 3 | Lists the items in a folder, including each item's `type` |
| `list-user-designs` ·common | `canva.listUserDesigns()` | — | 4 | Provides a summary of Canva user designs, includes search filtering, and allows showing both self-created and shared designs with sorting options |
| `move-item-to-specified-folder` | `canva.moveItemToSpecifiedFolder()` | `--item-id` `--to-folder-id` | 0 | Transfers an item to a different folder by specifying both the destination folder's ID and the item's ID |
| `post-designs` ·common | `canva.postDesigns()` | `--design-type` | 2 | Creates a new Canva design with preset type or custom dimensions |
| `post-designs-designid-comments` | `canva.postDesignsDesignidComments()` | `--designId` `--message-plaintext` | 1 | Creates a comment thread on a Canva design |
| `post-designs-designid-comments-threadid-replies` | `canva.postDesignsDesignidCommentsThreadidReplies()` | `--design-id` `--message-plaintext` `--thread-id` | 0 | Create a reply to a comment or suggestion thread on a Canva design |
| `post-exports` ·common | `canva.postExports()` | `--design-id` `--format` | 0 | Starts a new asynchronous job to export a Canva design file |
| `post-folders` ·common | `canva.postFolders()` | `--name` `--parent-folder-id` | 0 | Create a folder in Canva |
| `post-url-imports` ·common | `canva.postUrlImports()` | `--title` `--url` | 1 | Start an asynchronous job to import an external file from a URL as a new design in Canva |
| `remove-folder-and-move-contents-to-trash` | `canva.removeFolderAndMoveContentsToTrash()` | `--folderId` | 0 | Deletes a folder by moving the user's content to Trash and reassigning other users' content to their top-level projects |
| `retrieve-app-public-key-set` | `canva.retrieveAppPublicKeySet()` | `--appId` | 0 | Returns the Json Web Key Set (public keys) of an app |
| `retrieve-asset-metadata-by-id` ·common | `canva.retrieveAssetMetadataById()` | `--assetId` | 0 | You can retrieve the metadata of an asset by specifying its `assetId` |
| `retrieve-brand-template-dataset-definition` | `canva.retrieveBrandTemplateDatasetDefinition()` | `--brandTemplateId` | 0 | Canva's brand template IDs will change later this year, including a 6-month integration migration |
| `retrieve-design-autofill-job-status` | `canva.retrieveDesignAutofillJobStatus()` | `--jobId` | 0 | API users with Canva Enterprise membership can retrieve design autofill job results, potentially requiring multiple requests until a `success` or `failed` status is received |
| `retrieve-design-import-job-status` ·common | `canva.retrieveDesignImportJobStatus()` | `--jobId` | 0 | Polls for design import job completion status |
| `retrieve-design-resize-job-status` ·common | `canva.retrieveDesignResizeJobStatus()` | `--job-id` | 0 | Retrieves the status and results of a design resize job |
| `retrieve-enterprise-brand-template-metadata` | `canva.retrieveEnterpriseBrandTemplateMetadata()` | `--brandTemplateId` | 0 | Upcoming update will change brand template IDs; integrations must migrate within 6 months |
| `retrieve-folder-details-by-id` | `canva.retrieveFolderDetailsById()` | `--folderId` | 0 | Gets the name and other details of a folder using a folder's `folderID` |
| `retrieve-user-profile-data` | `canva.retrieveUserProfileData()` | — | 0 | Currently, this returns the display name of the user account associated with the provided access token |
| `revoke-oauth-tokens` | `canva.revokeOauthTokens()` | `--token` | 2 | Revoke a refresh token to end its lineage and user consent, requiring re-authentication |
| `update-asset-s-name-and-tags-by-id` | `canva.updateAssetSNameAndTagsById()` | `--assetId` | 2 | You can update the name and tags of an asset by specifying its `assetId` |
| `update-folder-details-by-id` | `canva.updateFolderDetailsById()` | `--folderId` `--name` | 0 | Updates a folder's details using its `folderID` |
| `validate-oauth-token-properties` | `canva.validateOauthTokenProperties()` | `--token` | 2 | Check an access token's validity and properties via introspection, requiring authentication |

## Docs

- [run CLI](https://docs.boxd.sh/cli/run): Call connected integrations from the shell, connect new ones, and run automations.
- [Quickstart](https://docs.boxd.sh/guides/integrations/quickstart): Connect an integration, call it from the shell, and turn a script into an automation.
- [Connections](https://docs.boxd.sh/guides/integrations/connections): Connect an account once, for yourself or for your whole organization.
- [Scripts](https://docs.boxd.sh/guides/automations/scripts): Typed integrations, triggers, schedules and state in a .run.ts file.
- [Jobs](https://docs.boxd.sh/guides/automations/jobs): How a script becomes a background job: states, retries, sleep and wake.
- [Beyond the catalog](https://docs.boxd.sh/guides/automations/beyond-the-catalog): Reach your own APIs, databases and cloud accounts from a script.
