Skip to content

API Reference

Base URL: https://persona-labsvoice-api-production.up.railway.app/v1

All endpoints require Authorization: Bearer plabs_... unless noted otherwise.

Endpoints

Agents

MethodPathDescription
POST/v1/agentsCreate agent
GET/v1/agentsList agents
GET/v1/agents/:idGet agent
PUT/v1/agents/:idUpdate agent
DELETE/v1/agents/:idDelete agent
POST/v1/agents/provisionProvision agent + collection
POST/v1/agents/:id/chatChat with agent
POST/v1/agents/:id/speakAgent TTS
POST/v1/agents/:id/syncSync agent to external platform

Agent Tools

MethodPathDescription
POST/v1/agents/:id/toolsCreate tool
GET/v1/agents/:id/toolsList tools
PUT/v1/agents/:id/tools/:toolIdUpdate tool
DELETE/v1/agents/:id/tools/:toolIdDelete tool
POST/v1/agents/:id/tools/:toolId/testTest tool
POST/v1/agents/:id/tools/discover-mcpDiscover MCP tools

Agent Instances

MethodPathDescription
POST/v1/agents/:id/instancesCreate instance
GET/v1/agents/:id/instancesList instances
PUT/v1/agents/:id/instances/:instanceIdUpdate instance
DELETE/v1/agents/:id/instances/:instanceIdDelete instance

Audience Groups

MethodPathDescription
POST/v1/audience-groupsCreate group
GET/v1/audience-groupsList groups
PUT/v1/audience-groups/:idUpdate group
DELETE/v1/audience-groups/:idDelete group

Agent Tasks

MethodPathDescription
POST/v1/agents/:id/tasksDispatch outbound call
GET/v1/agents/:id/tasksList tasks
GET/v1/agents/:id/tasks/:taskIdGet task detail

Testing

MethodPathDescription
POST/v1/agents/:id/testsCreate test case
GET/v1/agents/:id/testsList test cases
POST/v1/agents/:id/tests/run-selfplayRun self-play test
POST/v1/agents/:id/tests/run-selfplay/streamRun self-play (SSE stream)
POST/v1/agents/:id/tests/run-syntheticRun synthetic test

Text-to-Speech

MethodPathDescription
POST/v1/synthesizeSynthesize speech
GET/v1/voicesList voices
GET/v1/voices/:idGet voice
POST/v1/voices/cloneClone voice
DELETE/v1/voices/:idDelete voice

Speech-to-Text

MethodPathDescription
POST/v1/transcribeTranscribe audio
POST/v1/transcribe/asyncStart async transcription
GET/v1/transcribe/:jobIdGet transcription job

OpenAI-Compatible

MethodPathDescription
POST/v1/audio/speechOpenAI-compatible TTS
POST/v1/audio/transcriptionsOpenAI-compatible STT
GET/v1/audio/modelsList available audio models

Collections (RAG)

MethodPathDescription
POST/v1/collectionsCreate collection
GET/v1/collectionsList collections
GET/v1/collections/:idGet collection
DELETE/v1/collections/:idDelete collection
POST/v1/collections/:id/ingestIngest content
POST/v1/collections/:id/searchSearch collection
DELETE/v1/collections/:id/documents/:docIdDelete document

Sessions

MethodPathDescription
POST/v1/sessions/twilioCreate Twilio session
WS/v1/sessions/twilio/streamTwilio media stream
WS/v1/agents/:id/sessionDirect agent WebSocket

Observability

MethodPathDescription
GET/v1/observability/sessionsList session traces
GET/v1/observability/sessions/:idGet session detail
GET/v1/observability/sessions/:id/root-causeRoot cause analysis
GET/v1/observability/sessions/interruption-qualityInterruption quality metrics
GET/v1/observability/calls/:callIdGet call detail
GET/v1/observability/calls/:callId/root-causeCall root cause analysis
GET/v1/recordings/:callIdGet call recording

Conversations

MethodPathDescription
GET/v1/conversationsList conversations
GET/v1/conversations/:idGet conversation detail

Keys & Billing

MethodPathDescription
POST/v1/keysCreate API key
GET/v1/keysList keys
DELETE/v1/keys/:idRevoke key
POST/v1/keys/:id/rotateRotate key
GET/v1/usageGet usage stats
GET/v1/billing/subscriptionGet subscription
POST/v1/billing/checkoutCreate checkout session
POST/v1/billing/portalBilling portal

Provider Keys

MethodPathDescription
POST/v1/provider-keysStore provider key
GET/v1/provider-keysList stored keys
POST/v1/provider-keys/:provider/verifyVerify key
DELETE/v1/provider-keys/:providerDelete stored key

Evaluation

MethodPathDescription
POST/v1/eval/transcripts/rate-batchBatch rate transcripts

Other

MethodPathDescription
GET/healthHealth check (no auth)
GET/readyReadiness check (no auth)
GET/openapi.jsonOpenAPI specification (no auth)
GET/v1API version and endpoint listing

Pagination

List endpoints use cursor-based pagination:

bash
# First page
curl "https://persona-labsvoice-api-production.up.railway.app/v1/agents?limit=20"

# Next page
curl "https://persona-labsvoice-api-production.up.railway.app/v1/agents?limit=20&cursor=agent_last_id"

Response shape:

json
{
  "data": [...],
  "nextCursor": "agent_xyz",
  "hasMore": true
}

Error Format

json
{
  "code": "NOT_FOUND",
  "message": "Agent not found",
  "requestId": "req_abc123"
}

Common codes: NOT_FOUND, VALIDATION_ERROR, UNAUTHORIZED, RATE_LIMITED, PROVIDER_UNAVAILABLE, INTERNAL_ERROR.

Built by Persona Labs.