batchApplyNoteOperations
curl --request POST \
--url https://connvo-dev.convex.cloud/api/run/notes/mutations/batchApplyNoteOperations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"args": {
"meetingId": "meeting_123example",
"operations": [
{
"operation": {
"type": "insert",
"position": 0,
"content": "Meeting Notes - Q4 Planning\n\n"
},
"clientSequence": 10
},
{
"operation": {
"type": "insert",
"position": 30,
"content": "Attendees:\n- Alice\n- Bob\n\n"
},
"clientSequence": 11
},
{
"operation": {
"type": "insert",
"position": 55,
"content": "Agenda:\n1. Review Q3 results\n2. Plan Q4 objectives\n"
},
"clientSequence": 12
}
],
"expectedVersion": 5
}
}
'import requests
url = "https://connvo-dev.convex.cloud/api/run/notes/mutations/batchApplyNoteOperations"
payload = { "args": {
"meetingId": "meeting_123example",
"operations": [
{
"operation": {
"type": "insert",
"position": 0,
"content": "Meeting Notes - Q4 Planning
"
},
"clientSequence": 10
},
{
"operation": {
"type": "insert",
"position": 30,
"content": "Attendees:
- Alice
- Bob
"
},
"clientSequence": 11
},
{
"operation": {
"type": "insert",
"position": 55,
"content": "Agenda:
1. Review Q3 results
2. Plan Q4 objectives
"
},
"clientSequence": 12
}
],
"expectedVersion": 5
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
args: {
meetingId: 'meeting_123example',
operations: [
{
operation: {type: 'insert', position: 0, content: 'Meeting Notes - Q4 Planning\n\n'},
clientSequence: 10
},
{
operation: {type: 'insert', position: 30, content: 'Attendees:\n- Alice\n- Bob\n\n'},
clientSequence: 11
},
{
operation: {
type: 'insert',
position: 55,
content: 'Agenda:\n1. Review Q3 results\n2. Plan Q4 objectives\n'
},
clientSequence: 12
}
],
expectedVersion: 5
}
})
};
fetch('https://connvo-dev.convex.cloud/api/run/notes/mutations/batchApplyNoteOperations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://connvo-dev.convex.cloud/api/run/notes/mutations/batchApplyNoteOperations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'args' => [
'meetingId' => 'meeting_123example',
'operations' => [
[
'operation' => [
'type' => 'insert',
'position' => 0,
'content' => 'Meeting Notes - Q4 Planning
'
],
'clientSequence' => 10
],
[
'operation' => [
'type' => 'insert',
'position' => 30,
'content' => 'Attendees:
- Alice
- Bob
'
],
'clientSequence' => 11
],
[
'operation' => [
'type' => 'insert',
'position' => 55,
'content' => 'Agenda:
1. Review Q3 results
2. Plan Q4 objectives
'
],
'clientSequence' => 12
]
],
'expectedVersion' => 5
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://connvo-dev.convex.cloud/api/run/notes/mutations/batchApplyNoteOperations"
payload := strings.NewReader("{\n \"args\": {\n \"meetingId\": \"meeting_123example\",\n \"operations\": [\n {\n \"operation\": {\n \"type\": \"insert\",\n \"position\": 0,\n \"content\": \"Meeting Notes - Q4 Planning\\n\\n\"\n },\n \"clientSequence\": 10\n },\n {\n \"operation\": {\n \"type\": \"insert\",\n \"position\": 30,\n \"content\": \"Attendees:\\n- Alice\\n- Bob\\n\\n\"\n },\n \"clientSequence\": 11\n },\n {\n \"operation\": {\n \"type\": \"insert\",\n \"position\": 55,\n \"content\": \"Agenda:\\n1. Review Q3 results\\n2. Plan Q4 objectives\\n\"\n },\n \"clientSequence\": 12\n }\n ],\n \"expectedVersion\": 5\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://connvo-dev.convex.cloud/api/run/notes/mutations/batchApplyNoteOperations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"args\": {\n \"meetingId\": \"meeting_123example\",\n \"operations\": [\n {\n \"operation\": {\n \"type\": \"insert\",\n \"position\": 0,\n \"content\": \"Meeting Notes - Q4 Planning\\n\\n\"\n },\n \"clientSequence\": 10\n },\n {\n \"operation\": {\n \"type\": \"insert\",\n \"position\": 30,\n \"content\": \"Attendees:\\n- Alice\\n- Bob\\n\\n\"\n },\n \"clientSequence\": 11\n },\n {\n \"operation\": {\n \"type\": \"insert\",\n \"position\": 55,\n \"content\": \"Agenda:\\n1. Review Q3 results\\n2. Plan Q4 objectives\\n\"\n },\n \"clientSequence\": 12\n }\n ],\n \"expectedVersion\": 5\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://connvo-dev.convex.cloud/api/run/notes/mutations/batchApplyNoteOperations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"args\": {\n \"meetingId\": \"meeting_123example\",\n \"operations\": [\n {\n \"operation\": {\n \"type\": \"insert\",\n \"position\": 0,\n \"content\": \"Meeting Notes - Q4 Planning\\n\\n\"\n },\n \"clientSequence\": 10\n },\n {\n \"operation\": {\n \"type\": \"insert\",\n \"position\": 30,\n \"content\": \"Attendees:\\n- Alice\\n- Bob\\n\\n\"\n },\n \"clientSequence\": 11\n },\n {\n \"operation\": {\n \"type\": \"insert\",\n \"position\": 55,\n \"content\": \"Agenda:\\n1. Review Q3 results\\n2. Plan Q4 objectives\\n\"\n },\n \"clientSequence\": 12\n }\n ],\n \"expectedVersion\": 5\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"errorMessage": "",
"errorData": {},
"value": {
"success": true,
"processed": 3,
"failed": 0,
"results": [
{
"serverSequence": 13,
"transformedOperation": {
"type": "insert",
"position": 0,
"content": "Meeting Notes - Q4 Planning\n\n"
},
"conflicts": []
},
{
"serverSequence": 14,
"transformedOperation": {
"type": "insert",
"position": 30,
"content": "Attendees:\n- Alice\n- Bob\n\n"
},
"conflicts": []
},
{
"serverSequence": 15,
"transformedOperation": {
"type": "insert",
"position": 55,
"content": "Agenda:\n1. Review Q3 results\n2. Plan Q4 objectives\n"
},
"conflicts": []
}
],
"newVersion": 6
}
}{}{}Notes
batchApplyNoteOperations
them sequentially within a single transaction. Each operation is transformed against concurrent operations from other clients, ensuring consistency. This is more efficient than individual operations for bulk edits like paste operations or undo/redo sequences. Returns detailed results for each operation including conflicts detected.
POST
/
api
/
run
/
notes
/
mutations
/
batchApplyNoteOperations
batchApplyNoteOperations
curl --request POST \
--url https://connvo-dev.convex.cloud/api/run/notes/mutations/batchApplyNoteOperations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"args": {
"meetingId": "meeting_123example",
"operations": [
{
"operation": {
"type": "insert",
"position": 0,
"content": "Meeting Notes - Q4 Planning\n\n"
},
"clientSequence": 10
},
{
"operation": {
"type": "insert",
"position": 30,
"content": "Attendees:\n- Alice\n- Bob\n\n"
},
"clientSequence": 11
},
{
"operation": {
"type": "insert",
"position": 55,
"content": "Agenda:\n1. Review Q3 results\n2. Plan Q4 objectives\n"
},
"clientSequence": 12
}
],
"expectedVersion": 5
}
}
'import requests
url = "https://connvo-dev.convex.cloud/api/run/notes/mutations/batchApplyNoteOperations"
payload = { "args": {
"meetingId": "meeting_123example",
"operations": [
{
"operation": {
"type": "insert",
"position": 0,
"content": "Meeting Notes - Q4 Planning
"
},
"clientSequence": 10
},
{
"operation": {
"type": "insert",
"position": 30,
"content": "Attendees:
- Alice
- Bob
"
},
"clientSequence": 11
},
{
"operation": {
"type": "insert",
"position": 55,
"content": "Agenda:
1. Review Q3 results
2. Plan Q4 objectives
"
},
"clientSequence": 12
}
],
"expectedVersion": 5
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
args: {
meetingId: 'meeting_123example',
operations: [
{
operation: {type: 'insert', position: 0, content: 'Meeting Notes - Q4 Planning\n\n'},
clientSequence: 10
},
{
operation: {type: 'insert', position: 30, content: 'Attendees:\n- Alice\n- Bob\n\n'},
clientSequence: 11
},
{
operation: {
type: 'insert',
position: 55,
content: 'Agenda:\n1. Review Q3 results\n2. Plan Q4 objectives\n'
},
clientSequence: 12
}
],
expectedVersion: 5
}
})
};
fetch('https://connvo-dev.convex.cloud/api/run/notes/mutations/batchApplyNoteOperations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://connvo-dev.convex.cloud/api/run/notes/mutations/batchApplyNoteOperations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'args' => [
'meetingId' => 'meeting_123example',
'operations' => [
[
'operation' => [
'type' => 'insert',
'position' => 0,
'content' => 'Meeting Notes - Q4 Planning
'
],
'clientSequence' => 10
],
[
'operation' => [
'type' => 'insert',
'position' => 30,
'content' => 'Attendees:
- Alice
- Bob
'
],
'clientSequence' => 11
],
[
'operation' => [
'type' => 'insert',
'position' => 55,
'content' => 'Agenda:
1. Review Q3 results
2. Plan Q4 objectives
'
],
'clientSequence' => 12
]
],
'expectedVersion' => 5
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://connvo-dev.convex.cloud/api/run/notes/mutations/batchApplyNoteOperations"
payload := strings.NewReader("{\n \"args\": {\n \"meetingId\": \"meeting_123example\",\n \"operations\": [\n {\n \"operation\": {\n \"type\": \"insert\",\n \"position\": 0,\n \"content\": \"Meeting Notes - Q4 Planning\\n\\n\"\n },\n \"clientSequence\": 10\n },\n {\n \"operation\": {\n \"type\": \"insert\",\n \"position\": 30,\n \"content\": \"Attendees:\\n- Alice\\n- Bob\\n\\n\"\n },\n \"clientSequence\": 11\n },\n {\n \"operation\": {\n \"type\": \"insert\",\n \"position\": 55,\n \"content\": \"Agenda:\\n1. Review Q3 results\\n2. Plan Q4 objectives\\n\"\n },\n \"clientSequence\": 12\n }\n ],\n \"expectedVersion\": 5\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://connvo-dev.convex.cloud/api/run/notes/mutations/batchApplyNoteOperations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"args\": {\n \"meetingId\": \"meeting_123example\",\n \"operations\": [\n {\n \"operation\": {\n \"type\": \"insert\",\n \"position\": 0,\n \"content\": \"Meeting Notes - Q4 Planning\\n\\n\"\n },\n \"clientSequence\": 10\n },\n {\n \"operation\": {\n \"type\": \"insert\",\n \"position\": 30,\n \"content\": \"Attendees:\\n- Alice\\n- Bob\\n\\n\"\n },\n \"clientSequence\": 11\n },\n {\n \"operation\": {\n \"type\": \"insert\",\n \"position\": 55,\n \"content\": \"Agenda:\\n1. Review Q3 results\\n2. Plan Q4 objectives\\n\"\n },\n \"clientSequence\": 12\n }\n ],\n \"expectedVersion\": 5\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://connvo-dev.convex.cloud/api/run/notes/mutations/batchApplyNoteOperations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"args\": {\n \"meetingId\": \"meeting_123example\",\n \"operations\": [\n {\n \"operation\": {\n \"type\": \"insert\",\n \"position\": 0,\n \"content\": \"Meeting Notes - Q4 Planning\\n\\n\"\n },\n \"clientSequence\": 10\n },\n {\n \"operation\": {\n \"type\": \"insert\",\n \"position\": 30,\n \"content\": \"Attendees:\\n- Alice\\n- Bob\\n\\n\"\n },\n \"clientSequence\": 11\n },\n {\n \"operation\": {\n \"type\": \"insert\",\n \"position\": 55,\n \"content\": \"Agenda:\\n1. Review Q3 results\\n2. Plan Q4 objectives\\n\"\n },\n \"clientSequence\": 12\n }\n ],\n \"expectedVersion\": 5\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"errorMessage": "",
"errorData": {},
"value": {
"success": true,
"processed": 3,
"failed": 0,
"results": [
{
"serverSequence": 13,
"transformedOperation": {
"type": "insert",
"position": 0,
"content": "Meeting Notes - Q4 Planning\n\n"
},
"conflicts": []
},
{
"serverSequence": 14,
"transformedOperation": {
"type": "insert",
"position": 30,
"content": "Attendees:\n- Alice\n- Bob\n\n"
},
"conflicts": []
},
{
"serverSequence": 15,
"transformedOperation": {
"type": "insert",
"position": 55,
"content": "Agenda:\n1. Review Q3 results\n2. Plan Q4 objectives\n"
},
"conflicts": []
}
],
"newVersion": 6
}
}{}{}Authorizations
Standard user authentication token issued via WorkOS. Provide as Authorization: Bearer <user-token>.
Body
application/json
Show child attributes
Show child attributes
⌘I