{"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":"cli-quickstart","__idx":0},"children":["CLI quickstart"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You'll end up with: a rented phone number and an SMS sent to your own phone. No code, no deploys, just the CLI."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":1},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Sinch CLI installed: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["npm install -g @sinch/cli"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A Sinch account with a Project ID, API key, and API secret (find them in the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://dashboard.sinch.com"},"children":["Sinch Dashboard"]}," under your project's Access Keys)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you have not done the install, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/functions/cli/installation"},"children":["Installation"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-1--log-in","__idx":2},"children":["Step 1 — Log in"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"sinch auth login\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The CLI prompts for your Project ID, Key ID, and Key Secret. These are stored in your OS keychain (not in a config file) so they don't leak into shell history or source control."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Verify the login worked:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"sinch auth status\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You should see your Project ID printed."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-2--search-for-an-available-number","__idx":3},"children":["Step 2 — Search for an available number"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"sinch numbers available search --region US --type LOCAL\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You will see a list of available numbers with their monthly cost and capabilities. Pick one that suits you."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Filter to SMS-capable:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"sinch numbers available search --region US --type LOCAL --capabilities SMS\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Region is an ISO country code (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["US"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GB"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SE"]},", …). Type is one of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LOCAL"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MOBILE"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TOLL_FREE"]},". Capabilities take one or more of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SMS"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["VOICE"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-3--rent-it","__idx":4},"children":["Step 3 — Rent it"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"sinch numbers available rent\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Run without arguments for the interactive flow — the CLI walks you through picking a number from your search results, confirming the cost, and renting it. It appears in your active-numbers inventory right away:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"sinch numbers active list\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-4--send-an-sms","__idx":5},"children":["Step 4 — Send an SMS"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sinch conversation send"]}," takes the recipient and message as positional arguments:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"sinch conversation send +15559876543 \"Hello from the Sinch CLI!\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can force a specific channel with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--channel"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"sinch conversation send +15559876543 \"Hi on WhatsApp!\" --channel WHATSAPP\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The command uses the Sinch Conversation API, so WhatsApp, Messenger, Viber, and other channels all work the same way as long as your Conversation App is configured for them."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-5--try-the-other-apis","__idx":6},"children":["Step 5 — Try the other APIs"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You now have everything wired up. Some things you can do from here without writing code:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# Send a fax\nsinch fax send --from +15551234567 --to +15559876543 --file invoice.pdf\n\n# List your SIP trunks\nsinch sip trunks list\n\n# Store an API key in the keychain so a deployed Function can use it\nsinch secrets add STRIPE_SECRET_KEY sk_live_abc123\n\n# Look at your phone number's configuration\nsinch numbers active get +15551234567\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-6--release-the-number-optional","__idx":7},"children":["Step 6 — Release the number (optional)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you rented a number just to test, release it so you are not billed for it:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"sinch numbers active release +15551234567\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"whats-next","__idx":8},"children":["What's next"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#"},"children":["Deploy a Function"]}]}," — host voice or messaging logic that Sinch calls whenever something happens on your number."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/functions/cli/overview"},"children":["CLI command reference"]}]}," — everything the CLI can do."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/functions/concepts/architecture"},"children":["Architecture"]}]}," — how the CLI, Sinch platform, and your Function fit together."]}]}]},"headings":[{"value":"CLI quickstart","id":"cli-quickstart","depth":1},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Step 1 — Log in","id":"step-1--log-in","depth":2},{"value":"Step 2 — Search for an available number","id":"step-2--search-for-an-available-number","depth":2},{"value":"Step 3 — Rent it","id":"step-3--rent-it","depth":2},{"value":"Step 4 — Send an SMS","id":"step-4--send-an-sms","depth":2},{"value":"Step 5 — Try the other APIs","id":"step-5--try-the-other-apis","depth":2},{"value":"Step 6 — Release the number (optional)","id":"step-6--release-the-number-optional","depth":2},{"value":"What's next","id":"whats-next","depth":2}],"frontmatter":{"seo":{"title":""}},"lastModified":"2026-04-15T14:23:23.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/functions/cli/quickstart","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}