Doist Cards Reference


Doist Cards, which are returned in the response from the extension and rendered by the Todoist client for the user, are based on Adaptive Cards.

The Doist Cards schema is based on the Adaptive Cards schema and provides the elements currently supported in the Todoist clients. We aim for all current versions of Todoist clients to support the latest version of the Doist Cards schema.

Doist Cards Versions

Doist Cards VersionNotes
0.6Latest

How to Use

The spec below loosely follows the official Schema Explorer. It lists all the elements supported in Doist Cards SDKs. The Version column is the Doist Cards Version, not the Adaptive Cards version.

Card

PropertyRequiredDescriptionVersion

type

String

YesMust be "AdaptiveCard".0.6

$schema

String

YesMust be "http://adaptivecards.io/schemas/adaptive-card.json".0.6

doistCardVersion

String

YesDeclares compatibility with a specific version of Doist Cards. It is set to 0.6 on the latest Doist Card version.0.6

version

String

YesThe Adaptive Card schema version. It is set to 1.4 on the latest Doist Card version.0.6
bodyList of ElementsYesThe card elements to show in the primary card region.0.6
actionsList of ActionsNoThe actions to show in the card's bottom action bar.0.6

autoFocusId

String

NoThe ID of the input the card wishes to get focus when the card is rendered.0.6

Element

All Card ElementsContainers, and Inputs extend Element and support the below properties.

PropertyRequiredDescriptionVersion

id

String

NoA unique identifier associated with the item.0.6

spacing

Spacing

NoThe amount of spacing between this element and the preceding element.0.6

separator

Boolean

NoWhen true, draw a separating line between this element and the preceding element.0.6

Card Elements

TextBlock

PropertyRequiredDescriptionVersion

type

String

YesMust be "TextBlock".0.6

text

String

YesText to display.0.6

size

FontSize

NoFont size of the rendered text.0.6

isSubtle

Boolean

NoIf true, displays text slightly toned down to appear less prominent.0.6

horizontalAlignment

HorizontalAlignment

NoThe horizontal alignment of the TextBlock.0.6

weight

FontWeight

NoControls the weight of the TextBlock element.0.6

color

Color

NoControls the foreground color of the TextBlock element.0.6

wrap

Boolean

NoIf true, allow text to wrap. Otherwise, text is clipped.0.6

Image

PropertyRequiredDescriptionVersion

type

String

YesMust be "Image".0.6

url

String

YesThe URL to the image.0.6
selectActionActionNoAn Action that will be invoked when the Image is tapped or selected.0.6

width

String

NoThe desired on-screen width of the image, ending in px. E.g., 50px.0.6

height

String

NoThe desired height of the image. If specified as a pixel value, ending in px, E.g., 50px, the image will distort to fit that exact height.0.6

altText

String

NoAlternate text describing the image.0.6
aspectRatioNumberNoThe aspect ratio of the image if height/width are known.0.6

size

ImageSize

NoControls the approximate size of the image. The physical dimensions will vary per host.0.6

RichTextBlock

PropertyRequiredDescriptionVersion

type

String

YesMust be "RichTextBlock".0.6

inlines

List of Inlines

YesThe array of inlines.0.6

horizontalAlignment

HorizontalAlignment

NoThe horizontal alignment of the RichTextBlock.0.6

Inline

Inline can be of type String or TextRun.

TextRun

PropertyRequiredDescriptionVersion

type

String

YesMust be "TextRun".0.6

text

String

YesText to display.0.6

color

Color

NoControls the foreground color of the TextBlock element.0.6

size

FontSize

NoFont size of the rendered text.0.6

isSubtle

Boolean

NoIf true, displays text slightly toned down to appear less prominent.0.6

weight

FontWeight

NoControls the weight of the TextBlock element.0.6

selectAction

Action

NoAction to invoke when the TextRun is clicked. Visually changes the text run into a hyperlink.0.6

Containers

ActionSet

PropertyRequiredDescriptionVersion

type

String

YesMust be "ActionSet".0.6

actions

List of Actions

YesThe array of Action elements to show.0.6

horizontalAlignment

HorizontalAlignment

NoThe horizontal alignment of the ActionSet.0.6

Container

PropertyRequiredDescriptionVersion

type

String

YesMust be "Container".0.6

items

List of Elements

NoThe card elements to render inside the Container.0.6

selectAction

Action

NoAn Action that will be invoked when the Container is tapped or selected.0.6

minHeight

String

NoSpecifies the minimum height of the container in pixels, like "80px".0.6

backgroundImage

BackgroundImage

NoSpecifies the background image. Acceptable formats are PNG, JPEG, and GIF.0.6

verticalContentAlignment

VerticalContentAlignment

NoDefines how the content should be aligned vertically within the container. If not specified "top" is the default.0.6

bleed

Boolean

NoDetermines whether the element should bleed through its parent's padding.0.6

ColumnSet

PropertyRequiredDescriptionVersion

type

String

YesMust be "ColumnSet".0.6

columns

List of Columns

NoThe array of Column to divide the region into.0.6

horizontalAlignment

HorizontalAlignment

NoThe horizontal alignment of the ColumnSet.0.6

Column

PropertyRequiredDescriptionVersion

type

String

YesMust be "Column".0.6

items

List of Elements

NoThe card elements to render inside the Column.0.6

verticalContentAlignment

VerticalContentAlignment

NoDefines how the content should be aligned vertically within the column.0.6

width

String

NoEither "auto" or "stretch". Note that "3px" format might be supported in future versions of Doist Cards.0.6

selectAction

Action

NoAn Action that will be invoked when the Column is tapped.0.6

Actions

All Actions support the following properties:

PropertyRequiredDescriptionVersion

id

String

NoA unique identifier associated with the item.0.6

title

String

NoLabel for button or link that represents this action.0.6

iconUrl

String

NoOptional icon to be shown on the action in conjunction with the title. Supports data URI.0.6

style

ActionStyle

NoAppearance of the action.0.6

Action.Submit

PropertyRequiredDescriptionVersion

type

String

YesMust be "Action.Submit".0.6

data

String or Object

NoInitial data that input fields will be combined with. These are essentially "hidden" properties.0.6

associatedInputs

AssociatedInput

NoControls which inputs are associated with the submit action.Default is "Auto".0.6

Action.OpenUrl

PropertyRequiredDescriptionVersion

type

String

YesMust be "Action.OpenUrl".0.6

url

String

YesThe URL that will be opened when the action is invoked.0.6

Action.Clipboard

PropertyRequiredDescriptionVersion

type

String

YesMust be "Action.Clipboard".0.6

text

String

YesThe text that will be copied to the clipboard when the action is invoked.0.6

Inputs

Input.Text

PropertyRequiredDescriptionVersion

type

String

YesMust be "Input.Text".0.6

placeholder

String

NoDescription of the input desired. Displayed when no text has been input.0.6

inlineAction

Action

NoThe inline action for the input. Typically displayed to the right of the input. It is strongly recommended to provide an icon on the action (which will be displayed instead of the title of the action).0.6

label

String

NoLabel for this input.0.6

isRequired

Boolean

NoWhether or not this input is required.0.6

errorMessage

String

NoError message to display when entered input is invalid.0.6

rows

Number

NoThe number of rows a multi-line text input should display.0.6

inputStyle

InputStyle

NoThe style the text input should display as.0.6

value

String

NoThe initial value for this field.0.6

regex

String

NoRegular expression indicating the required format of this text input.0.6

Input.Date

PropertyRequiredDescriptionVersion

type

String

YesMust be "Input.Date".0.6

label

String

NoLabel for this input.0.6

isRequired

Boolean

NoWhether or not this input is required.0.6

errorMessage

String

NoError message to display when entered input is invalid.0.6

value

String

NoThe initial value for this field, in the format YYYY-MM-DD.0.6

min

String

NoThe minimum inclusive value for the field, in the format YYYY-MM-DD.0.6

max

String

NoThe maximum inclusive value for the field, in the format YYYY-MM-DD.0.6

Input.Time

PropertyRequiredDescriptionVersion

type

String

YesMust be "Input.Time".0.6

label

String

NoLabel for this input.0.6

isRequired

Boolean

NoWhether or not this input is required.0.6

errorMessage

String

NoError message to display when entered input is invalid.0.6

value

String

NoThe initial value for this field, in the format HH:mm.0.6

Input.ChoiceSet

PropertyRequiredDescriptionVersion

type

String

YesMust be "Input.ChoiceSet".0.6

label

String

NoLabel for this input.0.6

isRequired

Boolean

NoWhether or not this input is required.0.6

errorMessage

String

NoError message to display when entered input is invalid.0.6

value

String

NoThevalueof the initial choice.0.6

choices

Object

YesAn array of Choices0.6

selectAction

Action

NoAn Action that will be invoked when the selection is changed.0.6

isSearchable

Boolean

NoSets whether this list of choices is searchable and the text value can be free-form.0.6

style

ChoiceInputStyle

NoSets what style the ChoiceSet should use. Default is compact.0.6

orientation

Orientation

