{
  "id": "keep:v1",
  "canonicalName": "Keep",
  "basePath": "",
  "resources": {
    "notes": {
      "resources": {
        "permissions": {
          "methods": {
            "batchDelete": {
              "scopes": [
                "https://www.googleapis.com/auth/keep"
              ],
              "httpMethod": "POST",
              "description": "Deletes one or more permissions on the note. The specified entities will immediately lose access. A permission with the `OWNER` role can't be removed. If removing a permission fails, then the entire request fails and no changes are made. Returns a 400 bad request error if a specified permission does not exist on the note.",
              "flatPath": "v1/notes/{notesId}/permissions:batchDelete",
              "response": {
                "$ref": "Empty"
              },
              "parameters": {
                "parent": {
                  "description": "The parent resource shared by all permissions being deleted. Format: `notes/{note}` If this is set, the parent of all of the permissions specified in the DeletePermissionRequest messages must match this field.",
                  "required": true,
                  "pattern": "^notes/[^/]+$",
                  "type": "string",
                  "location": "path"
                }
              },
              "id": "keep.notes.permissions.batchDelete",
              "parameterOrder": [
                "parent"
              ],
              "path": "v1/{+parent}/permissions:batchDelete",
              "request": {
                "$ref": "BatchDeletePermissionsRequest"
              }
            },
            "batchCreate": {
              "parameters": {
                "parent": {
                  "description": "The parent resource shared by all Permissions being created. Format: `notes/{note}` If this is set, the parent field in the CreatePermission messages must either be empty or match this field.",
                  "required": true,
                  "location": "path",
                  "pattern": "^notes/[^/]+$",
                  "type": "string"
                }
              },
              "parameterOrder": [
                "parent"
              ],
              "id": "keep.notes.permissions.batchCreate",
              "request": {
                "$ref": "BatchCreatePermissionsRequest"
              },
              "path": "v1/{+parent}/permissions:batchCreate",
              "scopes": [
                "https://www.googleapis.com/auth/keep"
              ],
              "flatPath": "v1/notes/{notesId}/permissions:batchCreate",
              "httpMethod": "POST",
              "description": "Creates one or more permissions on the note. Only permissions with the `WRITER` role may be created. If adding any permission fails, then the entire request fails and no changes are made.",
              "response": {
                "$ref": "BatchCreatePermissionsResponse"
              }
            }
          }
        }
      },
      "methods": {
        "get": {
          "path": "v1/{+name}",
          "parameters": {
            "name": {
              "description": "Required. Name of the resource.",
              "required": true,
              "pattern": "^notes/[^/]+$",
              "type": "string",
              "location": "path"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "id": "keep.notes.get",
          "response": {
            "$ref": "Note"
          },
          "scopes": [
            "https://www.googleapis.com/auth/keep",
            "https://www.googleapis.com/auth/keep.readonly"
          ],
          "flatPath": "v1/notes/{notesId}",
          "httpMethod": "GET",
          "description": "Gets a note."
        },
        "delete": {
          "id": "keep.notes.delete",
          "parameterOrder": [
            "name"
          ],
          "parameters": {
            "name": {
              "pattern": "^notes/[^/]+$",
              "type": "string",
              "location": "path",
              "description": "Required. Name of the note to delete.",
              "required": true
            }
          },
          "path": "v1/{+name}",
          "httpMethod": "DELETE",
          "description": "Deletes a note. Caller must have the `OWNER` role on the note to delete. Deleting a note removes the resource immediately and cannot be undone. Any collaborators will lose access to the note.",
          "flatPath": "v1/notes/{notesId}",
          "scopes": [
            "https://www.googleapis.com/auth/keep"
          ],
          "response": {
            "$ref": "Empty"
          }
        },
        "list": {
          "response": {
            "$ref": "ListNotesResponse"
          },
          "scopes": [
            "https://www.googleapis.com/auth/keep",
            "https://www.googleapis.com/auth/keep.readonly"
          ],
          "flatPath": "v1/notes",
          "httpMethod": "GET",
          "description": "Lists notes. Every list call returns a page of results with `page_size` as the upper bound of returned items. A `page_size` of zero allows the server to choose the upper bound. The ListNotesResponse contains at most `page_size` entries. If there are more things left to list, it provides a `next_page_token` value. (Page tokens are opaque values.) To get the next page of results, copy the result's `next_page_token` into the next request's `page_token`. Repeat until the `next_page_token` returned with a page of results is empty. ListNotes return consistent results in the face of concurrent changes, or signals that it cannot with an ABORTED error.",
          "path": "v1/notes",
          "parameters": {
            "filter": {
              "location": "query",
              "description": "Filter for list results. If no filter is supplied, the `trashed` filter is applied by default. Valid fields to filter by are: `create_time`, `update_time`, `trash_time`, and `trashed`. Filter syntax follows the [Google AIP filtering spec](https://aip.dev/160).",
              "type": "string"
            },
            "pageToken": {
              "location": "query",
              "type": "string",
              "description": "The previous page's `next_page_token` field."
            },
            "pageSize": {
              "location": "query",
              "description": "The maximum number of results to return.",
              "format": "int32",
              "type": "integer"
            }
          },
          "parameterOrder": [],
          "id": "keep.notes.list"
        },
        "create": {
          "response": {
            "$ref": "Note"
          },
          "httpMethod": "POST",
          "description": "Creates a new note.",
          "flatPath": "v1/notes",
          "scopes": [
            "https://www.googleapis.com/auth/keep"
          ],
          "path": "v1/notes",
          "request": {
            "$ref": "Note"
          },
          "id": "keep.notes.create",
          "parameterOrder": [],
          "parameters": {}
        }
      }
    },
    "media": {
      "methods": {
        "download": {
          "useMediaDownloadService": true,
          "parameters": {
            "name": {
              "type": "string",
              "pattern": "^notes/[^/]+/attachments/[^/]+$",
              "location": "path",
              "required": true,
              "description": "Required. The name of the attachment."
            },
            "mimeType": {
              "type": "string",
              "description": "The IANA MIME type format requested. The requested MIME type must be one specified in the attachment.mime_type. Required when downloading attachment media and ignored otherwise.",
              "location": "query"
            }
          },
          "supportsMediaDownload": true,
          "parameterOrder": [
            "name"
          ],
          "id": "keep.media.download",
          "path": "v1/{+name}",
          "scopes": [
            "https://www.googleapis.com/auth/keep",
            "https://www.googleapis.com/auth/keep.readonly"
          ],
          "flatPath": "v1/notes/{notesId}/attachments/{attachmentsId}",
          "httpMethod": "GET",
          "description": "Gets an attachment. To download attachment media via REST requires the alt=media query parameter. Returns a 400 bad request error if attachment media is not available in the requested MIME type.",
          "response": {
            "$ref": "Attachment"
          }
        }
      }
    }
  },
  "description": "The Google Keep API is used in an enterprise environment to manage Google Keep content and resolve issues identified by cloud security software.",
  "schemas": {
    "User": {
      "properties": {
        "email": {
          "type": "string",
          "description": "The user's email."
        }
      },
      "id": "User",
      "description": "Describes a single user.",
      "type": "object"
    },
    "BatchCreatePermissionsRequest": {
      "properties": {
        "requests": {
          "items": {
            "$ref": "CreatePermissionRequest"
          },
          "description": "The request message specifying the resources to create.",
          "type": "array"
        }
      },
      "type": "object",
      "id": "BatchCreatePermissionsRequest",
      "description": "The request to add one or more permissions on the note. Currently, only the `WRITER` role may be specified. If adding a permission fails, then the entire request fails and no changes are made."
    },
    "CreatePermissionRequest": {
      "type": "object",
      "id": "CreatePermissionRequest",
      "description": "The request to add a single permission on the note.",
      "properties": {
        "parent": {
          "description": "Required. The parent note where this permission will be created. Format: `notes/{note}`",
          "type": "string"
        },
        "permission": {
          "description": "Required. The permission to create. One of Permission.email, User.email or Group.email must be supplied.",
          "$ref": "Permission"
        }
      }
    },
    "Family": {
      "id": "Family",
      "description": "Describes a single Google Family.",
      "type": "object",
      "properties": {}
    },
    "BatchCreatePermissionsResponse": {
      "properties": {
        "permissions": {
          "items": {
            "$ref": "Permission"
          },
          "description": "Permissions created.",
          "type": "array"
        }
      },
      "id": "BatchCreatePermissionsResponse",
      "description": "The response for creating permissions on a note.",
      "type": "object"
    },
    "BatchDeletePermissionsRequest": {
      "properties": {
        "names": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "description": "Required. The names of the permissions to delete. Format: `notes/{note}/permissions/{permission}`"
        }
      },
      "id": "BatchDeletePermissionsRequest",
      "description": "The request to remove one or more permissions from a note. A permission with the `OWNER` role can't be removed. If removing a permission fails, then the entire request fails and no changes are made. Returns a 400 bad request error if a specified permission does not exist on the note.",
      "type": "object"
    },
    "Group": {
      "type": "object",
      "id": "Group",
      "description": "Describes a single Group.",
      "properties": {
        "email": {
          "description": "The group email.",
          "type": "string"
        }
      }
    },
    "TextContent": {
      "properties": {
        "text": {
          "type": "string",
          "description": "The text of the note. The limits on this vary with the specific field using this type."
        }
      },
      "id": "TextContent",
      "description": "The block of text for a single text section or list item.",
      "type": "object"
    },
    "ListItem": {
      "properties": {
        "childListItems": {
          "items": {
            "$ref": "ListItem"
          },
          "type": "array",
          "description": "If set, list of list items nested under this list item. Only one level of nesting is allowed."
        },
        "text": {
          "description": "The text of this item. Length must be less than 1,000 characters.",
          "$ref": "TextContent"
        },
        "checked": {
          "description": "Whether this item has been checked off or not.",
          "type": "boolean"
        }
      },
      "id": "ListItem",
      "description": "A single list item in a note's list.",
      "type": "object"
    },
    "ListContent": {
      "properties": {
        "listItems": {
          "description": "The items in the list. The number of items must be less than 1,000.",
          "type": "array",
          "items": {
            "$ref": "ListItem"
          }
        }
      },
      "id": "ListContent",
      "description": "The list of items for a single list note.",
      "type": "object"
    },
    "Note": {
      "properties": {
        "name": {
          "description": "Output only. The resource name of this note. See general note on identifiers in KeepService.",
          "readOnly": true,
          "type": "string"
        },
        "updateTime": {
          "type": "string",
          "description": "Output only. When this note was last modified.",
          "readOnly": true,
          "format": "google-datetime"
        },
        "trashed": {
          "type": "boolean",
          "description": "Output only. `true` if this note has been trashed. If trashed, the note is eventually deleted.",
          "readOnly": true
        },
        "attachments": {
          "type": "array",
          "description": "Output only. The attachments attached to this note.",
          "readOnly": true,
          "items": {
            "$ref": "Attachment"
          }
        },
        "permissions": {
          "type": "array",
          "description": "Output only. The list of permissions set on the note. Contains at least one entry for the note owner.",
          "readOnly": true,
          "items": {
            "$ref": "Permission"
          }
        },
        "title": {
          "description": "The title of the note. Length must be less than 1,000 characters.",
          "type": "string"
        },
        "trashTime": {
          "type": "string",
          "description": "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`).",
          "readOnly": true,
          "format": "google-datetime"
        },
        "createTime": {
          "description": "Output only. When this note was created.",
          "readOnly": true,
          "format": "google-datetime",
          "type": "string"
        },
        "body": {
          "description": "The body of the note.",
          "$ref": "Section"
        }
      },
      "type": "object",
      "id": "Note",
      "description": "A single note."
    },
    "Attachment": {
      "properties": {
        "name": {
          "type": "string",
          "description": "The resource name;"
        },
        "mimeType": {
          "items": {
            "type": "string"
          },
          "description": "The MIME types (IANA media types) in which the attachment is available.",
          "type": "array"
        }
      },
      "type": "object",
      "id": "Attachment",
      "description": "An attachment to a note."
    },
    "Permission": {
      "properties": {
        "family": {
          "description": "Output only. The Google Family to which this role applies.",
          "readOnly": true,
          "$ref": "Family"
        },
        "email": {
          "type": "string",
          "description": "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."
        },
        "group": {
          "description": "Output only. The group to which this role applies.",
          "readOnly": true,
          "$ref": "Group"
        },
        "name": {
          "type": "string",
          "description": "Output only. The resource name.",
          "readOnly": true
        },
        "deleted": {
          "type": "boolean",
          "description": "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.",
          "readOnly": true
        },
        "user": {
          "description": "Output only. The user to whom this role applies.",
          "readOnly": true,
          "$ref": "User"
        },
        "role": {
          "type": "string",
          "enumDescriptions": [
            "An undefined role.",
            "A role granting full access. This role cannot be added or removed. Defined by the creator of the note.",
            "A role granting the ability to contribute content and modify note permissions."
          ],
          "description": "The role granted by this permission. The role determines the entity’s ability to read, write, and share notes.",
          "enum": [
            "ROLE_UNSPECIFIED",
            "OWNER",
            "WRITER"
          ]
        }
      },
      "type": "object",
      "id": "Permission",
      "description": "A single permission on the note. Associates a `member` with a `role`."
    },
    "ListNotesResponse": {
      "type": "object",
      "id": "ListNotesResponse",
      "description": "The response when listing a page of notes.",
      "properties": {
        "notes": {
          "description": "A page of notes.",
          "type": "array",
          "items": {
            "$ref": "Note"
          }
        },
        "nextPageToken": {
          "description": "Next page's `page_token` field.",
          "type": "string"
        }
      }
    },
    "Section": {
      "properties": {
        "text": {
          "description": "Used if this section's content is a block of text. The length of the text content must be less than 20,000 characters.",
          "$ref": "TextContent"
        },
        "list": {
          "description": "Used if this section's content is a list.",
          "$ref": "ListContent"
        }
      },
      "id": "Section",
      "description": "The content of the note.",
      "type": "object"
    },
    "Empty": {
      "properties": {},
      "id": "Empty",
      "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }",
      "type": "object"
    }
  },
  "servicePath": "",
  "parameters": {
    "uploadType": {
      "location": "query",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "type": "string"
    },
    "alt": {
      "description": "Data format for response.",
      "default": "json",
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "type": "string",
      "location": "query"
    },
    "fields": {
      "location": "query",
      "description": "Selector specifying which fields to include in a partial response.",
      "type": "string"
    },
    "quotaUser": {
      "type": "string",
      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
      "location": "query"
    },
    "prettyPrint": {
      "description": "Returns response with indentations and line breaks.",
      "default": "true",
      "type": "boolean",
      "location": "query"
    },
    "access_token": {
      "type": "string",
      "description": "OAuth access token.",
      "location": "query"
    },
    "oauth_token": {
      "type": "string",
      "description": "OAuth 2.0 token for the current user.",
      "location": "query"
    },
    "callback": {
      "location": "query",
      "type": "string",
      "description": "JSONP"
    },
    "key": {
      "location": "query",
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
      "type": "string"
    },
    "$.xgafv": {
      "type": "string",
      "location": "query",
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "description": "V1 error format.",
      "enum": [
        "1",
        "2"
      ]
    },
    "upload_protocol": {
      "location": "query",
      "type": "string",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")."
    }
  },
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/keep.readonly": {
          "description": "View all your Google Keep data"
        },
        "https://www.googleapis.com/auth/keep": {
          "description": "See, edit, create and permanently delete all your Google Keep data"
        }
      }
    }
  },
  "version": "v1",
  "ownerDomain": "google.com",
  "title": "Google Keep API",
  "rootUrl": "https://keep.googleapis.com/",
  "kind": "discovery#restDescription",
  "baseUrl": "https://keep.googleapis.com/",
  "name": "keep",
  "ownerName": "Google",
  "revision": "20260412",
  "documentationLink": "https://developers.google.com/workspace/keep/api",
  "protocol": "rest",
  "icons": {
    "x32": "http://www.google.com/images/icons/product/search-32.gif",
    "x16": "http://www.google.com/images/icons/product/search-16.gif"
  },
  "batchPath": "batch",
  "mtlsRootUrl": "https://keep.mtls.googleapis.com/",
  "fullyEncodeReservedExpansion": true,
  "version_module": true,
  "discoveryVersion": "v1"
}
