Sinch Functions provides pre-initialized Sinch SDK clients through the function context. Except for context.voice, clients are only available when their required environment variables are present — accessing an unconfigured client returns null (C#) or undefined (Node.js).
API Availability by Runtime
API
Node.js
C#
Required Config
Voice (v2)
context.voice
context.Voice
Base credentials only. Always present; calls fail without them
All Sinch API integrations require these base credentials:
Variable
Description
PROJECT_ID
Your Sinch project ID
PROJECT_ID_API_KEY
Project-scoped API key
PROJECT_ID_API_SECRET
Project-scoped API secret
Set automatically when you run sinch auth login.
Environment Variables Reference
Base (always required)
Variable
Description
PROJECT_ID
Sinch project ID
PROJECT_ID_API_KEY
Project API key (key ID)
PROJECT_ID_API_SECRET
Project API secret
Voice API
Variable
Description
VOICE_SERVICE_ID
Voice API v2 service the function is bound to. sinch functions init writes it when you pick or create a service, and deploy points that service's webhook at the function. In Node.js, outbound context.voice calls also go through this service
VOICE_SERVICE_SECRET
Optional. Signing secret of that service; deploy sets it, so leave it out of .env. When WEBHOOK_PROTECTION calls for a check, the runtime verifies inbound Voice API v2 webhooks with it; while it is unset (local runs, or a deploy that could not read the service), they are accepted with a one-time warning. To run locally against real calls, set it from serviceSecret on GET /v2/projects/{projectId}/services/{serviceId}
WEBHOOK_PROTECTION
When to verify webhook signatures: deploy (default: on the deployed function only), always, or never. C# reads the WebhookProtection setting instead, at the top level or under Security
VOICE_APPLICATION_KEY
Voice API v1 only (context.voice.v1): application key
VOICE_APPLICATION_SECRET
Voice API v1 only (context.voice.v1): application secret
Conversation API
Variable
Description
CONVERSATION_APP_ID
Conversation application ID
CONVERSATION_REGION
Region: US (default), EU, or BR — C# only
SMS API
Variable
Description
SMS_SERVICE_PLAN_ID
SMS service plan ID
Numbers API
Variable
Description
ENABLE_NUMBERS_API
Set to true to enable
Verification API (C# only)
Variable
Description
VERIFICATION_APPLICATION_ID
Verification application ID
VERIFICATION_APPLICATION_SECRET
Verification application secret
ElevenLabs
Variable
Description
ELEVENLABS_API_KEY
ElevenLabs API key
ELEVENLABS_AGENT_ID
Agent ID for Conversational AI
ELEVENLABS_AUTO_CONFIGURE
Set to true to auto-configure webhook during tunnel start
Runtime internals (set automatically)
Variable
Description
API_URL
Internal API URL (set by the platform)
FUNCTION_ID
Function ULID (set by the platform)
PORT
HTTP port (default: 3000)
VERBOSE
Set to true for detailed runtime logging
Notes
Clients are lazily initialized and cached on first access. Changing environment variables at runtime does not re-initialize clients.
The @sinch/sdk-core package underpins all Node.js clients. The Sinch NuGet package underpins all C# clients.