The POST v0/{accountKey}/calls/
endpoint allows you to request a call either on behalf of a specific agent or agent group. Designed to support The endpoint supports a number of potential "from" and "to" selectors for future use.
Panel |
---|
borderColor | #eeeeee |
---|
bgColor | white |
---|
titleColor | white |
---|
borderWidth | 1 |
---|
titleBGColor | blackgrey |
---|
borderStyle | solid |
---|
title | In this page |
---|
|
|
Insert excerpt |
---|
| _ExcerptAPICloud |
---|
| _ExcerptAPICloud |
---|
nopanel | true |
---|
|
...
This endpoint requires the following headers:
Authorization (required)
This header requires an OAuth bearer token. For information on the bearer token, see How to use your bearer access token.
Content-Type(required)
application/
...
json Indicates that the media type sent by the client is JavaScript Object Notation (JSON).
Accept
application/json;version=
...
6 Indicates that the client will accept a JSON response and that version 6 of the API should be used.
...
Request examples
The following example below provide provides all possible body parameters:
Code Block |
---|
|
{
"from": {
"agentId": "5464",
"groups": [
"030"
],
"presentedCLID": "01256636451",
"consent":
"OneParty" },
"to": {
"telephoneNumber": "07970303957",
"agentId": "4567"
},
"regarding": {
"reference": "http://Test.com"
},
"application": "TestApp"
} |
where
from
. agentId
. The Agents display Id as a string, in which the call wil display ID, in string format, of the agent the call will be made from. Mutually exclusive with from.Use either agentID
or groups
. groups
. A list of Group display Id as strings, in which the call wil The display IDs of the groups that the call will be made from. Mutually exclusive with from.Use either groups
or agentId
. presentedCLID
. The CLID to present to the party being called. This number must be confiugured configured as a callback number on in your VCC account. This parameter is optional.consent.
A string indicating what level of consent the from party requires with regards to the call being recorded. This The parameter is optional. Possible values are:- Unknown - Consent status is unknown
- OneParty - Only one party must consent for the call to be recorded
TwoParty - both partiesmust consent for the call to be recorded
to
. telephoneNumber
. The telephony telephone number to call , in E164 format. Mutually exclusive with , that the call will be made to. Use either telephoneNumber
or agentId
. agentId
. The Agents display Id as a string, in which you wish to be called. Mutually exclusive with to.telephoneNumber
. consent.
A string indicating what level of consent the from party requires with regards to the call being recorded. This parameter is optional. Possible values are:- Unknown - Consent status is unknown
- OneParty - Only one party must consent for the call to be recorded
- TwoParty - both partiesmust consent for the call to be recorded
regarding
. reference.
Where ID, in string format, of the agent the call will be made to. Use either agentId
or telephoneNumber
.
regarding
reference
. Where reference
is an alphanumeric string or a valid URL with a maximum length of 2000 characters that contains an external ID of an object this call is regarding.
application
. Where appName application
is an alphanumeric string—up string — up to 32 characters—specifying characters — specifying which application is calling the API. If integrated with Salesforce, and the feature is enabled, appName application
appears in the Tasktask's subject as "Outbound appName call to 02072068888"...
title | Further details on consent |
---|
Consent is used to convey information about which parties on a call must provide consent in order for either one or both legs of the call to be recorded.
Consent must be used as follows:
...
- Outbound
application
call to 02072068888"
Make call from agent 1234 to telephone number 02072068888
Code Block |
---|
language | powershell |
---|
theme | Midnight |
---|
|
curl -X POST "https://***.cc.newvoicemediavonage.com/v0/a1b2c3d4e5/calls/"
-d '{ "from": { "agentId": "1234" }, "to": { "telephoneNumber": "02072068888" } }'
-H "Authorization: Bearer <ACCESS_TOKEN>"-H "Content-Type: application/json; version=6"
|
Body
...
Code Block |
---|
|
{
"from": {
"agentId": "1234"
},
"to": {
"telephoneNumber": "02072068888"
}
} |
...
Code Block |
---|
language | powershell |
---|
theme | Midnight |
---|
|
curl -X POST "https://***.cc.newvoicemediavonage.com/v0/a1b2c3d4e5/calls/"
-d '{ "from": { "agentId": "1234" }, "to": { "agentId": "4567" } }'
-H "Authorization: Bearer <ACCESS_TOKEN>" -H "Content-Type: application/json; version=6"
|
Body
...
Code Block |
---|
|
{
"from": {
"agentId": "1234"
},
"to": {
"agentId": "4567"
}
} |
...
Code Block |
---|
language | powershell |
---|
theme | Midnight |
---|
|
curl -X POST "https://***.newvoicemediacc.vonage.com/v0/a1b2c3d4e5/calls/"
-d '{ "from": { "groups": ["030"] }, "to": { "telephoneNumber": "02072068888" } }'
-H "Authorization: Bearer <ACCESS_TOKEN>"-H "Content-Type: application/json; version=6"
|
Body
...
Code Block |
---|
|
{
"from": {
"groups": [
"030"
]
},
"to": {
"telephoneNumber": "02072068888"
}
} |
...
Code Block |
---|
language | powershell |
---|
theme | Midnight |
---|
|
curl -X POST "https://***.cc.newvoicemediavonage.com/v0/a1b2c3d4e5/calls/"
-d '{ "from": { "groups": ["030", "200", "400"] }, "to": { "telephoneNumber": "02072068888" } }'
-H "Authorization: Bearer <ACCESS_TOKEN>" -H "Content-Type: application/json; version=6"
|
Body
...
Code Block |
---|
|
{
"from": {
"groups": [
"030",
"200",
"400"
]
},
"to": {
"telephoneNumber": "02072068888"
}
} |
...
Code Block |
---|
language | powershell |
---|
theme | Midnight |
---|
|
curl -X POST "https://***.cc.newvoicemediavonage.com/v0/a1b2c3d4e5/calls/"
-d '{ "from": { "agentId": "1234", "presentedCLID": "08008888888" }, "to": { "telephoneNumber": "02072068888" } }'
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Content-Type: application/json; version=6" |
Body
...
Code Block |
---|
|
{
"from": {
"agentId": "1234",
"presentedCLID": "08008888888"
},
"to": {
"telephoneNumber": "02072068888"
}
} |
...
Code Block |
---|
language | powershell |
---|
theme | Midnight |
---|
|
curl -X POST "https://***.newvoicemediacc.vonage.com/v0/a1b2c3d4e5/calls/"
-d '{ "from": { "agentId": "1234", "presentedCLID": "08008888888" }, "to": { "telephoneNumber": "02072068888" }, "regarding": { "reference": "0012400000ATTUQ" }, "application": "appName" }'
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Content-Type: application/json;version=6" |
Body
...
Code Block |
---|
|
{
"from": {
"agentId": "1234",
"presentedCLID": "08008888888"
},
"to": {
"telephoneNumber": "02072068888"
},
"regarding": {
"reference": "0012400000ATTUQ"
},
"application": "appName"
} |
Make call from agent 1234 to telephone number 02072068888 with consent
Code Block |
---|
language | powershell |
---|
theme | Midnight |
---|
|
curl -X POST "https://***.newvoicemedia.com/v0/a1b2c3d4e5/calls/"
-d '{ "from": { "agentId": "1234", "consent": "OneParty" }, "to": { "telephoneNumber":
"02072068888", "consent": "OneParty" } }'
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Content-Type: application/json;version=6" |
Body
...
Code Block |
---|
|
{
"from": {
"agentId": "1234",
"consent":
"OneParty" },
"to": {
"telephoneNumber": "02072068888",
"consent":
"OneParty" }
} |
Response
...
examples
Successful calls return HTTP status code of 201, containing the following message and headers.
...
Code Block |
---|
|
{
"id": "017db4a2-44b5-672e-8b9f-1a805fed07ad",
"links": [
{
"href": "https://emea.cc.newvoicemediavonage.com/V0/lmccg0ujju4/Calls/017db4a2-44b5-672e-8b9f-1a805fed07ad",
"rel": "_self"
}
],
"from": {
"presentedClid": "123456789",
"agentId": "1234",
"consent": "OneParty"
},
"to": {
"telephoneNumber": "02072068888",
"consent": "OneParty"
},
"regarding": {
"reference": "0012400000ATTUQ"
},
"status": "Active",
"recordingStatus": "Stopped",
"application": "ExampelAppNameExampleAppName",
"dispositionCode": null
} |
...
Returns HTTP Status Code 400.
Code Block |
---|
|
{
"message": "Ccxml must be enabled for this account"
} |
...
Returns HTTP Status Code 415.
- Unsupported content type - "
The requested resource does not support content type 'multipart/form-data'.
": Unsupported content type
Code Block |
---|
|
{
"message": "The requested resource does not support content type 'multipart/form-data'."
} |
...