Create an Application

POSThttps://api.vobiz.ai/api/v1/Account/{authID}/Application/

Creates an Application with webhook URLs for call handling. Creating an application is usually a first step, after which you attach the application to either a number or an endpoint.

Authentication Required:

  • Bearer Token: Include in Authorization header
  • X-Auth-ID Header: Your account ID (e.g., {Auth_ID})

Parameters

Request Parameters

NameTypeDescription
answer_urlRequired
stringThe URL fetched when a call executes this application.
app_nameRequired
stringThe name of your application. Allowed Values: Alphabets (upper case and lower case), Numbers (0-9), Only 2 special characters, i.e. "-" (hyphen) and "_" (underscore)
answer_method
stringThe method used to call the answer_url. Defaults to POST.
hangup_url
stringThe URL notified when the call hangs up. Defaults to answer_url.
hangup_method
stringThe method used to call the hangup_url. Defaults to POST.
fallback_answer_url
stringInvoked by Vobiz only if answer_url is unavailable or the XML response is invalid. Should contain an XML response.
fallback_method
stringThe method used to call the fallback_answer_url. Defaults to POST.
message_url
stringThe URL notified when an inbound message is received. Defaults not set.
message_method
stringThe method used to call the message_url. Defaults to POST.
default_number_app
booleanIf set to true, this parameter ensures that newly created numbers that don't have an app_id point to this application.
default_endpoint_app
booleanIf set to true, this parameter ensures that newly created endpoints that don't have an app_id point to this application.
subaccount
stringID of the subaccount that this application is associated with.
log_incoming_messages
booleanIf set to false, the content of incoming messages to Vobiz phone numbers associated with this application are not logged in Vobiz systems. Defaults to true when not specified.

Request Body

JSON
{
  "app_name": "My Voice Application",
  "answer_url": "https://example.com/answer",
  "answer_method": "POST",
  "hangup_url": "https://example.com/hangup",
  "hangup_method": "POST",
  "fallback_answer_url": "https://example.com/fallback",
  "fallback_method": "POST",
  "message_url": "https://example.com/message",
  "message_method": "POST",
  "default_number_app": false,
  "default_endpoint_app": false,
  "sub_account": null
}

Response Examples

Success Response (201 Created)
{
  "api_id": "550e8400-e29b-41d4-a716-446655440000",
  "message": "created",
  "app_id": "12345678",
  "resource_uri": "/v1/Account/{Auth_ID}/Application/12345678/"
}
Error Response (400 Bad Request)
{
  "error": "invalid request parameters",
  "details": {
    "app_name": "This field is required",
    "answer_url": "Enter a valid URL"
  }
}

cURL Example

cURL
curl -X POST https://api.vobiz.ai/api/v1/Account/{Auth_ID}/Application/ \
  -H "X-Auth-ID: YOUR_AUTH_ID" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "app_name": "My IVR System",
    "answer_url": "https://myapp.com/ivr/answer",
    "answer_method": "POST"
  }'