# REST Resource: notes

- [Resource: Note](https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Note)
  - [JSON representation](https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Note.SCHEMA_REPRESENTATION)
- [Attachment](https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Attachment)
  - [JSON representation](https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Attachment.SCHEMA_REPRESENTATION)
- [Permission](https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Permission)
  - [JSON representation](https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Permission.SCHEMA_REPRESENTATION)
- [Role](https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Role)
- [User](https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#User)
  - [JSON representation](https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#User.SCHEMA_REPRESENTATION)
- [Group](https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Group)
  - [JSON representation](https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Group.SCHEMA_REPRESENTATION)
- [Family](https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Family)
- [Section](https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Section)
  - [JSON representation](https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Section.SCHEMA_REPRESENTATION)
- [TextContent](https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#TextContent)
  - [JSON representation](https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#TextContent.SCHEMA_REPRESENTATION)
- [ListContent](https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#ListContent)
  - [JSON representation](https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#ListContent.SCHEMA_REPRESENTATION)
- [ListItem](https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#ListItem)
  - [JSON representation](https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#ListItem.SCHEMA_REPRESENTATION)
- [Methods](https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#METHODS_SUMMARY)

## Resource: Note

A single note.

| JSON representation |
|---|
| ``` { "name": string, "createTime": string, "updateTime": string, "trashTime": string, "trashed": boolean, "attachments": [ { object (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Attachment`) } ], "permissions": [ { object (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Permission`) } ], "title": string, "body": { object (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Section`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. The resource name of this note. See general note on identifiers in KeepService. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. When this note was created. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. When this note was last modified. |
| `trashTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. When this note was trashed. If `trashed`, the note is eventually deleted. If the note is not trashed, this field is not set (and the trashed field is `false`). |
| `trashed` | `boolean` Output only. `true` if this note has been trashed. If trashed, the note is eventually deleted. |
| `attachments[]` | ``object (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Attachment`)`` Output only. The attachments attached to this note. |
| `permissions[]` | ``object (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Permission`)`` Output only. The list of permissions set on the note. Contains at least one entry for the note owner. |
| `title` | `string` The title of the note. Length must be less than 1,000 characters. |
| `body` | ``object (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Section`)`` The body of the note. |

## Attachment

An attachment to a note.

| JSON representation |
|---|
| ``` { "name": string, "mimeType": [ string ] } ``` |

| Fields ||
|---|---|
| `name` | `string` The resource name; |
| `mimeType[]` | `string` The MIME types (IANA media types) in which the attachment is available. |

## Permission

A single permission on the note. Associates a `member` with a `role`.

| JSON representation |
|---|
| ``` { "name": string, "role": enum (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Role`), "email": string, "deleted": boolean, "user": { object (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#User`) }, "group": { object (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Group`) }, "family": { object (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Family`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. The resource name. |
| `role` | ``enum (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Role`)`` The role granted by this permission. The role determines the entity's ability to read, write, and share notes. |
| `email` | `string` The email associated with the member. If set on create, the `email` field in the `User` or `Group` message must either be empty or match this field. On read, may be unset if the member does not have an associated email. |
| `deleted` | `boolean` Output only. Whether this member has been deleted. If the member is recovered, this value is set to false and the recovered member retains the role on the note. |
| Union field `member`. Specifies the identity granted the role. Member is unset if the member has been deleted. `member` can be only one of the following: ||
| `user` | ``object (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#User`)`` Output only. The user to whom this role applies. |
| `group` | ``object (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Group`)`` Output only. The group to which this role applies. |
| `family` | ``object (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#Family`)`` Output only. The Google Family to which this role applies. |

## Role

Defines the various roles an entity can have.

| Enums ||
|---|---|
| `ROLE_UNSPECIFIED` | An undefined role. |
| `OWNER` | A role granting full access. This role cannot be added or removed. Defined by the creator of the note. |
| `WRITER` | A role granting the ability to contribute content and modify note permissions. |

## User

Describes a single user.

| JSON representation |
|---|
| ``` { "email": string } ``` |

| Fields ||
|---|---|
| `email` | `string` The user's email. |

## Group

Describes a single Group.

| JSON representation |
|---|
| ``` { "email": string } ``` |

| Fields ||
|---|---|
| `email` | `string` The group email. |

## Family

This type has no fields.
Describes a single Google Family.

## Section

The content of the note.

| JSON representation |
|---|
| ``` { "text": { object (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#TextContent`) }, "list": { object (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#ListContent`) } } ``` |

| Fields ||
|---|---|
| Union field `Content`. The section's content must be one of these value types. `Content` can be only one of the following: ||
| `text` | ``object (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#TextContent`)`` Used if this section's content is a block of text. The length of the text content must be less than 20,000 characters. |
| `list` | ``object (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#ListContent`)`` Used if this section's content is a list. |

## TextContent

The block of text for a single text section or list item.

| JSON representation |
|---|
| ``` { "text": string } ``` |

| Fields ||
|---|---|
| `text` | `string` The text of the note. The limits on this vary with the specific field using this type. |

## ListContent

The list of items for a single list note.

| JSON representation |
|---|
| ``` { "listItems": [ { object (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#ListItem`) } ] } ``` |

| Fields ||
|---|---|
| `listItems[]` | ``object (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#ListItem`)`` The items in the list. The number of items must be less than 1,000. |

## ListItem

A single list item in a note's list.

| JSON representation |
|---|
| ``` { "childListItems": [ { object (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#ListItem`) } ], "text": { object (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#TextContent`) }, "checked": boolean } ``` |

| Fields ||
|---|---|
| `childListItems[]` | ``object (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#ListItem`)`` If set, list of list items nested under this list item. Only one level of nesting is allowed. |
| `text` | ``object (`https://developers.google.com/workspace/keep/api/reference/rest/v1/notes#TextContent`)`` The text of this item. Length must be less than 1,000 characters. |
| `checked` | `boolean` Whether this item has been checked off or not. |

| ## Methods ||
|---|---|
| ### `https://developers.google.com/workspace/keep/api/reference/rest/v1/notes/create` | Creates a new note. |
| ### `https://developers.google.com/workspace/keep/api/reference/rest/v1/notes/delete` | Deletes a note. |
| ### `https://developers.google.com/workspace/keep/api/reference/rest/v1/notes/get` | Gets a note. |
| ### `https://developers.google.com/workspace/keep/api/reference/rest/v1/notes/list` | Lists notes. |