NoSets what style the ChoiceSet should use. Default is compact.0.6

Choice

Describes a choice for use in a ChoiceSet.

PropertyRequiredDescriptionVersion

title

String

YesText to display.0.6

value

String

NoThe raw value of the choice.0.6

disabled

Boolean

NoIf true, the option will render as disabled.0.6

Input.Toggle

PropertyRequiredDescriptionVersion

type

String

YesMust be "Input.Toggle".0.6

title

String

YesTitle for the toggle.0.6

id

String

YesUnique identifier for the value. Used to identify collected input when the Submit action is performed.0.6

value

String

NoThe initial selected value. This will return "true" or "false". If you want the toggle to be initially on, set this to "true".0.6

wrap

Boolean

NoIf true, allw text to wrap, otherwise text is clipped.0.6

label

String

NoLabel for this input.0.6

isRequired

Boolean

NoWhether or not this input is required.0.6

errorMessage

String

NoError message to display when entered input is invalid.0.6

selectAction

Action

NoAn Action that will be invoked when the checked status is changed.0.6

Types

BackgroundImage

ValueRequiredDescriptionVersion

url

String

YesURL of the background image.0.6

fillMode

ImageFillMode

NoDescribes how the image should fill the area. If none specified, cover is applied.0.6

Enums

Spacing

Please note: The values sent for this are case insensitive

ValueVersion
default0.6
none0.6
small0.6
medium0.6
large0.6

HorizontalAlignment

Please note: The values sent for this are case insensitive

ValueVersion
left0.6
center0.6
right0.6

VerticalContentAlignment

Please note: The values sent for this are case insensitive

ValueVersion
top0.6
center0.6
bottom0.6

FontWeight

Please note: The values sent for this are case insensitive

ValueVersion
lighter0.6
default0.6
bolder0.6

FontSize

Please note: The values sent for this are case insensitive

ValueVersion
default0.6
small0.6
medium0.6
large0.6
extraLarge0.6

Color

Please note: The values sent for this are case insensitive

ValueVersion
default0.6
dark0.6
light0.6
accent0.6
good0.6
warning0.6
attention0.6

ImageFillMode

Please note: The values sent for this are case insensitive

ValueDescriptionVersion
coverThe background image covers the entire width of the container. Its aspect ratio is preserved. Content may be clipped if the aspect ratio of the image doesn't match the aspect ratio of the container. verticalAlignment is respected (horizontalAlignment is meaningless since it's stretched width). This is the default mode and is the equivalent to the current model.0.6
repeatThe background image isn't stretched. It is repeated first in the x axis then in the y axis as many times as necessary to cover the entire container. Both horizontalAlignment and verticalAlignment are honored (defaults are left and top).0.6

ActionStyle

Please note: The values sent for this are case insensitive

ValueDescriptionVersion
defaultAction is displayed as normal.0.6
positiveAction is displayed with a positive style (typically the button becomes accent color).0.6
destructiveAction is displayed with a destructive style (typically a red, warning-like design).0.6

InputStyle

Please note: The values sent for this are case insensitive

ValueDescriptionVersion
textThis is a regular text input.0.6
telThis is a number (eg, telephone) input.0.6
emailThis is an email input.0.6
urlThis is a URL input.0.6
searchThis is a search box input.0.6

ImageSize

Please note: The values sent for this are case insensitive

ValueDescriptionVersion
autoImage will scale down to fit if needed, but will not scale up to fill the area.0.6
stretchImage with both scale down and up to fit as needed.0.6
smallImage is displayed with a fixed small width, where the width is determined by the host.0.6
mediumImage is displayed with a fixed medium width, where the width is determined by the host.0.6
largeImage is displayed with a fixed large width, where the width is determined by the host.0.6

ChoiceInputStyle

ValueDescriptionVersion
compactThis will make the choices appear as a dropdown.0.6
expandedThis will make the choices appear as radio buttons, only applies if isMultiSelect is false.0.6

Orientation

ValueDescriptionVersion
verticalHas a vertical orientation.0.6
horizontalHas a horizontal orientation.0.6

AssociatedInput

ValueDescriptionVersion
autoInputs on the current card and any parent cards will be validated and submitted for this Action.0.6
noneNone of the inputs will be validated or submitted for this Action.0.6
ignorevalidationIgnores any validation but still submits the input values for the Action.

Get in touch

If you still have questions about Doist cards or want to learn more, get in touch with us. We –  Dermot, Galina, Samara, and any of our other teammates – are more than happy to help!

We respect your privacy

We use cookies to improve our site and how we market Todoist. Select your preference, and we’ll remember your choice.