{"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":"deployment","__idx":0},"children":["Deployment"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When you run ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sinch functions deploy"]},", the CLI packages your source code and uploads it to the Sinch platform. The platform builds, deploys, and rolls out your function. You get a stable HTTPS URL."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This page walks through what happens during a deploy, what the CLI decides vs what the platform decides, and what your options are."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"the-end-to-end-flow","__idx":1},"children":["The end-to-end flow"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Validation."]}," The CLI makes sure your project is healthy before uploading anything.",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Node:"]}," typecheck (if ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tsconfig.json"]}," is present), bundle with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tsup"]},", lint if configured."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["C#:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dotnet build"]},", then start the function locally and hit ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /health"]}," to confirm it boots. If the build fails or the health check times out, the deploy is aborted."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Documentation prompt."]}," The CLI may offer to generate or update ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["README.md"]},". Skip with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--no-docs"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Packaging."]}," The CLI zips your source directory. These are excluded automatically: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["node_modules/"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bin/"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["obj/"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".git/"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".env"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".vscode/"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".idea/"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".vs/"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Configuration resolution."]}," The CLI reads ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sinch.json"]}," (variables) and your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".env"]}," keys (secrets). Empty values trigger a keychain lookup to pull the secret from your OS keychain, and the resolved set is sent alongside the source."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Access-level choice."]}," Public (internet-accessible) or private (internal to Sinch services only). You pick interactively, or use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--private"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--non-interactive"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Upload."]}," The CLI streams the ZIP and the config to the Sinch platform over HTTPS."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Build and roll out (platform-side)."]}," The platform builds your function. Builds are deterministic — if an identical build already exists, it's reused and this step finishes in seconds. Otherwise a fresh build runs. On success, the new version is rolled out and traffic is routed to it."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Callback URL updates."]}," If your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sinch.json"]}," binds the function to a Voice App or Conversation App, the CLI updates that app's callback URL to point at the new function URL (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://fn-<id>.functions.sinch.com"]},")."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Wait for completion."]}," The CLI streams build and deploy progress in real time until the rollout is finished."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"usage","__idx":2},"children":["Usage"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"sinch functions deploy                   # interactive\nsinch functions deploy --non-interactive # CI/CD mode: defaults to public, auto-generates docs\nsinch functions deploy --no-wait         # submit and exit immediately\nsinch functions deploy --private         # internal access only\nsinch functions deploy --no-docs         # skip README generation\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"deployment-statuses","__idx":3},"children":["Deployment statuses"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The CLI surfaces these as the rollout progresses:"]},{"$$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":"Status"},"children":["Status"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Meaning"},"children":["Meaning"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Pending"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Queued, waiting for a build slot."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Building"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your function is being built."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Running"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Function is live and serving traffic."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Failed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Build or deploy failed — check ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sinch functions logs"]},"."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"what-you-get-after-a-successful-deploy","__idx":4},"children":["What you get after a successful deploy"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["A stable URL."]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://fn-<name>-<id>.functions.sinch.com"]}," — doesn't change between deploys. Same name = same URL."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["A function ID"]}," written back to your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sinch.json"]}," so subsequent CLI commands know what to target."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /health"]}," endpoint"]}," provided by the runtime, used by the platform for liveness checks. You don't implement it."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Callback URLs pointed at the new function"]}," (if ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sinch.json"]}," configures a Voice App or Conversation App binding)."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"determinism-and-rebuilds","__idx":5},"children":["Determinism and rebuilds"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Builds are keyed on a hash of your source + dependencies + runtime version. If you redeploy with no changes, the platform skips the build step and reuses the existing image — deploys in this mode take seconds. If anything has changed, a fresh build runs."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This means you can safely redeploy as a \"force rollout\" — the build cost is paid only when the source actually changes."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"the-rollback-question","__idx":6},"children":["The rollback question"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["There is no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sinch functions rollback"]}," today. The supported pattern is:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Keep the last-known-good version in source control (tag it)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If a bad deploy breaks things, check out the tag and run ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sinch functions deploy"]}," again."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The deterministic build cache usually makes this take only a few seconds."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related","__idx":7},"children":["Related"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#"},"children":["Local vs production"]}," — what changes between dev and deployed"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/functions/cli/commands/functions"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sinch functions"]}," commands"]}," — full CLI reference for functions-related commands"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#"},"children":["Monitoring"]}," — how to stream logs and debug failed deploys"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/functions/concepts/architecture"},"children":["Architecture"]}," — end-to-end view of how your function reaches production"]}]}]},"headings":[{"value":"Deployment","id":"deployment","depth":1},{"value":"The end-to-end flow","id":"the-end-to-end-flow","depth":2},{"value":"Usage","id":"usage","depth":2},{"value":"Deployment statuses","id":"deployment-statuses","depth":2},{"value":"What you get after a successful deploy","id":"what-you-get-after-a-successful-deploy","depth":2},{"value":"Determinism and rebuilds","id":"determinism-and-rebuilds","depth":2},{"value":"The rollback question","id":"the-rollback-question","depth":2},{"value":"Related","id":"related","depth":2}],"frontmatter":{"seo":{"title":""}},"lastModified":"2026-04-15T14:23:23.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/functions/concepts/deployment","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}