{protocol} is the protocol’s local ID and {action} is the action name. The call requires the invoke:execute
scope.
The flow
- Validate the request against the action’s schema.
- Resolve the variant from the discriminator field, if the action is polymorphic.
- Select the backend that implements the action and variant.
- Map and dispatch the request to the provider.
- Map the response back to the protocol shape and log the execution.
Method matching
The HTTP method you invoke with must match the method the action declares in the protocol. A mismatch returns405 METHOD_NOT_ALLOWED — it is not routed to a different action.
Selecting a backend
If exactly one enabled backend implements the action and variant, Link uses it. If several match, Link returns409 CONFLICT; disambiguate with the backend query parameter:
Results
A successful invocation returns the protocol-shaped result. Its shape is defined entirely by the protocol — for thespecter-v1 assess action, that is an enum outcome:
x-link-execution— the execution ID; use it to fetch the audit entry.server-timing— total and external-call timing, in milliseconds.
Mapping errors
When the provider call completes but mapping cannot produce a valid result, Link returns a protocol error result rather than failing silently. Thesource field tells you where it originated:
source tells you where the error originated: backend (the provider returned an error you mapped through),
mapping (a required leaf could not resolve), transport (the provider was unreachable or timed out),
encryption (message-level encryption failed), or mock (a configured mock returned an error). Transport and
encryption failures carry HTTP 502; the rest use the status from the response mapping.
Error codes
| Status | Code | Cause |
|---|---|---|
401 | UNAUTHORIZED | Missing, expired, or malformed bearer token |
403 | FORBIDDEN | Token lacks the invoke:execute scope |
404 | action_not_supported | No enabled backend implements this action |
404 | variant_not_supported | The discriminator selected a variant no backend implements |
405 | METHOD_NOT_ALLOWED | The HTTP method does not match the action’s declared method |
409 | ambiguous_backend | Multiple backends match — pass ?backend=<id> |
422 | VALIDATION_ERROR | The request failed schema validation — see validation_errors in the body |
422 | BACKEND_DISABLED | The only matching backend is disabled |
Execution log
Every invocation — success or failure — is logged asynchronously. Fetch an entry by ID with theadmin:executions:read scope:
Next steps
Backends
Configure the mapping that shapes each request and response.
Quickstart
Run the full flow end to end.