Records a new draft generation of a protocol binding spec.
const url = 'https://example.com/v1/m/sessions/protocol-binding-specs?mode=validate';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"binding_key":"example","currency_policy":"pinned","direction":"inbound","generation":1,"known_losses":[{"acceptance_ref":"example","accepted":false,"field":"example","reason_code":"example"}],"local_kind":"work_item","local_selector":{},"mapping":[{"cardinality":"one_to_one","source":"example","target":"example","transform":"identity"}],"mapping_schema":"example","peer_authority":"example","permission_profile_ref":"example","protocol":"a2a","protocol_version":"example","remote_resource_kind":"example","remote_resource_ref":"example","rule_refs":["example"],"supersedes_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","workspace_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://example.com/v1/m/sessions/protocol-binding-specs?mode=validate' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "binding_key": "example", "currency_policy": "pinned", "direction": "inbound", "generation": 1, "known_losses": [ { "acceptance_ref": "example", "accepted": false, "field": "example", "reason_code": "example" } ], "local_kind": "work_item", "local_selector": {}, "mapping": [ { "cardinality": "one_to_one", "source": "example", "target": "example", "transform": "identity" } ], "mapping_schema": "example", "peer_authority": "example", "permission_profile_ref": "example", "protocol": "a2a", "protocol_version": "example", "remote_resource_kind": "example", "remote_resource_ref": "example", "rule_refs": [ "example" ], "supersedes_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "workspace_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Records a new draft generation of a protocol binding spec. Two properties are load-bearing and deliberate.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”Target tenant id; required when the principal can act in more than one tenant.
Canonical UUID required when mode=apply; reuse it only for an exact retry.
SHA-256 plan hash required when mode=apply; apply must reproduce it. For state transitions it must agree with body.plan_hash when both are supplied.
Query Parameters
Section titled “Query Parameters ”Mandatory authoring phase. The server derives a fresh capability witness; validate and plan are observational, while apply revalidates and commits the spec transition.
Request Body required
Section titled “Request Body required ”Closed ProtocolBindingSpecInput for exactly one immutable, version-pinned protocol mapping generation.
object
object
Required when accepted=true and rejected when accepted=false.
Whether the semantic loss has an explicit acceptance witness.
Field whose semantics are not preserved by the mapping.
Canonicalizable JSON object selecting the local surface; encoded size is limited to 64 KiB.
object
object
Exact local field or projection reference.
Exact remote field or projection reference.
Peer authority or normalized absolute authority URL.
Pinned permission-profile reference.
Pinned protocol version; latest, current and * are rejected.
Opaque remote resource reference.
Server-derived capability witness. Any client-supplied value is ignored; omit this property. Activation requires a fresh CLEAN witness with a non-empty observed_at.
object
Responses
Section titled “ Responses ”OK
object
Example generated
{}ProtocolBindingSpec draft created
object
Example generated
{}Bad request
object
Example generated
{}Unauthenticated
object
Example generated
{}Forbidden
object
Example generated
{}Not found
object
Example generated
{}Conflict / setup required
object
Example generated
{}ETag or plan precondition failed
object
Example generated
{}Apply precondition required
object
Example generated
{}Rate limited
object
Example generated
{}Required store is unavailable
object
Example generated
{}