Live calls
Live calls are calls happening right now. Read access lets you watch them. Write access adds call control: place, answer, hold, transfer and hang up.
In the Key Admin this is the Live calls switch. Read lets a key call the GET endpoints below. Write lets it call the ones that change data.
List live calls
/domains/~/callsReturns every call in progress on the account right now.
Read Key Admin switch: Live calls, Read. Read only keys also work.
Example request
curl -X GET "https://api.noodlevoice.com/ns-api/v2/domains/~/calls" \
-H "Authorization: Bearer $NOODLEVOICE_KEY"const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/calls", {
method: "GET",
headers: {
Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
},
});
const data = await res.json();import os, requests
r = requests.get(
"https://api.noodlevoice.com/ns-api/v2/domains/~/calls",
headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
)
print(r.status_code, r.json())Response 200
[
{
"core-server": "string",
"call-session-id": "string",
"call-orig-call-id": "string",
"call-orig-match-uri": "string",
"call-orig-user": "1001",
"call-orig-domain": "string",
"call-orig-uri": "string",
"call-orig-name": "Front Desk",
"...": "15 more fields"
}
]Response fields (23)
| Field | Type | Notes |
|---|---|---|
core-server | string | |
call-session-id | string | ID of the call session. |
call-orig-call-id | string | ID of the call orig call. |
call-orig-match-uri | string | |
call-orig-user | string | |
call-orig-domain | string | |
call-orig-uri | string | |
call-orig-name | string | Name of the call orig. |
caller-id-number | string | Number shown to people you call. |
call-dialed-number | string | Call dialed number. |
call-by-action | string | |
call-by-user | string | |
call-by-domain | string | |
call-by-call-id | string | ID of the call by call. |
call-term-call-id | string | ID of the call term call. |
call-term-user | string | |
call-term-domain | string | |
call-term-uri | string | |
call-start-datetime | string (date) | Call start (date and time). |
call-answer-datetime | string | Call answer (date and time). |
call-orig-info | string | |
term-orig-info | string | |
call-audio-codec | string |
Count live calls
/domains/~/calls/countReturns how many calls are in progress on the account right now.
Read Key Admin switch: Live calls, Read. Read only keys also work.
Example request
curl -X GET "https://api.noodlevoice.com/ns-api/v2/domains/~/calls/count" \
-H "Authorization: Bearer $NOODLEVOICE_KEY"const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/calls/count", {
method: "GET",
headers: {
Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
},
});
const data = await res.json();import os, requests
r = requests.get(
"https://api.noodlevoice.com/ns-api/v2/domains/~/calls/count",
headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
)
print(r.status_code, r.json())Response 200
{
"total": 1
}Response fields (1)
| Field | Type | Notes |
|---|---|---|
total | integer | How many items matched. |
Other responses: 400, 401, 403, 404. See errors.
List a user's live calls
/domains/~/users/{user}/callsReturns the calls a user is on right now.
Read Key Admin switch: Live calls, Read. Read only keys also work.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
user required | path | string | The user ID, usually their extension number, like 1001. Default ~ Min length 0 Max length 16 |
Example request
curl -X GET "https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls" \
-H "Authorization: Bearer $NOODLEVOICE_KEY"const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls", {
method: "GET",
headers: {
Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
},
});
const data = await res.json();import os, requests
r = requests.get(
"https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls",
headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
)
print(r.status_code, r.json())Response 200
[
{
"core-server": "string",
"call-session-id": "string",
"call-orig-call-id": "string",
"call-orig-match-uri": "string",
"call-orig-user": "1001",
"call-orig-domain": "string",
"call-orig-uri": "string",
"call-orig-name": "Front Desk",
"...": "15 more fields"
}
]Response fields (23)
| Field | Type | Notes |
|---|---|---|
core-server | string | |
call-session-id | string | ID of the call session. |
call-orig-call-id | string | ID of the call orig call. |
call-orig-match-uri | string | |
call-orig-user | string | |
call-orig-domain | string | |
call-orig-uri | string | |
call-orig-name | string | Name of the call orig. |
caller-id-number | string | Number shown to people you call. |
call-dialed-number | string | Call dialed number. |
call-by-action | string | |
call-by-user | string | |
call-by-domain | string | |
call-by-call-id | string | ID of the call by call. |
call-term-call-id | string | ID of the call term call. |
call-term-user | string | |
call-term-domain | string | |
call-term-uri | string | |
call-start-datetime | string (date) | Call start (date and time). |
call-answer-datetime | string | Call answer (date and time). |
call-orig-info | string | |
term-orig-info | string | |
call-audio-codec | string |
Get a live call
/domains/~/users/{user}/calls/{callid}Returns one call in progress by its call ID.
Read Key Admin switch: Live calls, Read. Read only keys also work.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
user required | path | string | The user ID, usually their extension number, like 1001. Default ~ Min length 0 Max length 16 |
callid required | path | string | The call ID from a live call or call record. |
Example request
curl -X GET "https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}" \
-H "Authorization: Bearer $NOODLEVOICE_KEY"const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}", {
method: "GET",
headers: {
Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
},
});
const data = await res.json();import os, requests
r = requests.get(
"https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}",
headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
)
print(r.status_code, r.json())Response 200
{
"core-server": "string",
"call-session-id": "string",
"call-orig-call-id": "string",
"call-orig-match-uri": "string",
"call-orig-user": "1001",
"call-orig-domain": "string",
"call-orig-uri": "string",
"call-orig-name": "Front Desk",
"...": "15 more fields"
}Response fields (23)
| Field | Type | Notes |
|---|---|---|
core-server | string | |
call-session-id | string | ID of the call session. |
call-orig-call-id | string | ID of the call orig call. |
call-orig-match-uri | string | |
call-orig-user | string | |
call-orig-domain | string | |
call-orig-uri | string | |
call-orig-name | string | Name of the call orig. |
caller-id-number | string | Number shown to people you call. |
call-dialed-number | string | Call dialed number. |
call-by-action | string | |
call-by-user | string | |
call-by-domain | string | |
call-by-call-id | string | ID of the call by call. |
call-term-call-id | string | ID of the call term call. |
call-term-user | string | |
call-term-domain | string | |
call-term-uri | string | |
call-start-datetime | string (date) | Call start (date and time). |
call-answer-datetime | string | Call answer (date and time). |
call-orig-info | string | |
term-orig-info | string | |
call-audio-codec | string |
Place a call
/domains/~/users/{user}/callsStarts a call from a user's phone to the number you give (click to call).
Write Key Admin switch: Live calls, Write.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
user required | path | string | The user ID, usually their extension number, like 1001. Default ~ Min length 0 Max length 16 |
Request body application/json
| Field | Type | Notes |
|---|---|---|
synchronous required | string | Set to yes to wait until the change is finished before the response comes back. One of: yes, no Default no |
call-id required | string | The call ID. |
dial-rule-application | string | Default call |
call-term-user required | string | |
call-orig-user | string | Default user@domain |
auto-answer-enabled | string | Turns auto answer on or off (yes or no). One of: yes, no Default no |
caller-id-number | string | Number shown to people you call. |
callback-caller-id-number | string | Callback caller id number. |
Example request
curl -X POST "https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls" \
-H "Authorization: Bearer $NOODLEVOICE_KEY" \
-H "Content-Type: application/json" \
-d '{
"synchronous": "yes",
"call-id": "string",
"call-term-user": "1001"
}'const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"synchronous": "yes",
"call-id": "string",
"call-term-user": "1001"
}),
});
const data = await res.json();import os, requests
r = requests.post(
"https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls",
headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
json={
"synchronous": "yes",
"call-id": "string",
"call-term-user": "1001"
},
)
print(r.status_code, r.json())Response 202
Returns a status code with a short JSON message.
Answer a ringing call
/domains/~/users/{user}/calls/{call_id}/answerAnswers a ringing call on the user's device.
Write Key Admin switch: Live calls, Write.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
user required | path | string | The user ID, usually their extension number, like 1001. Default ~ Min length 0 Max length 16 |
call_id required | path | string | The ID of the call in progress. |
Request body application/json
| Field | Type | Notes |
|---|---|---|
call-term-user | string | |
hostname | string (hostname) | |
call-destination-session-id | string | ID of the call destination session. |
Example request
curl -X PATCH "https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}/answer" \
-H "Authorization: Bearer $NOODLEVOICE_KEY" \
-H "Content-Type: application/json" \
-d '{
"call-term-user": "1001",
"hostname": "string",
"call-destination-session-id": "string"
}'const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}/answer", {
method: "PATCH",
headers: {
Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"call-term-user": "1001",
"hostname": "string",
"call-destination-session-id": "string"
}),
});
const data = await res.json();import os, requests
r = requests.patch(
"https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}/answer",
headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
json={
"call-term-user": "1001",
"hostname": "string",
"call-destination-session-id": "string"
},
)
print(r.status_code, r.json())Response 202
{
"code": 1,
"message": "Hello from NoodleVoice"
}Response fields (2)
| Field | Type | Notes |
|---|---|---|
code | integer | HTTP status code. |
message | string | What happened, in words. |
Put a call on hold
/domains/~/users/{user}/calls/{call_id}/holdChanges hold in one live call.
Write Key Admin switch: Live calls, Write.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
user required | path | string | The user ID, usually their extension number, like 1001. Default ~ Min length 0 Max length 16 |
call_id required | path | string | The ID of the call in progress. |
Example request
curl -X PATCH "https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}/hold" \
-H "Authorization: Bearer $NOODLEVOICE_KEY"const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}/hold", {
method: "PATCH",
headers: {
Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
},
});
const data = await res.json();import os, requests
r = requests.patch(
"https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}/hold",
headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
)
print(r.status_code, r.json())Response 202
{
"code": 1,
"message": "Hello from NoodleVoice"
}Response fields (2)
| Field | Type | Notes |
|---|---|---|
code | integer | HTTP status code. |
message | string | What happened, in words. |
Transfer a call
/domains/~/users/{user}/calls/{call_id}/transferSends a call to another number or user (blind transfer).
Write Key Admin switch: Live calls, Write.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
user required | path | string | The user ID, usually their extension number, like 1001. Default ~ Min length 0 Max length 16 |
call_id required | path | string | The ID of the call in progress. |
Request body application/json
| Field | Type | Notes |
|---|---|---|
call-term-user | string | |
hostname | string (hostname) | |
call-destination-session-id | string | ID of the call destination session. |
Example request
curl -X PATCH "https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}/transfer" \
-H "Authorization: Bearer $NOODLEVOICE_KEY" \
-H "Content-Type: application/json" \
-d '{
"call-term-user": "1001",
"hostname": "string",
"call-destination-session-id": "string"
}'const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}/transfer", {
method: "PATCH",
headers: {
Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"call-term-user": "1001",
"hostname": "string",
"call-destination-session-id": "string"
}),
});
const data = await res.json();import os, requests
r = requests.patch(
"https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}/transfer",
headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
json={
"call-term-user": "1001",
"hostname": "string",
"call-destination-session-id": "string"
},
)
print(r.status_code, r.json())Response 202
{
"code": 1,
"message": "Hello from NoodleVoice"
}Response fields (2)
| Field | Type | Notes |
|---|---|---|
code | integer | HTTP status code. |
message | string | What happened, in words. |
Transfer the other party
/domains/~/users/{user}/calls/{call_id}/transferPeerTransfers the far end of the call, leaving the user free.
Write Key Admin switch: Live calls, Write.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
user required | path | string | The user ID, usually their extension number, like 1001. Default ~ Min length 0 Max length 16 |
call_id required | path | string | The ID of the call in progress. |
Request body application/json
| Field | Type | Notes |
|---|---|---|
destination | string | Where to send it: a number, extension or address. |
valid | string | |
prefix | string |
Example request
curl -X PATCH "https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}/transferPeer" \
-H "Authorization: Bearer $NOODLEVOICE_KEY" \
-H "Content-Type: application/json" \
-d '{
"destination": "15555550123",
"valid": "string",
"prefix": "string"
}'const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}/transferPeer", {
method: "PATCH",
headers: {
Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"destination": "15555550123",
"valid": "string",
"prefix": "string"
}),
});
const data = await res.json();import os, requests
r = requests.patch(
"https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}/transferPeer",
headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
json={
"destination": "15555550123",
"valid": "string",
"prefix": "string"
},
)
print(r.status_code, r.json())Response 202
{
"code": 1,
"message": "Hello from NoodleVoice"
}Response fields (2)
| Field | Type | Notes |
|---|---|---|
code | integer | HTTP status code. |
message | string | What happened, in words. |
Take a call off hold
/domains/~/users/{user}/calls/{call_id}/unholdChanges unhold in one live call.
Write Key Admin switch: Live calls, Write.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
user required | path | string | The user ID, usually their extension number, like 1001. Default ~ Min length 0 Max length 16 |
call_id required | path | string | The ID of the call in progress. |
Example request
curl -X PATCH "https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}/unhold" \
-H "Authorization: Bearer $NOODLEVOICE_KEY"const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}/unhold", {
method: "PATCH",
headers: {
Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
},
});
const data = await res.json();import os, requests
r = requests.patch(
"https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}/unhold",
headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
)
print(r.status_code, r.json())Response 202
{
"code": 1,
"message": "Hello from NoodleVoice"
}Response fields (2)
| Field | Type | Notes |
|---|---|---|
code | integer | HTTP status code. |
message | string | What happened, in words. |
Hang up a call
/domains/~/users/{user}/calls/{call_id}Ends a call in progress.
Write Key Admin switch: Live calls, Write.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
user required | path | string | The user ID, usually their extension number, like 1001. Default ~ Min length 0 Max length 16 |
call_id required | path | string | The ID of the call in progress. |
Example request
curl -X DELETE "https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}" \
-H "Authorization: Bearer $NOODLEVOICE_KEY"const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}", {
method: "DELETE",
headers: {
Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
},
});
const data = await res.json();import os, requests
r = requests.delete(
"https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}",
headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
)
print(r.status_code, r.json())Response 200
Returns a status code with a short JSON message.
Reject a ringing call
/domains/~/users/{user}/calls/{call_id}/rejectDeclines a ringing call so it follows the user's no answer rule.
Write Key Admin switch: Live calls, Write.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
user required | path | string | The user ID, usually their extension number, like 1001. Default ~ Min length 0 Max length 16 |
call_id required | path | string | The ID of the call in progress. |
Example request
curl -X DELETE "https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}/reject" \
-H "Authorization: Bearer $NOODLEVOICE_KEY"const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}/reject", {
method: "DELETE",
headers: {
Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
},
});
const data = await res.json();import os, requests
r = requests.delete(
"https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/calls/{call_id}/reject",
headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
)
print(r.status_code, r.json())Response 202
Returns a status code with a short JSON message.