
What are Service Bridges?
A service bridge creates a proxy endpoint within the Kodexa platform that forwards requests to an external API. This provides:- Centralized authentication — API credentials are managed as organization secrets, not embedded in modules. The platform supports automatic OAuth token management.
- Request routing — Modules reference a bridge endpoint rather than external URLs directly
- Caching — Responses can be cached per-endpoint with configurable TTL
- Request/response transformation — JavaScript hooks can modify requests before sending and responses before returning
- Monitoring — All requests through bridges are logged and can be monitored
Managing Service Bridges
Creating a Service Bridge
1
Click Add Service Bridge
Open the creation form from the Service Bridges page.
2
Configure Endpoint
Set the bridge name, target URL, authentication method, and any required headers.
3
Test Connection
Verify that the bridge can reach the external API.
4
Save
The bridge endpoint becomes available for use in your project’s modules and pipelines.

Service bridges use organization secrets for authentication credentials. Make sure the required secrets are configured before creating a bridge that needs them.
YAML Configuration Reference
Service bridges are defined in YAML and deployed withkdx sync. Here is the full structure:
Secret References
Use${secrets.SECRET_NAME} to reference organization secrets in your bridge configuration. The platform resolves these at request time. This works in:
baseUrlauth.clientId,auth.clientSecret,auth.tokenUrl- Header values
Agent Access
By default a bridge is callable by people and by the project’s own scripts, forms, and Activity steps. SetagentCallable to let automated agents call it as well:
Two conditions are both required before an agent may call a bridge:
agentCallableistrue— the Callable by agents toggle under Agent access on the bridge’s General tab, or the field above in YAML.- The bridge is bound to the agent’s project as a project resource.
403. Credentials stay on the platform and are never shown to the agent.
The same two checks admit both activity-plan AGENT steps and module or task executions running as the project’s assistant, so a module can call the bridges bound to its own project. Any caller whose project cannot be resolved is denied.
Egress Restrictions
The check coversauth.tokenUrl as well as endpoint paths, so an OAuth token endpoint must also be publicly resolvable.
Self-hosted deployments that must reach an internal mock or test service can set
BRIDGE_EGRESS_PRIVATE_HOST_ALLOWLIST — a comma-separated list of exact hostnames — in the environment of both the API and the orchestrator. Matching is exact and case-insensitive, with no wildcards and no CIDR ranges; a redirect from an exempted host into any other private destination is still refused; and an active allowlist is logged as a warning at startup. It is intended for development and test environments only.Authentication
OAuth 2.0 Client Credentials
The platform can automatically manage OAuth 2.0 client credentials token lifecycle — acquiring tokens, caching them, and refreshing on expiry. This eliminates the need for external token rotation.- Fetch a token from the token endpoint on the first request
- Cache the token until near expiry
- Automatically refresh when the token expires
- Retry once with a fresh token if the upstream API returns 401 or 403
Standard vs Custom Token Requests
Most OAuth providers use the standard form-encoded format (RFC 6749). The platform uses this by default:requestFormat: custom:
${auth.clientId} and ${auth.clientSecret} placeholders in requestBody are substituted with the resolved values from the auth block.
Custom Response Mapping
If the token endpoint returns non-standard field names, useresponseMapping:
Full Auth Configuration Reference
Static API Key / Bearer Token
For APIs that use a static API key or pre-generated token, set it directly in headers using a secret reference in the header’svalue:
${secrets.NAME} in a header value is resolved on the platform immediately before the request goes out — on defaultHeaders and on endpoint-level headers alike — and a header configured with secretRef instead is rejected with a 400 naming the header.
Endpoints
Each endpoint defines a path on the external API that the bridge exposes.name is matched exactly. Calling a name the bridge does not define returns an error listing the endpoint names it does define, so a misspelling is reported as one — it is never resolved to another endpoint.
Request and Response Schemas
Optionally document the expected request and response shapes using JSON Schema:requestSchema.required is also a runtime guard. While any required field is absent, the proxy returns an empty [] result without calling the external API — the behaviour that keeps a dependent dropdown showing no options until its prerequisite field has been filled in.
A required field counts as supplied when it appears in either the JSON body or the query string, so a GET-style endpoint that carries its parameters in the URL reaches the external service instead of short-circuiting. Presence is what is tested, not value: an empty string, 0, or false all satisfy a required field, while a missing key or an explicit null does not.
Script Hooks
Endpoints support JavaScript hooks for request/response transformation:Using Service Bridges from Script Steps
Service bridges that are added as project resources can be called directly from script steps in plan workflows. Scripts can discover available bridges withserviceBridge.list() and make HTTP requests with serviceBridge.call().
Using Service Bridges from Data Forms
Data forms can call service bridge endpoints both declaratively and from scripts:Declarative (Selection Options)
In taxonomy definitions, useselectionOptionFormula to populate dropdowns:

