Docs
Skip to content
post

Create operations

Endpoint

posthttps://<REGION>.cloud.appwrite.io...sactions/{transactionId}/operations

Description

Required scopes

documents.write

Authentication

Initialize the Appwrite client with setProject() and ensure the user is signed in. The SDK sends the session header automatically after login.

Path

string
Required

Body

object
Status
Content type
201
application/json

Transaction

Name
Type
Description
string
string
string
string
integer
string
GraphQL
mutation {
databasesCreateOperations(
transactionId: "<TRANSACTION_ID>",
operations: [
{
"action": "create",
"databaseId": "<DATABASE_ID>",
"collectionId": "<COLLECTION_ID>",
"documentId": "<DOCUMENT_ID>",
"data": {
"name": "Walter O'Brien"
}
}
]
) {
_id
_createdAt
_updatedAt
status
operations
expiresAt
}
}
mutation {
databasesCreateOperations(
transactionId: "<TRANSACTION_ID>",
operations: [
{
"action": "create",
"databaseId": "<DATABASE_ID>",
"collectionId": "<COLLECTION_ID>",
"documentId": "<DOCUMENT_ID>",
"data": {
"name": "Walter O'Brien"
}
}
]
) {
_id
_createdAt
_updatedAt
status
operations
expiresAt
}
}