KosmoKrator

design

Canva Lua API for KosmoKrator Agents

Agent-facing Lua documentation and function reference for the Canva KosmoKrator integration.

7 functions 5 read 2 write Bearer token auth

Lua Namespace

Agents call this integration through app.integrations.canva.*. Use lua_read_doc("integrations.canva") inside KosmoKrator to discover the same reference at runtime.

Agent-Facing Lua Docs

This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.

Canva Integration

Tools

canva_list_designs

List designs the user has access to in Canva.

Parameters:

  • limit (integer, optional): Maximum number of designs to return (1–100, default 50).
  • continuation (string, optional): Cursor for pagination — pass the continuation token from a previous response.
  • query (string, optional): Search query to filter designs by title.
  • type (string, optional): Filter by design type (e.g., “presentation”, “poster”, “social_media”, “video”, “document”).

Returns: Array of design objects with titles and IDs.


canva_get_design

Get details of a specific Canva design.

Parameters:

  • design_id (string, required): The ID of the design to retrieve.

Returns: Design object with title, type, dimensions, and URLs.


canva_create_design

Create a new design in Canva.

Parameters:

  • title (string, required): The title for the new design.
  • type (string, optional): Design type (e.g., “presentation”, “poster”, “social_media”, “video”, “document”).
  • width (integer, optional): Width in pixels.
  • height (integer, optional): Height in pixels.

Returns: Created design object with ID and edit URL.


canva_list_folders

List folders the user has access to in Canva.

Parameters:

  • limit (integer, optional): Maximum number of folders to return (1–100, default 50).
  • continuation (string, optional): Cursor for pagination.

Returns: Array of folder objects with names and IDs.


canva_get_folder

Get details of a specific Canva folder.

Parameters:

  • folder_id (string, required): The ID of the folder to retrieve.

Returns: Folder object with name and contained items.


canva_upload_asset

Upload an asset to Canva from a URL.

Parameters:

  • file_url (string, required): The URL of the file to upload (must be publicly accessible).
  • name (string, required): The name for the uploaded asset.
  • folder_id (string, optional): Folder ID to upload the asset into.

Returns: Uploaded asset object with ID and metadata.


canva_get_current_user

Get the authenticated Canva user’s profile.

Parameters: None.

Returns: User object with display name and user ID.

Raw agent markdown
# Canva Integration

## Tools

### canva_list_designs

List designs the user has access to in Canva.

**Parameters:**
- `limit` (integer, optional): Maximum number of designs to return (1–100, default 50).
- `continuation` (string, optional): Cursor for pagination — pass the continuation token from a previous response.
- `query` (string, optional): Search query to filter designs by title.
- `type` (string, optional): Filter by design type (e.g., "presentation", "poster", "social_media", "video", "document").

**Returns:** Array of design objects with titles and IDs.

---

### canva_get_design

Get details of a specific Canva design.

**Parameters:**
- `design_id` (string, required): The ID of the design to retrieve.

**Returns:** Design object with title, type, dimensions, and URLs.

---

### canva_create_design

Create a new design in Canva.

**Parameters:**
- `title` (string, required): The title for the new design.
- `type` (string, optional): Design type (e.g., "presentation", "poster", "social_media", "video", "document").
- `width` (integer, optional): Width in pixels.
- `height` (integer, optional): Height in pixels.

**Returns:** Created design object with ID and edit URL.

---

### canva_list_folders

List folders the user has access to in Canva.

**Parameters:**
- `limit` (integer, optional): Maximum number of folders to return (1–100, default 50).
- `continuation` (string, optional): Cursor for pagination.

**Returns:** Array of folder objects with names and IDs.

---

### canva_get_folder

Get details of a specific Canva folder.

**Parameters:**
- `folder_id` (string, required): The ID of the folder to retrieve.

**Returns:** Folder object with name and contained items.

---

### canva_upload_asset

Upload an asset to Canva from a URL.

**Parameters:**
- `file_url` (string, required): The URL of the file to upload (must be publicly accessible).
- `name` (string, required): The name for the uploaded asset.
- `folder_id` (string, optional): Folder ID to upload the asset into.

**Returns:** Uploaded asset object with ID and metadata.

---

### canva_get_current_user

Get the authenticated Canva user's profile.

**Parameters:** None.

**Returns:** User object with display name and user ID.

Metadata-Derived Lua Example

local result = app.integrations.canva.canva_list_designs({
  limit = 1,
  continuation = "example_continuation",
  query = "example_query",
  type = "example_type"
})
print(result)

Functions

canva_list_designs

List designs the user has access to in Canva. Supports filtering by search query and design type. Returns design titles and IDs that can be used with canva_get_design.

Operation
Read read
Full name
canva.canva_list_designs
ParameterTypeRequiredDescription
limit integer no Maximum number of designs to return (1–100, default 50).
continuation string no Cursor for pagination — pass the continuation token from a previous response to get the next page.
query string no Search query to filter designs by title.
type string no Filter by design type (e.g., "presentation", "poster", "social_media", "video", "document").

canva_get_design

Get details of a specific Canva design by its ID, including title, type, dimensions, and URLs.

Operation
Read read
Full name
canva.canva_get_design
ParameterTypeRequiredDescription
design_id string yes The ID of the design to retrieve.

canva_create_design

Create a new design in Canva. Specify a title and optionally a type (e.g., "presentation", "poster") and dimensions (width/height in pixels).

Operation
Write write
Full name
canva.canva_create_design
ParameterTypeRequiredDescription
title string yes The title for the new design.
type string no The type of design to create (e.g., "presentation", "poster", "social_media", "video", "document").
width integer no Width of the design in pixels.
height integer no Height of the design in pixels.

canva_list_folders

List folders the user has access to in Canva. Returns folder names and IDs that can be used with canva_get_folder.

Operation
Read read
Full name
canva.canva_list_folders
ParameterTypeRequiredDescription
limit integer no Maximum number of folders to return (1–100, default 50).
continuation string no Cursor for pagination — pass the continuation token from a previous response to get the next page.

canva_get_folder

Get details of a specific Canva folder by its ID, including name and contained items.

Operation
Read read
Full name
canva.canva_get_folder
ParameterTypeRequiredDescription
folder_id string yes The ID of the folder to retrieve.

canva_upload_asset

Upload an asset to Canva from a URL. The file is imported into the user's Canva account and can optionally be placed in a specific folder.

Operation
Write write
Full name
canva.canva_upload_asset
ParameterTypeRequiredDescription
file_url string yes The URL of the file to upload (must be publicly accessible).
name string yes The name for the uploaded asset in Canva.
folder_id string no Optional folder ID to upload the asset into. Use canva_list_folders to find folder IDs.

canva_get_current_user

Get the authenticated Canva user's profile information, including display name and user ID.

Operation
Read read
Full name
canva.canva_get_current_user
ParameterTypeRequiredDescription
No parameters.