Skip to main content
POST
/
api
/
public
/
agents
Create an agent
curl --request POST \
  --url https://astrasend-mocha.vercel.app/api/public/agents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Booking bot",
  "channel": "voice",
  "system_prompt": "You book callbacks for Acme.",
  "greeting": "Hi, this is Acme!",
  "voice_id": "voice_abc"
}
'
{
  "ok": true
}

Authorizations

Authorization
string
header
required

Your API key (as_live_…), created under Settings → API keys.

Body

application/json
name
string
required
system_prompt
string
required
channel
enum<string>
default:sms
Available options:
sms,
voice
goal
string
greeting
string
voice_id
string

Required for voice agents.

language
string
default:en-US

Response

Success

ok
boolean
Example:

true