Rich text objects contain data for displaying formatted text, mentions, and equations. A rich text object also contains annotations for style information. Arrays of rich text objects are used within property objects and property value objects to create what a user sees as a single text value in Notion.

All rich text

Each rich text object contains the following keys. In addition, it must contain a key corresponding with the value of type. The value is an object containing type-specific configuration. The type-specific configurations are described in the sections below.

Property

Type

Description

Example value

plain_text

string

The plain text without annotations.

"Avocado Lovelace"

href

string (optional)

The URL of any link or internal Notion mention in this text, if any.

"https://www.notion.so/Avocado-d093f1d200464ce78b36e58a3f0d8043"

annotations

object

All annotations that apply to this rich text. Annotations include colors and bold/italics/underline/strikethrough.

type

string (enum)

Type of this rich text object. Possible values are: "text", "mention", "equation".

"text"

Annotations

Style information which applies to the whole rich text object.

Property

Type

Description

Example value

bold

boolean

Whether the text is bolded.

true

italic

boolean

Whether the text is italicized.

true

strikethrough

boolean

Whether the text is struck through.

false

underline

boolean

Whether the text is underlined.

false

code

boolean

Whether the text is code style.

true

color

string (enum)

Color of the text. Possible values are: "default", "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red", "gray_background", "brown_background", "orange_background", "yellow_background", "green_background", "blue_background", "purple_background", "pink_background", "red_background".

"green"

Text objects

Text objects contain the following information within the text property:

Property

Type

Description

Example value

content

string

Text content. This field contains the actual content of your text and is probably the field you'll use most often.

"Avocado Lovelace"

link

object (optional)

Any inline link in this text. See link objects.

Link objects

Text link objects contain a type key whose value is always "url" and a url key whose value is a web address.

Mention objects

Mention objects represent an inline mention of a user, page, database, or date. In the app these are created by typing @ followed by the name of a user, page, database, or a date.

Mention objects contain a type key. In addition, mention objects contain a key corresponding with the value of type. The value is an object containing type-specific configuration. The type-specific configurations are described in the sections below.

Property

Type

Description

Example value

type

string (enum)

Type of the inline mention. Possible values include: "user", "page", "database", "date", "link_preview".

"user"

User mentions

User mentions contain a user object within the user property.

Page mentions

Page mentions contain a page reference within the page property. A page reference is an object with an id property, with a string value (UUIDv4) corresponding to a page ID.

If an integration does not have access to the mentioned page, the mention will be returned with just the ID but without detailed information (title will appear as "Unititled" and annotations will be default).

Database mentions

Database mentions contain a database reference within the database property. A database reference is an object with an id property, with a string value (UUIDv4) corresponding to a database ID.

If an integration does not have access to the mentioned database, the mention will be returned with just the ID but without detailed information (title will appear as "Unititled" and annotations will be default).

Date mentions

Date mentions contain a date property value object within the date property.

Template mentions

Template mentions represent mentions within a template button or page that refer to a date or user upon duplication.

Template mentions contain a template_mention object with a nested type key that can be either "template_mention_date" or "template_mention_user".

If the type key is "template_mention_date", the template mention will contain the following property:

Property

Type

Description

Example value

template_mention_date

string (enum)

Type of the date mention. Possible values include: "today" and "now".

"today"

If the type key is "template_mention_user", the template mention will contain the following property:

Property

Type

Description

Example value

template_mention_user

string (enum)

Type of the user mention. The only possible value is "me".

"me"

Equation objects

Equation objects contain the following information within the equation property:

Property

Type

Description

Example value

expression

string

The LaTeX string representing this inline equation.

"\frac{{ - b \pm \sqrt {b^2 - 4ac} }}{{2a}}"

Link Preview mentions

Link preview mentions contain the originally pasted url.

Property

Type

Description

Example value

url

string

The originally pasted url used to create the mention

"https://github.com/example/example-repo/pull/1234"