Skip to main content

Update App

Update an existing SFVoPI application's configuration. All fields are optional — only include the fields you want to change.

Authentication Required

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

HTTP Request

PUT /sfvopi/apps/:app_id

Path Parameters

ParameterTypeRequiredDescription
app_idstringYesUnique app identifier (format: sfv_app_xxxxxxxxxxxx)

Request Body

All fields are optional. Only include the fields you want to update.

FieldTypeRequiredDescriptionValidation
namestringNoHuman-readable name for the app1-100 characters
answer_urlstringNoWebhook URL called when a call is answeredValid URL
answer_methodstringNoHTTP method for answer webhookPOST or GET
hangup_urlstring | nullNoWebhook URL called when a call endsValid URL, or null to remove
hangup_methodstringNoHTTP method for hangup webhookPOST or GET
fallback_answer_urlstring | nullNoFallback URL if answer_url failsValid URL, or null to remove
fallback_answer_methodstringNoHTTP method for fallback webhookPOST or GET
statusstringNoApp statusACTIVE or INACTIVE
Removing Optional URLs

To remove hangup_url or fallback_answer_url, set them to null in the request body:

{
"hangup_url": null,
"fallback_answer_url": null
}

Code Examples

curl -X PUT https://prod-api.superfone.co.in/superfone/sfvopi/apps/sfv_app_abc123xyz456 \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Voice App",
"answer_url": "https://new.example.com/webhook/answer",
"status": "ACTIVE"
}'

Success Response

Status Code: 200 OK

{
"data": {
"app_id": "sfv_app_abc123xyz456",
"org_id": 12345,
"name": "Updated Voice App",
"answer_url": "https://new.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",
"created_by": 67890,
"created_at": "2026-02-02T10:30:00.000Z",
"updated_at": "2026-02-02T15:45:00.000Z"
},
"message": "success"
}

Response Fields

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)
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 (invalid URL format, name too long, invalid HTTP method, invalid status)
404SFVoPI app not foundApp with the specified app_id does not exist or does not belong to your organization
401UnAuthorized, Please Provide Valid API KeyMissing or invalid X-API-Key header
500Failed to update SFVoPI app: {error}Server error during app update

Example Error Response

{
"message": "SFVoPI app not found"
}

Use Cases

Update Webhook URLs

const appId = 'sfv_app_abc123xyz456';

const response = await fetch(`https://prod-api.superfone.co.in/superfone/sfvopi/apps/${appId}`, {
method: 'PUT',
headers: {
'X-API-Key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
answer_url: 'https://new-server.example.com/webhook/answer',
hangup_url: 'https://new-server.example.com/webhook/hangup'
})
});

const result = await response.json();
console.log('Webhooks updated:', result.data);

Disable an App

const appId = 'sfv_app_abc123xyz456';

const response = await fetch(`https://prod-api.superfone.co.in/superfone/sfvopi/apps/${appId}`, {
method: 'PUT',
headers: {
'X-API-Key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
status: 'INACTIVE'
})
});

const result = await response.json();
console.log('App disabled:', result.data.status);

Remove Optional Webhooks

const appId = 'sfv_app_abc123xyz456';

const response = await fetch(`https://prod-api.superfone.co.in/superfone/sfvopi/apps/${appId}`, {
method: 'PUT',
headers: {
'X-API-Key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
hangup_url: null,
fallback_answer_url: null
})
});

const result = await response.json();
console.log('Optional webhooks removed');