Skip to main content

Create App

Create a new SFVoPI application. An app defines the webhook URLs that will be called when calls are answered or hung up, and can be linked to phone numbers to handle inbound calls.

Authentication Required

Requires X-API-Key header. See Authentication for details.

HTTP Request​

POST /sfvopi/apps

Request Body​

FieldTypeRequiredDefaultDescriptionValidation
namestringYes-Human-readable name for the app1-100 characters
answer_urlstringYes-Webhook URL called when a call is answeredValid URL
answer_methodstringNoPOSTHTTP method for answer webhookPOST or GET
hangup_urlstringNonullWebhook URL called when a call endsValid URL or omit
hangup_methodstringNoPOSTHTTP method for hangup webhookPOST or GET
fallback_answer_urlstringNonullFallback URL if answer_url failsValid URL or omit
fallback_answer_methodstringNoPOSTHTTP method for fallback webhookPOST or GET

Code Examples​

curl -X POST https://prod-api.superfone.co.in/superfone/sfvopi/apps \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "My Voice App",
"answer_url": "https://example.com/webhook/answer",
"answer_method": "POST",
"hangup_url": "https://example.com/webhook/hangup",
"hangup_method": "POST"
}'

Success Response​

Status Code: 200 OK

{
"data": {
"app_id": "sfv_app_abc123xyz456",
"org_id": 12345,
"name": "My Voice App",
"answer_url": "https://example.com/webhook/answer",
"answer_method": "POST",
"hangup_url": "https://example.com/webhook/hangup",
"hangup_method": "POST",
"fallback_answer_url": null,
"fallback_answer_method": "POST",
"status": "ACTIVE",
"concurrent_limit": null,
"cps_limit": null,
"cps_burst": null,
"created_by": 67890,
"created_at": "2026-02-02T10:30:00.000Z",
"updated_at": null
},
"message": "success"
}

Response Fields​

Org-limits release

App call limits ship with the org-limits release. A new app has no limits of its own, so only your organization's limits apply. Set app limits with Update App. See Call Limits.

FieldTypeDescription
app_idstringUnique identifier for the app (format: sfv_app_xxxxxxxxxxxx)
org_idnumberOrganization ID that owns this app
namestringApp name
answer_urlstringWebhook URL for answered calls
answer_methodstringHTTP method for answer webhook (POST or GET)
hangup_urlstring | nullWebhook URL for call hangup events
hangup_methodstringHTTP method for hangup webhook
fallback_answer_urlstring | nullFallback webhook URL
fallback_answer_methodstringHTTP method for fallback webhook
statusstringApp status (ACTIVE or INACTIVE)
concurrent_limitnumber | nullThe app's own limit on calls in progress at once. null means only your organization's limit applies
cps_limitnumber | nullThe app's own limit on new calls per second. null means only your organization's limit applies
cps_burstnumber | nullThe app's own peak CPS. null means only your organization's limit applies
created_bynumber | nullUser ID who created the app
created_atstringISO 8601 timestamp of creation
updated_atstring | nullISO 8601 timestamp of last update

Error Responses​

Status CodeMessageWhen It Occurs
400Invalid request bodyRequest body fails validation (missing required fields, invalid URL format, name too long, invalid HTTP method)
401UnAuthorized, Please Provide Valid API KeyMissing or invalid X-API-Key header
500Failed to create SFVoPI app: {error}Server error during app creation

Example Error Response​

{
"message": "Invalid request body"
}

Next Steps​

After creating an app:

  1. Link a phone number to handle inbound calls
  2. Implement webhook handlers for answer and hangup events
  3. Set up audio streaming to process call audio in real-time