Quickstart

Send your first voice note in under 5 minutes — LinkedIn or Telegram.

Step 1: Get your API key

Sign up at svarapi.io/dashboard. Your API key appears immediately after signup. Keys use sk_test_ for sandbox and sk_live_ for production.

export SVARA_API_KEY="sk_test_your_key_here"

Keep your key secret — never expose it in client-side code or public repos.


LinkedIn quickstart

Step 2: Get your LinkedIn session credentials

Open LinkedIn in Chrome and sign in. Then open DevTools:

  • Mac: Cmd + Option + I
  • Windows: F12 or Ctrl + Shift + I

Go to the Application tab → Cookieshttps://www.linkedin.com.

You need two values:

| Cookie name | What to copy | |---|---| | li_at | The full value — starts with AQEDAQ... | | JSESSIONID | This is your csrf_token — starts with "ajax:...". Remove the surrounding " quotes |

export LI_AT="AQEDAQe7xYkA1cXvBnUlP..."
export CSRF_TOKEN="ajax:1234567890123456789"

Step 3: Send your first LinkedIn voice note

Copy and paste this command, replacing the credentials and recipient:

curl -X POST https://api.svarapi.io/v1/send \
  -H "Authorization: Bearer $SVARA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "linkedin",
    "recipient": "jane-smith-a1b2c3",
    "audio_url": "https://cdn.svarapi.io/test/hello.m4a",
    "session": {
      "li_at": "'"$LI_AT"'",
      "csrf_token": "'"$CSRF_TOKEN"'"
    }
  }'

The recipient is the LinkedIn profile slug — the part after /in/ in their profile URL. For linkedin.com/in/jane-smith-a1b2c3, the recipient is jane-smith-a1b2c3.

Step 4: Check your LinkedIn inbox

Open LinkedIn messages. You'll see the voice note appear as a native blue waveform — exactly as if you'd recorded it from the mobile app.

{
  "id": "msg_a1b2c3d4e5f6",
  "status": "queued",
  "platform": "linkedin",
  "recipient": "jane-smith-a1b2c3",
  "created_at": "2026-03-14T12:00:00Z"
}

Telegram quickstart

Step 2: Create a Telegram bot

  1. Open Telegram and message @BotFather
  2. Send /newbot
  3. Choose a name and username when prompted
  4. BotFather replies with your bot token — save it
export TELEGRAM_BOT_TOKEN="7000000000:AAH-abc123xyz"

Step 3: Start a conversation with your bot

Open your bot in Telegram (BotFather gives you a t.me/YourBotName link) and send /start. Bots can only message users who've initiated contact.

Step 4: Get your chat ID

Visit this URL in your browser (replace with your token):

https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates

Look for "chat": {"id": 123456789} in the response — that's your chat ID.

export CHAT_ID="123456789"

Step 5: Send your first Telegram voice note

curl -X POST https://api.svarapi.io/v1/send \
  -H "Authorization: Bearer $SVARA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "telegram",
    "recipient": "'"$CHAT_ID"'",
    "audio_url": "https://cdn.svarapi.io/test/hello.m4a",
    "session": {
      "bot_token": "'"$TELEGRAM_BOT_TOKEN"'"
    }
  }'

Step 6: Check Telegram

Open your chat with the bot. The voice note appears as a native playable waveform.


WhatsApp quickstart

Step 2: Create a WhatsApp session

WhatsApp uses session-based authentication. First, create a session to get a QR code:

curl -X POST https://api.svarapi.io/v1/whatsapp/sessions \
  -H "Authorization: Bearer $SVARA_API_KEY"

This returns a session_id and a qr_code (base64 PNG image). Display the QR code and scan it with WhatsApp (Settings → Linked Devices → Link a Device).

Step 3: Check session status

Poll until the session is connected:

curl https://api.svarapi.io/v1/whatsapp/sessions/$SESSION_ID \
  -H "Authorization: Bearer $SVARA_API_KEY"

Wait for "status": "connected".

Step 4: Send your first WhatsApp voice note

curl -X POST https://api.svarapi.io/v1/send \
  -H "Authorization: Bearer $SVARA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "whatsapp",
    "recipient": "441234567890",
    "audio_url": "https://cdn.svarapi.io/test/hello.m4a",
    "session": {
      "session_id": "'"$SESSION_ID"'"
    }
  }'

The recipient is the phone number with country code, no + prefix. Svara automatically converts the audio to WhatsApp's required OGG Opus format.

Step 5: Check WhatsApp

Open the chat with the recipient. The voice note appears as a native green waveform — exactly as if recorded from the WhatsApp app.


Test audio file

Don't have an audio file handy? Use our test file:

https://cdn.svarapi.io/test/hello.m4a

A 5-second "Hey, this is a test voice note from Svara" clip in M4A format. Works with LinkedIn, Telegram, and WhatsApp (auto-converted to OGG Opus).


Try the test playground

Skip the terminal entirely — use the Test Playground to send a real voice note from your browser in 2 minutes. Upload audio, enter your credentials, and hit send.


Understand the response

Every request returns a 202 Accepted with a message ID:

{
  "id": "msg_a1b2c3d4e5f6",
  "status": "queued",
  "platform": "telegram",
  "recipient": "123456789",
  "created_at": "2026-03-14T12:00:00Z"
}

Status values

| Status | Meaning | |---|---| | queued | Accepted and waiting to be processed | | processing | Audio is being converted and prepared | | sent | Delivered to the platform | | delivered | Confirmed read/received (where supported) | | failed | Delivery failed — check error details |

Next steps

Ask Svara

Hey! I'm the Svara assistant. Ask me anything about integrating voice notes into your product.

Powered by Svara