# Quickstart

Deploy a voice function from zero in about five minutes.

## Prerequisites

- CLI installed: `npm install -g @sinch/cli`
- Authenticated: `sinch auth login`


If you have not done these yet, see [Installation](/docs/functions/cli/installation).

## Step 1 — Authenticate

```bash
sinch auth login
```

The CLI prompts for your Project ID, Key ID, and Key Secret. Skip if already authenticated.

## Step 2 — Initialize a function

```bash
sinch functions init simple-voice-ivr --name my-first-function
```

The CLI downloads the template and creates a `my-first-function/` directory. For Node.js, it runs `npm install` automatically.

Beyond `--name`, `init` is interactive: it asks for any template-specific variables (for `simple-voice-ivr`, your **company name**), whether to **auto-configure voice integration** on deploy, and whether to enable a **database** (No / Basic / Pro). Pass `--non-interactive` to accept the defaults.

To see all available templates:

```bash
sinch templates list
```

## Step 3 — Enter the project directory

```bash
cd my-first-function
```

## Step 4 — Start the local development server

```bash
sinch functions dev
```

Select **Yes** when prompted about the tunnel to get a public URL that Sinch can reach. Leave this terminal running.

## Step 5 — Test locally with curl

In a second terminal:

```bash
curl -s -X POST http://localhost:3000/ice \
  -H "Content-Type: application/json" \
  -d '{"callid":"test-123","cli":"+15551234567","to":{"type":"number","endpoint":"+15559876543"},"domain":"pstn","originationType":"pstn"}' \
  | cat
```

You should receive a SVAML response with a voice menu.

## Step 6 — Deploy

```bash
sinch functions deploy
```

The CLI packages your code, uploads it, and streams deployment progress:

```
Deployment Complete!
  Function: my-first-function
  Status: Running
  URL: https://<name>.fn.sinch.com
```

For C# functions, the CLI builds and health-checks locally before packaging.

## Step 7 — Watch logs

```bash
sinch functions logs --follow
```

Opens an interactive terminal UI showing each request. Arrow keys to navigate, Enter to expand, `q` to exit.

## What's next

- [Local development](/docs/functions/functions/local-development) — hot reload, debugging, secrets
- [Build an IVR guide](/docs/functions/functions/guides/build-an-ivr) — menus, DTMF, call routing patterns
- [Templates](/docs/functions/functions/templates) — all available starting points
- [CLI reference](/docs/functions/cli) — full command reference