action appwrite_database_create_document { label: "Create Document" description: "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](/docs/server/database#databaseCreateCollection) API or directly from your database console." provider: appwrite method: POST path: "/database/collections/{collectionId}/documents" encoding: json input: { type: "object" properties: { collectionId: { type: "string" } data: { type: "object" description: "Document data as JSON object." } parentDocument: { type: "string" description: "Parent document unique ID. Use when you want your new document to be a child of a parent document." } parentProperty: { type: "string" description: "Parent document property name. Use when you want your new document to be a child of a parent document." } parentPropertyType: { type: "string" description: "Parent document property connection type. You can set this value to **assign**, **append** or **prepend**, default value is assign. Use when you want your new document to be a child of a parent document." } read: { type: "array" description: "An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions." items: { type: "string" } } write: { type: "array" description: "An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions." items: { type: "string" } } } required: ["collectionId", "data"] additionalProperties: false } output: { type: "object" description: "Document" required: ["$collection", "$id", "$permissions"] properties: { "$collection": { type: "string" description: "Collection ID." } "$id": { type: "string" description: "Document ID." } "$permissions": { type: "object" description: "Document permissions." items: { type: "object" description: "Permissions" required: ["read", "write"] properties: { read: { type: "array" description: "Read permissions." items: { type: "string" } } write: { type: "array" description: "Write permissions." items: { type: "string" } } } } } } } }