API

API Reference

Complete REST API reference for the Trunx telecom platform.

Base URL

https://api.trunx.io

All endpoints are prefixed with /api/. Requests require an API key passed in the Authorization header as a Bearer token. See Authentication for details.

SMS

MethodPathDescription
POST/api/smsSend an SMS message

See SMS for request/response details.

Voice

MethodPathDescription
POST/api/voiceCreate a call (plain or AI)
GET/api/voice/:idGet call details
DELETE/api/voice/:idEnd a call

See Voice for request/response details.

Phone Verification

MethodPathDescription
GET/api/verifications/servicesList available services
POST/api/verificationsRequest a temp phone number
GET/api/verifications/:idGet verification status + OTP
GET/api/verifications/:id/codePoll for OTP code (15s wait)
POST/api/verifications/:id/cancelCancel a verification

See Phone Verification for request/response details.

Campaigns

MethodPathDescription
POST/api/campaignsCreate a campaign
GET/api/campaignsList campaigns
GET/api/campaigns/:idGet campaign details
POST/api/campaigns/:id/startStart a campaign
POST/api/campaigns/:id/pausePause a campaign
POST/api/campaigns/:id/resumeResume a campaign
POST/api/campaigns/:id/cancelCancel a campaign
POST/api/campaigns/:id/prospectsAdd prospects
GET/api/campaigns/:id/prospectsList prospects
GET/api/campaigns/:id/statsCampaign stats

See Campaigns for request/response details.

DIDs

MethodPathDescription
GET/api/didsList DIDs
GET/api/dids/searchSearch available DIDs
POST/api/dids/purchasePurchase DIDs
DELETE/api/dids/:numberRelease a DID
PATCH/api/dids/:numberConfigure a DID
GET/api/dids/:number/healthDID health score
POST/api/dids/:number/cooldownCooldown a DID
POST/api/dids/:number/activateActivate a DID
POST/api/dids/:number/burnBurn a DID

See DIDs for request/response details.

IVR

MethodPathDescription
POST/api/ivrCreate an IVR
GET/api/ivrList IVRs
DELETE/api/ivr/:idDelete an IVR
POST/api/ivr/:id/assignAssign IVR to a DID

See IVR for request/response details.

Audio

MethodPathDescription
POST/api/audioGenerate TTS audio
GET/api/audioList audio files
DELETE/api/audio/:idDelete an audio file

Events

MethodPathDescription
POST/api/eventsSSE stream (GET with token param)

See Events for request/response details.

Webhooks

MethodPathDescription
POST/api/webhooksRegister a webhook
GET/api/webhooksList webhooks
DELETE/api/webhooks/:idDelete a webhook
GET/api/webhooks/:id/logsDelivery logs

See Webhooks for request/response details.

Billing

MethodPathDescription
GET/api/billing/usageUsage summary
GET/api/billing/portalBilling portal URL

See Billing for request/response details.

API Keys

MethodPathDescription
POST/api/keysCreate an API key
GET/api/keysList API keys
DELETE/api/keys/:idRevoke a key

Reputation

MethodPathDescription
GET/api/reputation/:numberCheck DID reputation
GET/api/reputationList reputation data
POST/api/reputation/auditTrigger a reputation audit

Compliance (10DLC)

MethodPathDescription
POST/api/compliance/brandsRegister a brand
GET/api/compliance/brandsList brands

MCP

MethodPathDescription
POST/api/mcpMCP streamable HTTP endpoint

The MCP endpoint uses the same API key authentication as the REST API. Connect your AI agent directly using any MCP-compatible client. See MCP for details.

Error Format

All error responses follow the RFC 7807 Problem Details format. See Errors for details.

{
  "type": "https://api.trunx.io/errors/not-found",
  "title": "Not Found",
  "status": 404,
  "detail": "The requested resource was not found."
}

Interactive Documentation

Full interactive API documentation with request/response examples is available at api.trunx.io/docs, powered by Scalar.

On this page