{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/functions/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["partial"]},"type":"markdown"},"seo":{"title":"Developer Documentation","siteUrl":"https://developers.sinch.com","llmstxt":{"title":"Sinch Developer Documentation","description":"LLMs.txt containing a map of all the documentation files for Sinch.","sections":[{"title":"SMS API","description":"The SMS API allows you to send and receive SMS messages with a few easy steps. You can also send bulk SMS messages to multiple customers using the Sinch SMS service.","includeFiles":["docs/sms/**/*.md","docs/sms/**/*.yaml"],"excludeFiles":["docs/sms/index.md"]},{"title":"Numbers API","description":"The Numbers API enables you to search for, view, and activate numbers. It's considered a precursor to other APIs in the Sinch product family. The numbers API can be used in tandem with any of our APIs that perform messaging or calling.","includeFiles":["docs/numbers/**/*.md","docs/numbers/**/*.yaml"],"excludeFiles":["docs/numbers/index.md"]},{"title":"Conversation API","description":"Send and receive messages globally on many popular channels with ease and confidence when using Sinch's Conversation API. Conversation API is the preferred API for sending mobile messages on SMS and other social channels with Sinch. It is a simple API with unified error messages, consistent request payloads, and common webhook payloads that are channel-agnostic.","includeFiles":["docs/conversation/**/*.md","docs/conversation/**/*.yaml"],"excludeFiles":["docs/conversation/index.md"]},{"title":"Voice API","description":"The Voice API works as a big telephony switch. The Voice API handles incoming phone calls (also known as incoming call “legs”), sets up outgoing phone calls (or outgoing call “legs”), and bridges the two. The incoming call leg may come in over a data connection (from a smartphone or web application using the Sinch SDKs) or through a local phone number (from the PSTN network). Similarly, the outgoing call leg can be over data (to another smartphone or web application using the Sinch SDKs) or the PSTN network.","includeFiles":["docs/voice/**/*.md","docs/voice/**/*.yaml"],"excludeFiles":["docs/voice/index.md"]},{"title":"Verification API","description":"The Verification API is a platform for phone number verification. It consists of the API and different software development kits (the Sinch SDKs) that you integrate with your smartphone or web application and cloud based back-end services. Together they enable SMS, Flashcall, Phone Call and Data verification in your application.","includeFiles":["docs/verification/**/*.md","docs/verification/**/*.yaml"],"excludeFiles":["docs/verification/index.md"]},{"title":"Provisioning API","description":"Provisioning API allows you to programmatically set up your senders, accounts and templates on your favorite messaging platforms on the Conversation API. For now, you can create your first WhatsApp channel through Meta's Embedded sign up, you can configure your first SMS App and configure your webhooks. As development continues, we will be adding the most commonly used channels.","includeFiles":["docs/provisioning-api/**/*.md","docs/provisioning-api/**/*.json"],"excludeFiles":["docs/provisioning-api/index.md"]},{"title":"Elastic SIP Trunking API","description":"With Elastic SIP Trunking you can create and manage your SIP trunks and phone numbers programmatically.","includeFiles":["docs/est/**/*.md","docs/est/**/*.yaml"],"excludeFiles":["docs/est/index.md"]},{"title":"Fax API","description":"Send and receive HIPAA compliant faxes on our modern fax platform using our developer-friendly API.","includeFiles":["docs/fax/**/*.md","docs/fax/**/*.yaml"],"excludeFiles":["docs/fax/index.md"]},{"title":"In-app Voice and Video SDK","description":"The In-app Voice and Video SDK enables you to add voice and video calling capabilities directly into your mobile or web application using the Sinch SDKs.","includeFiles":["docs/in-app-calling/**/*.md"],"excludeFiles":["docs/in-app-calling/index.md"]}],"hide":false,"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"sinch-cli","__idx":0},"children":["Sinch CLI"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Sinch CLI handles the full lifecycle: create from template, develop locally, deploy to production, and manage running functions."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The CLI is two things in one binary:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["A Sinch developer tool"]}," — rent numbers, send SMS and fax, configure voice apps, manage SIP trunks, handle number porting. No Function required."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["A Functions toolchain"]}," — scaffold from templates, run locally, deploy to production, stream logs, inspect deployed state."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"what-it-does","__idx":1},"children":["What it does"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Functions"]}," — create, deploy, develop locally, stream logs, download, delete"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Templates"]}," — browse and initialize from pre-built templates (Node.js, C#)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Voice"]}," — manage voice applications and callback URLs, make outbound calls (TTS, conference, custom SVAML), control in-progress calls, manage conferences"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Numbers"]}," — search, rent, and manage phone numbers"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Porting"]}," — port existing phone numbers in and out of Sinch"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Conversation"]}," — send messages (SMS, WhatsApp, Messenger, etc.), manage apps, contacts, webhooks"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Fax"]}," — send faxes, check status"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["SIP Trunking"]}," — manage trunks, endpoints, ACLs, credential lists"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Secrets"]}," — store API keys and credentials in the OS keychain"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/functions/cli/commands/function-utilities"},"children":["Function utilities"]}]}," — inspect deployed function database, storage, status; generate docs; manage developer skills"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"installation","__idx":2},"children":["Installation"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sh","header":{"controls":{"copy":{}}},"source":"npm install -g @sinch/cli\n","lang":"sh"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"configuration","__idx":3},"children":["Configuration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Configuration is stored in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["~/.sinch/config.json"]},". Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sinch config set"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sinch auth login"]}," to update values."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["projectId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your Sinch project ID"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["apiUrl"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["SinchFunctions API URL (defaults to production)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["keyId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Public key identifier (non-secret)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["defaultApplicationKey"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Voice application key (non-secret)"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"authentication","__idx":4},"children":["Authentication"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Authentication uses your Sinch API key credentials (Key ID + Key Secret from the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://dashboard.sinch.com"},"children":["Sinch Dashboard"]}," under Project > Access Keys)."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["On login, the CLI:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Accepts your Key ID and Key Secret"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Exchanges them for an OAuth 2.0 access token"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Stores credentials securely in the OS keychain"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Automatically refreshes the OAuth token on expiry"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Voice application credentials (Application Key + Application Secret) are optional and only required for voice callback commands."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"environment-variable-override","__idx":5},"children":["Environment variable override"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For CI/CD pipelines, bypass the keychain with environment variables:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sh","header":{"controls":{"copy":{}}},"source":"SINCH_PROJECT_ID=...\nSINCH_KEY_ID=...\nSINCH_KEY_SECRET=...\n","lang":"sh"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"config-profiles","__idx":6},"children":["Config profiles"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Profiles let you switch between multiple Sinch projects without re-authenticating."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sh","header":{"controls":{"copy":{}}},"source":"sinch config profile create staging    # create a new profile\nsinch config profile use staging       # switch to it\nsinch config profile list              # show all profiles\nsinch config profile delete staging    # remove a profile\n","lang":"sh"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--profile <name>"]}," on any command to override the active profile for that invocation."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"global-flags","__idx":7},"children":["Global flags"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Flag"},"children":["Flag"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-h, --help"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Show help for the current command"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-V, --version"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Print CLI version"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--profile <name>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Use a specific credential profile"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"debug-environment-variables","__idx":8},"children":["Debug environment variables"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Variable"},"children":["Variable"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Effect"},"children":["Effect"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DEBUG=1"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enable verbose debug logging"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DEBUG_HTTP=1"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Log HTTP requests and responses"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SINCH_DEBUG=1"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Print stack traces on uncaught errors"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"quick-start","__idx":9},"children":["Quick start"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sh","header":{"controls":{"copy":{}}},"source":"sinch auth login                  # authenticate\nsinch templates list              # browse available templates\nsinch functions init              # create a function\nsinch functions dev               # start local dev server\nsinch voice applications callbacks set <url>  # point your Voice app at your function\nsinch functions deploy            # deploy to production\nsinch functions logs --follow     # stream live logs\n","lang":"sh"},"children":[]}]},"headings":[{"value":"Sinch CLI","id":"sinch-cli","depth":1},{"value":"What it does","id":"what-it-does","depth":2},{"value":"Installation","id":"installation","depth":2},{"value":"Configuration","id":"configuration","depth":2},{"value":"Authentication","id":"authentication","depth":2},{"value":"Environment variable override","id":"environment-variable-override","depth":3},{"value":"Config profiles","id":"config-profiles","depth":2},{"value":"Global flags","id":"global-flags","depth":2},{"value":"Debug environment variables","id":"debug-environment-variables","depth":2},{"value":"Quick start","id":"quick-start","depth":2}],"frontmatter":{"seo":{"title":""}},"lastModified":"2026-02-22T19:51:31.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/functions/cli/overview","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}