Operations
Apply create, update, patch, delete and reset operations to records.
Apply an atomic batch of mutations
Create a canonical kind, update its body relative to a revision base, patch fields or addressable parts, or unlink with delete. A patch can reset owner-edited addresses to the source at the current base. Reset addresses and other changes commit in one revision. Omitted state stays unchanged. A connector with ordinary record write access can supply either a replacement state map or state_patch intents on a patch. State intents merge against the current map under the account lock and share the final 64 KiB state limit. A replacement preserves omitted server-owned send values. Attempts to change or clear them return 422 server_owned_field. Fields merge recursively and null clears a modeled field. References to create IDs resolve within the same operation. Retain each create ID across retries. Reusing it returns exists or gone. The Idempotency-Key replays the original authorized receipt for seven days in the same account and connection. A replay result that is no longer readable has outcome not_found and omits the record. Assistant-only grants allow strict patches to supported editable kinds.
Query parameters
| Name | Type | Description |
|---|---|---|
| batch | boolean | Mark this as a Pro batch operation. |
Headers
| Name | Type | Description |
|---|---|---|
| Idempotency-Keyrequired | string | Persist with the request payload. Replay the same key with the same payload after a transport failure. |
Request body required
Validated by the canonical record-operations@1 JSON Schema.
Responses
200 Successful response.application/json
request-idServer-generated request ID for support and tracing.Cache-ControlHub responses are private and must not be stored.opstringrequiredseqintegerrequired≥ 0≤ 9007199254740991resultsarray of objectrequired
curl -X POST "https://api.sendtopigeon.com/v1/operations" \
-H "Authorization: Bearer $PIGEON_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"mutations": [
{
"action": "patch",
"id": "0194ab00-0000-7000-8000-000000000001",
"base": {
"revision": 3,
"revision_op": "0194ab00-0000-7000-8000-000000000002"
},
"reset": [
{
"field": "title"
}
],
"fields": {
"summary": "Bring this to the next planning meeting."
}
}
]
}'{
"mutations": [
{
"action": "patch",
"id": "0194ab00-0000-7000-8000-000000000001",
"base": {
"revision": 3,
"revision_op": "0194ab00-0000-7000-8000-000000000002"
},
"reset": [
{
"field": "title"
}
],
"fields": {
"summary": "Bring this to the next planning meeting."
}
}
]
}POST https://api.sendtopigeon.com/v1/operationsResolve a conflict copy
The conflict belongs to the caller's connection. Supply the current record revision as the base.
Path parameters
| Name | Type | Description |
|---|---|---|
| idrequired | string · uuid | Record ID. |
| cidrequired | string | ID of the caller's connection. |
Headers
| Name | Type | Description |
|---|---|---|
| Idempotency-Keyrequired | string | Persist with the request payload. Replay the same key with the same payload after a transport failure. |
Request body required
choicestringrequired"keep_current" · "discard" · "use_mine"baseRevisionBaserequiredno extra fields
Responses
200 Successful response.application/json
request-idServer-generated request ID for support and tracing.Cache-ControlHub responses are private and must not be stored.opstringrequiredseqintegerrequired≥ 0≤ 9007199254740991resultsarray of objectrequired
curl -X POST "https://api.sendtopigeon.com/v1/records/01936f3e-5b7a-7c1d-9a40-2f1c8e0b6a11/conflicts/%7Bcid%7D/resolve" \
-H "Authorization: Bearer $PIGEON_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"choice": "keep_current",
"base": {
"revision": 1,
"revision_op": "01936f3e-5b7a-7c1d-9a40-2f1c8e0b6a11"
}
}'{
"choice": "keep_current",
"base": {
"revision": 1,
"revision_op": "01936f3e-5b7a-7c1d-9a40-2f1c8e0b6a11"
}
}POST https://api.sendtopigeon.com/v1/records/01936f3e-5b7a-7c1d-9a40-2f1c8e0b6a11/conflicts/%7Bcid%7D/resolve