Applications

Applications represent the call handling rules to be applied to voice calls either made or received by the platform Applications can be created, queried, updated, and destroyed via the API.

Applications have the following properties:

Property

Description

account_sid

Identifies the Account this application belongs to

application_sid

Unique identifier for the application

name

User-specified name of application

call_hook

Web callback to invoke for new calls

call_status_hook

Web callback to invoke for call status notifications

speech_recognizer_vendor

Vendor to use for speech recognition. Default: google

speech_recognizer_language

Default language to use for speech recognition, if not specified in the ‘gather’ or ‘transcribe’ verbs. Default: en-US

speech_synthesis_vendor

Vendor to use for text to speech. Default: google

speech_synthesis_voice

Default voice to use for text to speech, if not specified in the ‘say’ verb. Default: en-US-Wavenet-C

Get Applications

GET /v1/Applications

Get all Applications linked to your account

AUTHORIZATION - Bearer Token

This document is using Bearer Token from Authentication

PATH VARIABLES

Name

Description

account_sid

Your Account Security Identifier

Example request:

curl -X 'GET' \
  'https://api.epacific.net/v1/Applications' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer 1cf2f4f4-64c4-4249-9a3e-5bb4cb597c2a'

Example response:

[
    {
        "application_sid": "98acd50a-9f25-42a6-8dbf-aadb400ddcf0",
        "name": "dial time clock",
        "account_sid": "5f8e8f60-4771-44cb-92a6-94ea66df0450",
        "speech_synthesis_vendor": "google",
        "speech_synthesis_language": "en-US",
        "speech_synthesis_voice": "en-US-Standard-C",
        "speech_recognizer_vendor": "google",
        "speech_recognizer_language": "en-US",
        "created_at": "2021-05-25T03:06:21.000Z",
        "call_hook": {
        "webhook_sid": "30a3232d-e4f2-4c90-af83-fb32c31fa17d",
        "url": "https://public-apps.epacific.net/dial-time",
        "method": "POST",
        "username": null,
        "password": null
        },
        "call_status_hook": {
        "webhook_sid": "c20a825e-2ce7-4c10-8c95-fb4d83d30506",
        "url": "https://public-apps.epacific.net/call-status",
        "method": "POST",
        "username": null,
        "password": null
        },
        "messaging_hook": {
        "webhook_sid": "5832639b-d8a9-4334-b039-b088dea19ee3",
        "url": "",
        "method": "POST",
        "username": null,
        "password": null
        }
    },
    {
        "application_sid": "9b747b6c-7a3d-490e-af0b-95939982f369",
        "name": "dial-o-rama",
        "account_sid": "5f8e8f60-4771-44cb-92a6-94ea66df0450",
        "speech_synthesis_vendor": "google",
        "speech_synthesis_language": "en-US",
        "speech_synthesis_voice": "en-US-Wavenet-C",
        "speech_recognizer_vendor": "google",
        "speech_recognizer_language": "en-US",
        "created_at": "2021-05-08T16:59:06.000Z",
        "call_hook": {
        "webhook_sid": "5a7bfa6a-a897-4ba0-bd55-cd7c239a9df0",
        "url": "https://9519e2c6b589.ngrok.io/dial-o-rama/collect",
        "method": "POST",
        "username": null,
        "password": null
        },
        "call_status_hook": {
        "webhook_sid": "7ad5e589-d161-4b4c-b513-3c597c099fb3",
        "url": "https://9519e2c6b589.ngrok.io/call-status",
        "method": "POST",
        "username": null,
        "password": null
        },
        "messaging_hook": {
        "webhook_sid": "e38681ce-b11d-48c0-a844-19b304d13a79",
        "url": "",
        "method": "POST",
        "username": null,
        "password": null
        }
    }
]

Get Application

GET /v1/Applications/{application_sid}

Retrieve a specific application by its unique identifier

AUTHORIZATION - Bearer Token

This document is using Bearer Token from Authentication

PATH VARIABLES

Name

Description

account_sid

Your Account Security Identifier

application_sid

Unique identifier for the application

Example request:

curl -X 'GET' \
  'https://api.epacific.net/v1/Applications/98acd50a-9f25-42a6-8dbf-aadb400ddcf0' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer 1cf2f4f4-64c4-4249-9a3e-5bb4cb597c2a'

Example response:

[
    {
        "application_sid": "98acd50a-9f25-42a6-8dbf-aadb400ddcf0",
        "name": "dial time clock",
        "account_sid": "5f8e8f60-4771-44cb-92a6-94ea66df0450",
        "speech_synthesis_vendor": "google",
        "speech_synthesis_language": "en-US",
        "speech_synthesis_voice": "en-US-Standard-C",
        "speech_recognizer_vendor": "google",
        "speech_recognizer_language": "en-US",
        "created_at": "2021-05-25T03:06:21.000Z",
        "call_hook": {
        "webhook_sid": "30a3232d-e4f2-4c90-af83-fb32c31fa17d",
        "url": "https://public-apps.epacific.net/dial-time",
        "method": "POST",
        "username": null,
        "password": null
        },
        "call_status_hook": {
        "webhook_sid": "c20a825e-2ce7-4c10-8c95-fb4d83d30506",
        "url": "https://public-apps.epacific.net/call-status",
        "method": "POST",
        "username": null,
        "password": null
        },
        "messaging_hook": {
        "webhook_sid": "5832639b-d8a9-4334-b039-b088dea19ee3",
        "url": "",
        "method": "POST",
        "username": null,
        "password": null
        }
    }
]

Create Application

POST /v1/Applications

Create an application, specifying webhook URLs and speech settings

AUTHORIZATION - Bearer Token

This document is using Bearer Token from Authentication

Example request:

curl -X 'POST' \
'https://api.epacific.net/v1/Applications' \
-H 'accept: application/json' \
-H 'Authorization: Bearer 1cf2f4f4-64c4-4249-9a3e-5bb4cb597c2a' \
-H 'Content-Type: application/json' \
-d '{
"name": "my test app",
"call_hook": {
    "url": "https://public-apps.epacific.net/hello-world",
    "method": "POST"
},
"call_status_hook": {
    "url": "https://public-apps.epacific.net/call-status",
    "method": "POST"
},
"speech_synthesis_vendor": "google",
"speech_synthesis_language": "en-vn",
"speech_synthesis_voice": "en-vn-Standard-C",
"speech_recognizer_vendor": "google",
"speech_recognizer_language": "en-vn"
}'

Example response:

{
   "sid": "bd66b946-0af4-4283-b972-d0d4b0d6f088"
}

Update Application

PUT /v1/Applications/{application_sid}

Update the properties of an application

AUTHORIZATION - Bearer Token

This document is using Bearer Token from Authentication

PATH VARIABLES

Name

Description

application_sid

Unique identifier for the application

Example request:

curl -X 'PUT' \
'https://api.epacific.net/v1/Applications/9351f46a-678c-43f5-b8a6-d4eb58d131af' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer 1cf2f4f4-64c4-4249-9a3e-5bb4cb597c2a' \
-H 'Content-Type: application/json' \
-d '{
"name": "my test app",
"call_hook": {
    "url": "https://public-apps.epacific.net/hello-world",
    "method": "POST"
},
"call_status_hook": {
    "url": "https://public-apps.epacific.net/call-status",
    "method": "POST"
},
"speech_synthesis_vendor": "google",
"speech_synthesis_language": "en-vn",
"speech_synthesis_voice": "en-vn-Standard-C",
"speech_recognizer_vendor": "google",
"speech_recognizer_language": "en-vn"
}'

Example response:

Success is indicated by a 204 response


Delete App

DELETE /v1/Accounts/{account_sid}/SpeechCredentials/{speech_credential_sid}

Deletes a SpeechCredential.

AUTHORIZATION - Bearer Token

This document is using Bearer Token from Authentication

PATH VARIABLES

Name

Description

account_sid

Unique identifier for the account

credential_sid

Unique identifier for the credential

Example request:

curl -X 'DELETE' \
  'https://api.epacific.net/v1/Accounts/5f8e8f60-4771-44cb-92a6-94ea66df0450/SpeechCredentials/a9d27e9e-a909-41d1-aef1-bf61e6148e23' \
  -H 'accept: text/plain' \
  -H 'Authorization: Bearer 1cf2f4f4-64c4-4249-9a3e-5bb4cb597c2a'

Example response:

Success is indicated by a 204 response


Please contact us for timely support via: