Update App
Update an existing SFVoPI application's configuration. All fields are optional — only include the fields you want to change.
Requires X-API-Key header. See Authentication for details.
HTTP Request
PUT /sfvopi/apps/:app_id
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
app_id | string | Yes | Unique app identifier (format: sfv_app_xxxxxxxxxxxx) |
Request Body
All fields are optional. Only include the fields you want to update.
| Field | Type | Required | Description | Validation |
|---|---|---|---|---|
name | string | No | Human-readable name for the app | 1-100 characters |
answer_url | string | No | Webhook URL called when a call is answered | Valid URL |
answer_method | string | No | HTTP method for answer webhook | POST or GET |
hangup_url | string | null | No | Webhook URL called when a call ends | Valid URL, or null to remove |
hangup_method | string | No | HTTP method for hangup webhook | POST or GET |
fallback_answer_url | string | null | No | Fallback URL if answer_url fails | Valid URL, or null to remove |
fallback_answer_method | string | No | HTTP method for fallback webhook | POST or GET |
status | string | No | App status | ACTIVE or INACTIVE |
concurrent_limit | integer | null | No | The app's own limit on calls in progress at once. Send null to remove it | Positive integer or null. Cannot exceed your organization's limit |
cps_limit | integer | null | No | The app's own limit on new calls per second. Send null to remove it | Positive integer or null. Cannot exceed your organization's limit |
cps_burst | integer | null | No | The app's own peak CPS. Send null to remove it | Positive integer or null. At least cps_limit when both are set. Cannot exceed your organization's limit |
App call limits ship with the org-limits release.
App call limits
concurrent_limit, cps_limit and cps_burst let you cap one app below your organization's limits. Each is null by default, which means only the organization pool applies. Inbound and outbound calls count together. Read your organization's limits with Get Call Limits, and see Call Limits.
A value above your organization's limit is rejected with 400, for example cps_limit cannot exceed your organisation limit of 10.
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
- JavaScript
- TypeScript
- Python
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"
}'
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({
name: 'Updated Voice App',
answer_url: 'https://new.example.com/webhook/answer',
status: 'ACTIVE'
})
});
const result = await response.json();
console.log(result.data);
interface UpdateAppRequest {
name?: string;
answer_url?: string;
answer_method?: 'POST' | 'GET';
hangup_url?: string | null;
hangup_method?: 'POST' | 'GET';
fallback_answer_url?: string | null;
fallback_answer_method?: 'POST' | 'GET';
status?: 'ACTIVE' | 'INACTIVE';
concurrent_limit?: number | null;
cps_limit?: number | null;
cps_burst?: number | null;
}
interface SfvopiApp {
app_id: string;
org_id: number;
name: string;
answer_url: string;
answer_method: 'POST' | 'GET';
hangup_url: string | null;
hangup_method: 'POST' | 'GET';
fallback_answer_url: string | null;
fallback_answer_method: 'POST' | 'GET';
status: 'ACTIVE' | 'INACTIVE';
concurrent_limit: number | null;
cps_limit: number | null;
cps_burst: number | null;
created_by: number | null;
created_at: string;
updated_at: string | null;
}
interface ApiResponse<T> {
data: T;
message: string;
}
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({
name: 'Updated Voice App',
answer_url: 'https://new.example.com/webhook/answer',
status: 'ACTIVE'
} as UpdateAppRequest)
});
const result: ApiResponse<SfvopiApp> = await response.json();
console.log(result.data);
import requests
app_id = 'sfv_app_abc123xyz456'
url = f'https://prod-api.superfone.co.in/superfone/sfvopi/apps/{app_id}'
headers = {
'X-API-Key': 'your_api_key_here',
'Content-Type': 'application/json'
}
payload = {
'name': 'Updated Voice App',
'answer_url': 'https://new.example.com/webhook/answer',
'status': 'ACTIVE'
}
response = requests.put(url, headers=headers, json=payload)
result = response.json()
print(result['data'])
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",
"concurrent_limit": null,
"cps_limit": null,
"cps_burst": null,
"created_by": 67890,
"created_at": "2026-02-02T10:30:00.000Z",
"updated_at": "2026-02-02T15:45:00.000Z"
},
"message": "success"
}
Response Fields
| Field | Type | Description |
|---|---|---|
app_id | string | Unique identifier for the app (format: sfv_app_xxxxxxxxxxxx) |
org_id | number | Organization ID that owns this app |
name | string | App name |
answer_url | string | Webhook URL for answered calls |
answer_method | string | HTTP method for answer webhook (POST or GET) |
hangup_url | string | null | Webhook URL for call hangup events |
hangup_method | string | HTTP method for hangup webhook |
fallback_answer_url | string | null | Fallback webhook URL |
fallback_answer_method | string | HTTP method for fallback webhook |
status | string | App status (ACTIVE or INACTIVE) |
concurrent_limit | number | null | The app's own limit on calls in progress at once. null means only your organization's limit applies |
cps_limit | number | null | The app's own limit on new calls per second. null means only your organization's limit applies |
cps_burst | number | null | The app's own peak CPS. null means only your organization's limit applies |
created_by | number | null | User ID who created the app |
created_at | string | ISO 8601 timestamp of creation |
updated_at | string | null | ISO 8601 timestamp of last update |
Error Responses
| Status Code | Message | When It Occurs |
|---|---|---|
400 | Invalid request body | Request body fails validation (invalid URL format, name too long, invalid HTTP method, invalid status, a limit that is not a positive integer or null, cps_burst below cps_limit) |
400 | <field> cannot exceed your organisation limit of <n> | concurrent_limit, cps_limit or cps_burst is higher than your organization's limit. <n> is the organization's limit |
404 | SFVoPI app not found | App with the specified app_id does not exist or does not belong to your organization |
401 | UnAuthorized, Please Provide Valid API Key | Missing or invalid X-API-Key header |
500 | Failed 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');
Related Endpoints
- Create App — Create a new app
- List Apps — Get all apps for your organization
- Get App — Retrieve a specific app by ID
- Delete App — Remove an app