Skip to content

Gateway Headers Reference

All headers injected or expected by the SlaunchX gateway layer.

Secure Channel Headers

HeaderRequiredChainDescription
X-SC-Session-IdConditionalWEBSecure Channel session ID. Required for endpoints that accept encrypted payloads.
X-SC-VersionConditionalWEBSecure Channel protocol version. Sent alongside X-SC-Session-Id.

Content-Type for Secure Channel

When Secure Channel is active, the request body contains a binary SCv2 envelope, but the Content-Type header remains application/json;charset=UTF-8. The gateway detects encrypted payloads by inspecting the binary magic bytes, not the Content-Type.

Gateway Headers (WEB Chain)

HeaderRequiredChainDescription
X-Request-IdRequiredWEB / APIUnique request identifier (UUID). Used for tracing and idempotency.
X-PORTAL-ACCESS-CODERequiredWEBPortal access code. Identifies which portal the request is entering through.
X-Workspace-IdConditionalWEBWorkspace context. Required for workspace-scoped operations.
X-LOCALEOptionalWEBResponse locale override (e.g., en, zh).
X-Client-HashRequiredWEBClient device fingerprint. Must remain stable across the session.
User-AgentRequiredWEB / APIClient user agent string.
Accept-LanguageOptionalWEB / APIPreferred response language.

Cloudflare Headers

These headers are injected by Cloudflare and forwarded by the gateway. In local development, you must set them manually.

HeaderRequiredChainDescription
CF-Connecting-IPRequiredWEB / APIClient IP address (set by Cloudflare).
cf-ipcountryRequiredWEB / APIClient country code (ISO 3166-1 alpha-2).
Cf-RayRequiredWEB / APICloudflare ray ID for request tracing.
X-Forwarded-ProtoRequiredWEB / APIForwarded protocol (https).
cf-regionOptionalWEB / APIClient region.
cf-ipcityOptionalWEB / APIClient city.
cf-iplatitudeOptionalWEB / APIClient latitude.
cf-iplongitudeOptionalWEB / APIClient longitude.
cf-postal-codeOptionalWEB / APIClient postal code.
cf-timezoneOptionalWEB / APIClient timezone.

Authentication Headers

HeaderRequiredChainDescription
AuthorizationConditionalWEBBearer <JWT>. Required for authenticated endpoints.
Exposed-Credential-CheckOptionalWEBIndicates the credential has been checked against breach databases.

API Chain Headers

HeaderRequiredChainDescription
X-Api-KeyRequiredAPIAPI key identifier.
X-TimestampRequiredAPIRequest timestamp (epoch seconds). Must be within 60 seconds of server time.
X-NonceRequiredAPIUnique nonce for replay protection.
X-SignatureRequiredAPIHMAC signature of the request.

SlaunchX Internal Documentation