Create Application

Create a new application

Request URL

POSThttps://dashboard.bandwidth.com/api/accounts/{{account}}/applications

Basic Authentication

Bandwidth's Account API leverages Basic Authentication with your Dashboard API Credentials. Read more about how Bandwidth secures endpoints in the Security & Credentials document.

Supported Parameters

Parameters Mandatory Description
ServiceType Yes The type of service the application will be used for.

- Messaging-V2 for message events

- Voice-V2 for voice events
AppName Yes Plain text name of the application
MsgCallbackUrl Yes, for Messaging-V2 Url to receive message events
CallInitiatedCallbackUrl Yes, for Voice-V2 Url to receive voice events
CallInitiatedMethod No HTTP method for events sent to the CallInitiatedCallbackUrl.
POST or GET
Default is POST
CallStatusCallbackUrl No Url to receive voice events NOT related to Initiated. Such as: rejected or hung up.
CallStatusMethod No HTTP method for events sent to the CallStatusCallbackUrl.
POST or GET
Default is POST
CallbackCreds No, but highly recommended Basic auth credentials to apply to your message & voice events
CallbackCreds.UserId No, but highly recommended Basic auth UserId
CallbackCreds.Password No, but highly recommended Basic auth Password

Example 1 of 2: Create a new messaging application

POST https://dashboard.bandwidth.com/api/accounts/{{accountId}}/applications HTTP/1.1
Content-Type: application/xml; charset=utf-8
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=

<Application>
    <ServiceType>Messaging-V2</ServiceType>
    <AppName>Production Server</AppName>
    <MsgCallbackUrl>https://yourSecureSite.com/callbacks/messaging</MsgCallbackUrl>
    <CallbackCreds>
      <UserId>Your-User-id</UserId>
      <Password>Your-Password</Password>
  </CallbackCreds>
</Application>

Response

HTTP/1.1 201 Created
Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ApplicationProvisioningResponse>
    <Application>
        <ApplicationId>d775585a-ed5b-4a49-8b96-f68c0a993ebe</ApplicationId>
        <ServiceType>Messaging-V2</ServiceType>
        <AppName>Production Server</AppName>
        <MsgCallbackUrl>https://yourSecureSite.com/callbacks/messaging</MsgCallbackUrl>
        <CallbackCreds>
            <UserId>Your-User-id</UserId>
            <Password>Your-Password</Password>
        </CallbackCreds>
    </Application>
</ApplicationProvisioningResponse>

Example 2 of 2: Create a new voice application

POST https://dashboard.bandwidth.com/api/accounts/{{accountId}}/applications HTTP/1.1
Content-Type: application/xml; charset=utf-8
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=

<Application>
    <ServiceType>Voice-V2</ServiceType>
    <AppName>Production Server</AppName>
    <CallInitiatedCallbackUrl>https://yourSecureSite.com/callbacks/voice</CallInitiatedCallbackUrl>
    <CallbackCreds>
      <UserId>Your-User-id</UserId>
      <Password>Your-Password</Password>
  </CallbackCreds>
</Application>

Response

HTTP/1.1 201 Created
Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ApplicationProvisioningResponse>
    <Application>
        <ApplicationId>d775585a-ed5b-4a49-8b96-f68c0a993ebe</ApplicationId>
        <ServiceType>Voice-V2</ServiceType>
        <AppName>Production Server</AppName>
        <CallInitiatedCallbackUrl>https://yourSecureSite.com/callbacks/voice</CallInitiatedCallbackUrl>
        <CallbackCreds>
            <UserId>Your-User-id</UserId>
            <Password>Your-Password</Password>
        </CallbackCreds>
    </Application>
</ApplicationProvisioningResponse>

results matching ""

    No results matching ""