Skip to main content

Quickstart

Get started with VoiceKit in minutes. This guide will walk you through the basics of authentication and making your first outbound call.

Authentication

Before you can use the VoiceKit API, you need to authenticate your requests using an API token.

Getting Your API Token

  1. Sign up for VoiceKit: Create an account at voicekit.com
  2. Navigate to Settings: Go to your account settings page
  3. Generate API Token: Click "Create API Key" and give it a descriptive name
  4. Copy Your Token: Save this token securely - you won't be able to see it again

Using Your API Token

Include your API token in the Authorization header of all requests:

curl -X GET "https://www.voicekit.com/api/validate" \
-H "Authorization: Bearer YOUR_API_TOKEN"
warning

Keep your API token secure! Never commit it to version control or share it publicly. Use environment variables to store your token safely.

Environment Setup

Set your API token as an environment variable:

export VOICEKIT_API_TOKEN="your_api_token_here"

Or in your .env file:

VOICEKIT_API_TOKEN=your_api_token_here

Making Outbound Calls

VoiceKit makes it easy to initiate outbound calls using your configured workflows.

Prerequisites

Before making outbound calls, ensure you have:

Basic Outbound Call

Make your first outbound call with a simple API request. The workflow slug can be retrieved from the URL in the app, e.g. https://www.voicekit.com/app/workflows/workflow_$SLUG.

curl -X POST "https://www.voicekit.com/api/call" \
-H "Authorization: Bearer $VOICEKIT_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"fromPhone": "+1234567890",
"toPhone": "+1234567890",
"workflow": "asdfasf"
}'

Response

A successful call will return:

{
"message": "Call initiated"
}

Call Parameters

ParameterTypeRequiredDescription
toPhonestringThe phone number to call (E.164 format)
fromPhonestringSpecific outbound number to use. Must be owned by your organization.
workflowstringID of the published workflow to use
dynamicVariablesobjectVariables to pass to the workflow

Using Variables

Pass dynamic data to your workflow using variables:

curl -X POST "https://www.voicekit.com/api/call" \
-H "Authorization: Bearer $VOICEKIT_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"fromPhone": "+1234567890",
"toPhone": "+1234567890",
"workflow": "asdfasf",
"dynamicVariables": {
"customer_name": "John Doe",
"appointment_time": "2:00 PM"
}
}'
info

Need help? Contact support at support@voicekit.com