https://appwrite.io/v1/database/collections/{collectionId}/documentsCreate a new Document. Before using this route, you should create a new collection resource using either a server integration API or directly from your database console.
Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/server/database#createCollection).
Document data as JSON object.
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.
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.
Parent document unique ID. Use when you want your new document to be a child of a parent document.
Parent document property name. Use when you want your new document to be a child of a parent document.
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.
{
"success": true,
"data": {
"id": "abc123",
"created_at": "2025-01-01T00:00:00Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}1curl --request POST \2 --url 'https://appwrite.io/v1/database/collections/{collectionId}/documents' \3 --header 'accept: application/json' \4 --header 'content-type: application/json'1{2 "success": true,3 "data": {4 "id": "abc123",5 "created_at": "2025-01-01T00:00:00Z"6 }7}https://appwrite.io/v1/database/collections/{collectionId}/documentsCreate a new Document. Before using this route, you should create a new collection resource using either a server integration API or directly from your database console.
Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/server/database#createCollection).
Document data as JSON object.
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.
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.
Parent document unique ID. Use when you want your new document to be a child of a parent document.
Parent document property name. Use when you want your new document to be a child of a parent document.
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.
{
"success": true,
"data": {
"id": "abc123",
"created_at": "2025-01-01T00:00:00Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}1curl --request POST \2 --url 'https://appwrite.io/v1/database/collections/{collectionId}/documents' \3 --header 'accept: application/json' \4 --header 'content-type: application/json'1{2 "success": true,3 "data": {4 "id": "abc123",5 "created_at": "2025-01-01T00:00:00Z"6 }7}