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
- Sign up for VoiceKit: Create an account at voicekit.com
- Navigate to Settings: Go to your account settings page
- Generate API Token: Click "Create API Key" and give it a descriptive name
- 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"
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:
- ✅ A valid API token
- ✅ At least one workflow. Create one from the app home page.
- ✅ A phone number configured. Buy or import from Twilio from our Settings page.
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
Parameter | Type | Required | Description |
---|---|---|---|
toPhone | string | ✅ | The phone number to call (E.164 format) |
fromPhone | string | ✅ | Specific outbound number to use. Must be owned by your organization. |
workflow | string | ✅ | ID of the published workflow to use |
dynamicVariables | object | ❌ | Variables 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"
}
}'
Need help? Contact support at support@voicekit.com