Each piece of data or information in Appwrite Databases is a document. Documents have a structure defined by the parent collection.
Create documents
Permissions required
You must grant create permissions to users at the collection level before users can create documents. Learn more about permissions
In most use cases, you will create documents programmatically.
During testing, you might prefer to create documents in the Appwrite Console. To do so, navigate to the Documents tab of your collection and click the Add document button.
List documents
Permissions required
You must grant read permissions to users at the collection level before users can read documents. Learn more about permissions
Documents can be retrieved using the List Document endpoint.
Results can be filtered, sorted, and paginated using Appwrite's shared set of query methods. You can find a full guide on querying in the Queries Guide.
By default, results are limited to the first 25 items. You can change this through pagination.
Upsert documents
Permissions required
You must grant create and update permissions to users at the collection level before users can upsert documents. You can also grant update permissions at the document level instead. Learn more about permissions
In most use cases, you will upsert documents programmatically.
Set custom $createdAt and $updatedAt
Server SDKs required
To manually set $createdAt
and $updatedAt
, you must use a server SDK with an API key. These attributes can be passed inside the data
parameter on any of the create, update, or upsert routes (single or bulk).
You can override a document's timestamps by providing ISO 8601 strings (for example, 2025-08-10T12:34:56.000Z
) in the data
payload. If these attributes are not provided, Appwrite will set them automatically.
Timestamp format and usage
- Values must be valid ISO 8601 date-time strings (UTC recommended). Using
toISOString()
(JavaScript) ordatetime.isoformat()
(Python) is a good default. - You can set either or both attributes as needed. If omitted, Appwrite sets them.
- This also works with bulk routes such as
createDocuments
andupsertDocuments
. See Bulk operations.
Permissions
In Appwrite, permissions can be granted at the collection level and the document level. Before a user can create a document, you need to grant create permissions to the user.
Read, update, and delete permissions can be granted at both the collection and document level. Users only need to be granted access at either the collection or document level to access documents.
Learn about configuring permissions.
Bulk operations
In Appwrite, you can perform bulk operations on documents within a collection. This allows you to create, update, upsert, or delete multiple documents in a single request.
As of now, bulk operations can only be performed via the server-side SDKs. The client-side SDKs do not support bulk operations.