Skip to main content

Getting Started with Sawt API

This guide will help you quickly integrate the Sawt AI voice assistant into your applications.

Step 1: Get your API key

1

Create an account

Sign up for a Sawt account at app.sawt.sa
2

Create an agent

Navigate to the Agents section and create a new voice agent
3

Get your API key

Go to API Keys section and generate a new key

Step 2: Make your first call

Using cURL

curl -X POST "https://app.sawt.sa/api/v1/calls/outbound" \
  -H "Authorization: Bearer YOUR_SAWT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phoneNumber": "966501234567",
    "agentId": "YOUR_AGENT_ID",
    "promptVariables": {
      "customer_name": "Mohammed"
    }
  }'

Using JavaScript

const axios = require("axios");

async function makeCall() {
  try {
    const response = await axios.post(
      "https://app.sawt.sa/api/v1/calls/outbound",
      {
        phoneNumber: "966501234567",
        agentId: "YOUR_AGENT_ID",
        promptVariables: {
          customer_name: "Mohammed",
        },
      },
      {
        headers: {
          Authorization: "Bearer YOUR_SAWT_API_KEY",
          "Content-Type": "application/json",
        },
      }
    );

    console.log("Call initiated:", response.data);
  } catch (error) {
    console.error(
      "Error:",
      error.response ? error.response.data : error.message
    );
  }
}

makeCall();

Step 3: Explore more features

Need help?

Contact Support

Our team is ready to help you with any questions or issues