Skip to main content

Enums

The schema defines 14 custom PostgreSQL enum types for type-safe status tracking and categorization.

user_role

Defines access levels for platform users.

ValueDescription
agency_ownerFull access to agency resources, can manage credentials and delete agents
agency_adminCan manage agents, phone numbers, and campaigns
agency_memberRead access to agency data
client_adminAdmin access scoped to a specific client
client_viewerRead-only access scoped to a specific client
adminPlatform-level administrator

Used by: users.role

call_direction

Direction of a phone call.

ValueDescription
inboundIncoming call to a Telnyx number
outboundOutgoing call initiated by the platform

Used by: agency_phone_numbers.direction, agent_mappings.default_direction, calls.direction

phone_number_status

Lifecycle status of a purchased phone number.

ValueDescription
pendingNumber purchase initiated, not yet confirmed
activeNumber is live and can receive/make calls
inactiveNumber is temporarily disabled
releasedNumber permanently released back to Telnyx

Used by: agency_phone_numbers.status

batch_status

Status of an outbound call batch operation.

ValueDescription
pendingBatch created but not yet started
scheduledBatch scheduled for future execution
processingBatch is actively making calls
pausedBatch execution temporarily paused
completedAll contacts in the batch have been processed
failedBatch terminated due to errors

Used by: call_batches.status

batch_mode

Execution mode for a call batch.

ValueDescription
immediateStart processing as soon as created
scheduledWait until scheduled_for timestamp

Used by: call_batches.mode

call_source

How a call record was created in the system.

ValueDescription
webhookCreated from a real-time Ultravox webhook event
historical_syncImported during a historical sync job

Used by: calls.source

transcript_status

Processing state of a call's transcript.

ValueDescription
pendingTranscript not yet fetched
fetchingTranscript fetch in progress
completedTranscript successfully retrieved
failedTranscript fetch failed after max retries

Used by: calls.transcript_status

analysis_status

Processing state of a call's AI analysis.

ValueDescription
pendingAnalysis not yet started
processingAnalysis in progress
completedAnalysis successfully completed
failedAnalysis failed after max retries

Used by: calls.analysis_status

enrichment_type

Type of enrichment job in the processing queue.

ValueDescription
transcriptFetch call transcript from Ultravox
analysisRun AI analysis on the transcript via OpenRouter

Used by: enrichment_queue.type

processing_status

Generic processing status for queue items.

ValueDescription
pendingWaiting to be processed
processingCurrently being processed
completedSuccessfully processed
failedProcessing failed (may retry if attempts < max_attempts)

Used by: enrichment_queue.status, webhook_queue.status

sync_job_status

Status of a historical data sync job.

ValueDescription
pendingJob created, waiting to be picked up
in_progressJob is actively fetching and importing data
completedAll data successfully imported
failedJob terminated due to errors
cancelledJob cancelled by user

Used by: historical_sync_jobs.status

campaign_type

Type of campaign, determines AI analysis behavior.

ValueDescription
sdrSales Development Representative -- analysis focuses on meetings booked, qualified leads, objections
csCustomer Success -- analysis focuses on issues resolved, escalations, satisfaction

Used by: campaigns.type

contact_status

Status of a contact within a campaign.

ValueDescription
pendingNot yet called
scheduledScheduled for a specific time
callingCurrently being called
completedCall completed
failedCall failed after max attempts

Used by: campaign_contacts.status

contact_outcome

Outcome of a call attempt to a campaign contact.

ValueDescription
no_answerContact did not answer
answeredContact answered the call
voicemailCall went to voicemail
busyLine was busy
declinedContact declined the call
callback_scheduledContact requested a callback

Used by: campaign_contacts.outcome