PigeonDocs

Operations

Apply create, update, patch, delete and reset operations to records.

2 operationshttps://api.sendtopigeon.com
POST/v1/operations#

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.

applyOperationOAuth2PersonalAccessTokenPigeonSessionBearerPigeonSessionCookie

Query parameters

NameTypeDescription
batchbooleanMark this as a Pro batch operation.

Headers

NameTypeDescription
Idempotency-KeyrequiredstringPersist with the request payload. Replay the same key with the same payload after a transport failure.

Request body required

application/jsonrecord-operations@1

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.
BodyOperationReceiptno extra fields
  • opstringrequired
  • seqintegerrequired
    ≥ 0≤ 9007199254740991
  • resultsarray 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."
      }
    }
  ]
}'
JSONExample body
{
  "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/operations
POST/v1/records/{id}/conflicts/{cid}/resolve#

Resolve a conflict copy

The conflict belongs to the caller's connection. Supply the current record revision as the base.

resolveRecordConflictOAuth2PersonalAccessTokenPigeonSessionBearerPigeonSessionCookie

Path parameters

NameTypeDescription
idrequiredstring · uuidRecord ID.
cidrequiredstringID of the caller's connection.

Headers

NameTypeDescription
Idempotency-KeyrequiredstringPersist with the request payload. Replay the same key with the same payload after a transport failure.

Request body required

application/jsonobjectno extra fields
  • choicestringrequired
    "keep_current" · "discard" · "use_mine"
  • baseRevisionBaserequired
    no 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.
BodyOperationReceiptno extra fields
  • opstringrequired
  • seqintegerrequired
    ≥ 0≤ 9007199254740991
  • resultsarray 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"
  }
}'
JSONExample body
{
  "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