link-protocol-v1) at import
time; a document that does not conform is rejected.
The meta-schema is JSON Schema (draft 2020-12) and is served by every instance:
Top-level structure
A protocol document has these fields (additionalProperties is false — unknown top-level keys are rejected):
Actions
actions is keyed by action name. Names may use dot notation to namespace related operations (for example
notify.chargeback). Each action is an object (additionalProperties: false):
Requests
request is one of two shapes.
Monomorphic — a single schema
The request is a single JSON Schema:Discriminated — a polymorphic union
A discriminator field selects a named variant. Each variant is a JSON Schema:action.variant key (for example assess.pan). See
Backends.
Responses
responses is keyed by HTTP status code (a string matching ^[1-5][0-9]{2}$), with at least one entry. Each
entry nests the schema under content → application/json → schema:
Components
components.schemas holds reusable schemas referenced from anywhere in the protocol via a JSON Pointer $ref
(for example #/components/schemas/Transaction):
Supported JSON Schema keywords
Schemas (in requests, responses, and components) are JSON Schema. The meta-schema explicitly lists the supported keywords; full validation is delegated to a JSON Schema validator (draft 2020-12):type, const, enum, properties, required, additionalProperties, items, oneOf, anyOf, allOf,
$ref, description, format, minimum, maximum, minLength, maxLength, pattern.
Complete example
A minimal but valid protocol with one discriminatedassess action and shared components:
Import and validation
Import a protocol you authored on a Standalone instance — by URL or by posting the document directly. Requiresadmin:protocols:write.
$id is
accepted. Once imported, Link generates an OpenAPI 3.1 specification for the protocol —
see Protocols.
Next steps
Backends
Bind your protocol to a real provider with mapping rules.
Protocols
The protocol concept — actions, variants, and versioning.