Calls

Save voice provider configuration (superadmin)

POST
/api/calls/providers/config

Persists Twilio or Sinch credentials in OrganizationCredentials.voiceProviders and optionally upserts the caller's phone number in the org-level phone number store. Superadmin only - overwrites existing config for that provider. Credentials are trimmed server-side. A phoneNumber that is a short code (5 or 6 digits, or an org line stored with numberType: "shortcode") returns 400 with code: "VOICE_NOT_ALLOWED_ON_SHORTCODE" before anything is saved: a short code is SMS only.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/calls/providers/config" \  -H "Content-Type: application/json" \  -d '{    "provider": "sinch",    "phoneNumber": "+14165550100",    "sinchApplicationKey": "sinch-app-key-xxxx",    "sinchApplicationSecret": "sinch-app-secret-xxxx"  }'
{  "success": true,  "message": "Configuration saved"}