MARS documentation
API reference

Federation sync

Returns local changes only after OAS service identity, JCS Ed25519 envelope, durable nonce, and active agreement verification.

Contract and client context

Operation: federation_sync · HTTP: POST /v1/federation/sync

Use an operator-supplied registry base URL. Request execution is disabled in this documentation explorer. Generated request snippets are templates, not signed or authorized submissions.

This endpoint authenticates a signed federation envelope against configured peers and keys. It is not an unsigned public mutation merely because the OpenAPI bearer security list is absent.

Exact operation definition
{
  "description": "Returns local changes only after OAS service identity, JCS Ed25519 envelope, durable nonce, and active agreement verification.",
  "operationId": "federation_sync",
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/SignedFederationEnvelope_SyncRequest"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SignedFederationEnvelope_SyncResponse"
          }
        }
      },
      "description": "Signed federation synchronization batch"
    },
    "401": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "Envelope signature, timestamp, nonce, or controller invalid"
    },
    "403": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "Unknown peer, agreement, or capability"
    },
    "413": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "Signed federation body exceeds the explicit admission limit"
    },
    "429": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "Write rate limit exceeded"
    }
  },
  "tags": [
    "federation"
  ]
}

Resolve schema references against the complete OpenAPI document. Standalone schemas and hashes are generated from the same checked-in source.

POST/v1/federation/sync

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

JCS-canonical, detached Ed25519 envelope used for federation traffic.

The signature covers every field except signature, including the sender, recipient, key controller, timestamp, nonce, request digest, and payload. Request digests bind responses to the exact request they answer.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/federation/sync" \  -H "Content-Type: application/json" \  -d '{    "algorithm": "string",    "keyId": "string",    "kind": "sync_request",    "nonce": "string",    "payload": {      "fromSequence": 0,      "maxEntries": 0    },    "recipientDid": "string",    "requestDigest": "string",    "senderDid": "string",    "signature": "string",    "timestamp": "2019-08-24T14:15:22Z",    "version": "string"  }'
{  "algorithm": "string",  "keyId": "string",  "kind": "sync_request",  "nonce": "string",  "payload": {    "entries": [      {        "accessPolicy": null,        "anchorState": "unanchored",        "bondReference": null,        "customMetadata": {          "property1": null,          "property2": null        },        "description": "string",        "entryDid": "string",        "entryType": "AgentDefinition",        "itemData": null,        "itemDataHash": "string",        "itemSchemaUri": "string",        "lifecycleStatus": "draft",        "lineageReference": null,        "marsVersion": "string",        "name": "string",        "publishedAt": "2019-08-24T14:15:22Z",        "publisherDid": "string",        "relationships": [          {            "label": "string",            "relationshipType": "dependsOn",            "targetDid": "string"          }        ],        "semanticAnnotations": [          {            "objectLiteral": "string",            "objectUri": "string",            "predicateUri": "string"          }        ],        "sequence": 0,        "serviceEndpoints": [          {            "id": "string",            "priority": 0,            "properties": {              "property1": null,              "property2": null            },            "type": "string",            "url": "string"          }        ],        "shardAssignment": "string",        "signature": {          "algorithm": "string",          "created": "string",          "keyId": "string",          "value": "string"        },        "tags": [          "string"        ],        "updatedAt": "2019-08-24T14:15:22Z",        "verifiableAttestations": [          null        ],        "version": "string"      }    ],    "hasMore": true,    "nextSequence": 0  },  "recipientDid": "string",  "requestDigest": "string",  "senderDid": "string",  "signature": "string",  "timestamp": "2019-08-24T14:15:22Z",  "version": "string"}