```swift import Appwrite let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setSession("") // The user session to authenticate with let databases = Databases(client) let result = try await databases.deleteDocument( databaseId: "", collectionId: "", documentId: "", transactionId: "" // optional ) ```