API Reference
Key Admin
Numbers and call routing

Phone numbers

Phone numbers (DIDs) are the numbers people dial to reach the account. Each one routes somewhere: a user, a call queue, an auto attendant or an outside number.

In the Key Admin this is the Phone numbers switch. Read lets a key call the GET endpoints below. Write lets it call the ones that change data.

List phone numbers

GET/domains/~/phonenumbers

Returns every phone number (DID) on the account and where each one routes.

Read Key Admin switch: Phone numbers, Read. Read only keys also work.

Example request

curl -X GET "https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers" \
  -H "Authorization: Bearer $NOODLEVOICE_KEY"
const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers", {
  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/~/phonenumbers",
    headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
)
print(r.status_code, r.json())

Response 200

[
  {
    "phonenumber": "15555550123",
    "enabled": "yes",
    "domain": "string",
    "dial-rule-application": "available-number",
    "dial-rule-parameter": "string",
    "dial-rule-translation-destination-user": "1001",
    "dial-rule-translation-destination-host": "[*]",
    "dial-rule-translation-source-name": "[*]",
    "...": "1 more fields"
  }
]
Response fields (9)
FieldTypeNotes
phonenumberstringPhone number in E.164 digits, like 15555550123.
enabledstringWhether it is turned on (yes or no). One of: yes, no Default yes
domainstringThe account the item belongs to. Max length 64
dial-rule-applicationstring One of: available-number, to-voicemail-residential, to-callqueue, to-callqueue-announce-count-callers-ahead, to-callqueue-announce-expected-wait-time, to-connection, to-connection-or-user-no-failover, to-single-device, to-user, to-user-residential, to-voicemail, spam-screening, to-connection-block-caller-id, to-connection-no-timeout, to-connection-add-header-force-caller-id, to-connection-add-header-no-timeout, to-connection-add-header, to-single-device-add-header-allow-voicemail, to-single-device-add-header-allow-voicemail-residential, to-single-device-add-header, to-user-add-header, to-user-residential-add-header, to-user-notify-of-recording, hangup, to-user-answer-and-fake-ringback, toggle-timeframe
dial-rule-parameterstring
dial-rule-translation-destination-userstring
dial-rule-translation-destination-hoststring Default [*]
dial-rule-translation-source-namestringName of the dial rule translation source. Default [*]
dial-rule-descriptionstring

Count phone numbers

GET/domains/~/phonenumbers/count

Returns how many phone numbers there are on the account, as {"total": n}.

Read Key Admin switch: Phone numbers, Read. Read only keys also work.

Example request

curl -X GET "https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers/count" \
  -H "Authorization: Bearer $NOODLEVOICE_KEY"
const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers/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/~/phonenumbers/count",
    headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
)
print(r.status_code, r.json())

Response 200

{
  "total": 1
}
Response fields (1)
FieldTypeNotes
totalintegerHow many items matched.

Other responses: 400, 401, 404. See errors.

Get a phone number

GET/domains/~/phonenumbers/{phonenumber}

Returns one phone number by its ID.

Read Key Admin switch: Phone numbers, Read. Read only keys also work.

Parameters

NameInTypeNotes
phonenumber requiredpathstringThe phone number in E.164 digits, like 15555550123.

Example request

curl -X GET "https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers/15555550123" \
  -H "Authorization: Bearer $NOODLEVOICE_KEY"
const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers/15555550123", {
  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/~/phonenumbers/15555550123",
    headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
)
print(r.status_code, r.json())

Response 200

{
  "phonenumber": "15555550123",
  "enabled": "yes",
  "domain": "string",
  "dial-rule-application": "available-number",
  "dial-rule-parameter": "string",
  "dial-rule-translation-destination-user": "1001",
  "dial-rule-translation-destination-host": "[*]",
  "dial-rule-translation-source-name": "[*]",
  "...": "1 more fields"
}
Response fields (9)
FieldTypeNotes
phonenumberstringPhone number in E.164 digits, like 15555550123.
enabledstringWhether it is turned on (yes or no). One of: yes, no Default yes
domainstringThe account the item belongs to. Max length 64
dial-rule-applicationstring One of: available-number, to-voicemail-residential, to-callqueue, to-callqueue-announce-count-callers-ahead, to-callqueue-announce-expected-wait-time, to-connection, to-connection-or-user-no-failover, to-single-device, to-user, to-user-residential, to-voicemail, spam-screening, to-connection-block-caller-id, to-connection-no-timeout, to-connection-add-header-force-caller-id, to-connection-add-header-no-timeout, to-connection-add-header, to-single-device-add-header-allow-voicemail, to-single-device-add-header-allow-voicemail-residential, to-single-device-add-header, to-user-add-header, to-user-residential-add-header, to-user-notify-of-recording, hangup, to-user-answer-and-fake-ringback, toggle-timeframe
dial-rule-parameterstring
dial-rule-translation-destination-userstring
dial-rule-translation-destination-hoststring Default [*]
dial-rule-translation-source-namestringName of the dial rule translation source. Default [*]
dial-rule-descriptionstring

Add a phone number

POST/domains/~/phonenumbers

Adds a phone number to the account and sets where it routes.

Write Key Admin switch: Phone numbers, Write.

Request body application/json

FieldTypeNotes
phonenumber requiredstringPhone number in E.164 digits, like 15555550123.
enabledstringWhether it is turned on (yes or no). One of: yes, no Default yes
dial-rule-applicationstring One of: available-number, to-voicemail-residential, to-callqueue, to-callqueue-announce-count-callers-ahead, to-callqueue-announce-expected-wait-time, to-connection, to-connection-or-user-no-failover, to-single-device, to-user, to-user-residential, to-voicemail, spam-screening, to-connection-block-caller-id, to-connection-no-timeout, to-connection-add-header-force-caller-id, to-connection-add-header-no-timeout, to-connection-add-header, to-single-device-add-header-allow-voicemail, to-single-device-add-header-allow-voicemail-residential, to-single-device-add-header, to-user-add-header, to-user-residential-add-header, to-user-notify-of-recording, hangup, to-user-answer-and-fake-ringback, toggle-timeframe
dial-rule-parameterstring
dial-rule-translation-destination-user requiredstring
dial-rule-translation-destination-hoststring Default [*]
dial-rule-translation-source-namestringName of the dial rule translation source. Default [*]
dial-rule-descriptionstring

Example request

curl -X POST "https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers" \
  -H "Authorization: Bearer $NOODLEVOICE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phonenumber": "15555550123",
    "dial-rule-translation-destination-user": "1001"
  }'
const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "phonenumber": "15555550123",
    "dial-rule-translation-destination-user": "1001"
  }),
});
const data = await res.json();
import os, requests

r = requests.post(
    "https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers",
    headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
    json={
        "phonenumber": "15555550123",
        "dial-rule-translation-destination-user": "1001"
    },
)
print(r.status_code, r.json())

Response 202

{
  "code": 1,
  "message": "Hello from NoodleVoice"
}
Response fields (2)
FieldTypeNotes
codeintegerHTTP status code.
messagestringWhat happened, in words.

Other responses: 409. See errors.

Release a phone number to inventory

PUT/domains/~/phonenumbers

Takes a phone number out of service on the account and marks it available.

Write Key Admin switch: Phone numbers, Write.

Request body application/json

FieldTypeNotes
phonenumber requiredstringPhone number in E.164 digits, like 15555550123.
enabledstringWhether it is turned on (yes or no). One of: yes, no Default yes
dial-rule-applicationstring One of: available-number, to-voicemail-residential, to-callqueue, to-callqueue-announce-count-callers-ahead, to-callqueue-announce-expected-wait-time, to-connection, to-connection-or-user-no-failover, to-single-device, to-user, to-user-residential, to-voicemail, spam-screening, to-connection-block-caller-id, to-connection-no-timeout, to-connection-add-header-force-caller-id, to-connection-add-header-no-timeout, to-connection-add-header, to-single-device-add-header-allow-voicemail, to-single-device-add-header-allow-voicemail-residential, to-single-device-add-header, to-user-add-header, to-user-residential-add-header, to-user-notify-of-recording, hangup, to-user-answer-and-fake-ringback, toggle-timeframe
dial-rule-parameterstring
dial-rule-translation-destination-user requiredstring
dial-rule-translation-destination-hoststring Default [*]
dial-rule-translation-source-namestringName of the dial rule translation source. Default [*]
dial-rule-descriptionstring

Example request

curl -X PUT "https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers" \
  -H "Authorization: Bearer $NOODLEVOICE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phonenumber": "15555550123",
    "dial-rule-translation-destination-user": "1001"
  }'
const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers", {
  method: "PUT",
  headers: {
    Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "phonenumber": "15555550123",
    "dial-rule-translation-destination-user": "1001"
  }),
});
const data = await res.json();
import os, requests

r = requests.put(
    "https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers",
    headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
    json={
        "phonenumber": "15555550123",
        "dial-rule-translation-destination-user": "1001"
    },
)
print(r.status_code, r.json())

Response 202

{
  "code": 1,
  "message": "Hello from NoodleVoice"
}
Response fields (2)
FieldTypeNotes
codeintegerHTTP status code.
messagestringWhat happened, in words.

Other responses: 409. See errors.

Forward a phone number to an outside number

PUT/domains/~/phonenumbers

Sends calls for a phone number to a number outside the account.

Write Key Admin switch: Phone numbers, Write.

Request body application/json

FieldTypeNotes
phonenumber requiredstringPhone number in E.164 digits, like 15555550123.
enabledstringWhether it is turned on (yes or no). One of: yes, no Default yes
dial-rule-applicationstring One of: available-number, to-voicemail-residential, to-callqueue, to-callqueue-announce-count-callers-ahead, to-callqueue-announce-expected-wait-time, to-connection, to-connection-or-user-no-failover, to-single-device, to-user, to-user-residential, to-voicemail, spam-screening, to-connection-block-caller-id, to-connection-no-timeout, to-connection-add-header-force-caller-id, to-connection-add-header-no-timeout, to-connection-add-header, to-single-device-add-header-allow-voicemail, to-single-device-add-header-allow-voicemail-residential, to-single-device-add-header, to-user-add-header, to-user-residential-add-header, to-user-notify-of-recording, hangup, to-user-answer-and-fake-ringback, toggle-timeframe
dial-rule-parameterstring
dial-rule-translation-destination-user requiredstring
dial-rule-translation-destination-hoststring Default [*]
dial-rule-translation-source-namestringName of the dial rule translation source. Default [*]
dial-rule-descriptionstring

Example request

curl -X PUT "https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers" \
  -H "Authorization: Bearer $NOODLEVOICE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phonenumber": "15555550123",
    "dial-rule-translation-destination-user": "1001"
  }'
const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers", {
  method: "PUT",
  headers: {
    Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "phonenumber": "15555550123",
    "dial-rule-translation-destination-user": "1001"
  }),
});
const data = await res.json();
import os, requests

r = requests.put(
    "https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers",
    headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
    json={
        "phonenumber": "15555550123",
        "dial-rule-translation-destination-user": "1001"
    },
)
print(r.status_code, r.json())

Response 202

{
  "code": 1,
  "message": "Hello from NoodleVoice"
}
Response fields (2)
FieldTypeNotes
codeintegerHTTP status code.
messagestringWhat happened, in words.

Other responses: 409. See errors.

Route a phone number to a call queue

PUT/domains/~/phonenumbers

Points a phone number at a call queue.

Write Key Admin switch: Phone numbers, Write.

Request body application/json

FieldTypeNotes
phonenumber requiredstringPhone number in E.164 digits, like 15555550123.
enabledstringWhether it is turned on (yes or no). One of: yes, no Default yes
dial-rule-applicationstring One of: available-number, to-voicemail-residential, to-callqueue, to-callqueue-announce-count-callers-ahead, to-callqueue-announce-expected-wait-time, to-connection, to-connection-or-user-no-failover, to-single-device, to-user, to-user-residential, to-voicemail, spam-screening, to-connection-block-caller-id, to-connection-no-timeout, to-connection-add-header-force-caller-id, to-connection-add-header-no-timeout, to-connection-add-header, to-single-device-add-header-allow-voicemail, to-single-device-add-header-allow-voicemail-residential, to-single-device-add-header, to-user-add-header, to-user-residential-add-header, to-user-notify-of-recording, hangup, to-user-answer-and-fake-ringback, toggle-timeframe
dial-rule-parameterstring
dial-rule-translation-destination-user requiredstring
dial-rule-translation-destination-hoststring Default [*]
dial-rule-translation-source-namestringName of the dial rule translation source. Default [*]
dial-rule-descriptionstring

Example request

curl -X PUT "https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers" \
  -H "Authorization: Bearer $NOODLEVOICE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phonenumber": "15555550123",
    "dial-rule-translation-destination-user": "1001"
  }'
const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers", {
  method: "PUT",
  headers: {
    Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "phonenumber": "15555550123",
    "dial-rule-translation-destination-user": "1001"
  }),
});
const data = await res.json();
import os, requests

r = requests.put(
    "https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers",
    headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
    json={
        "phonenumber": "15555550123",
        "dial-rule-translation-destination-user": "1001"
    },
)
print(r.status_code, r.json())

Response 202

{
  "code": 1,
  "message": "Hello from NoodleVoice"
}
Response fields (2)
FieldTypeNotes
codeintegerHTTP status code.
messagestringWhat happened, in words.

Other responses: 409. See errors.

Route a phone number to a user

PUT/domains/~/phonenumbers

Points a phone number at a user, so calls to it ring that user's answer rules.

Write Key Admin switch: Phone numbers, Write.

Request body application/json

FieldTypeNotes
phonenumber requiredstringPhone number in E.164 digits, like 15555550123.
enabledstringWhether it is turned on (yes or no). One of: yes, no Default yes
dial-rule-applicationstring One of: available-number, to-voicemail-residential, to-callqueue, to-callqueue-announce-count-callers-ahead, to-callqueue-announce-expected-wait-time, to-connection, to-connection-or-user-no-failover, to-single-device, to-user, to-user-residential, to-voicemail, spam-screening, to-connection-block-caller-id, to-connection-no-timeout, to-connection-add-header-force-caller-id, to-connection-add-header-no-timeout, to-connection-add-header, to-single-device-add-header-allow-voicemail, to-single-device-add-header-allow-voicemail-residential, to-single-device-add-header, to-user-add-header, to-user-residential-add-header, to-user-notify-of-recording, hangup, to-user-answer-and-fake-ringback, toggle-timeframe
dial-rule-parameterstring
dial-rule-translation-destination-user requiredstring
dial-rule-translation-destination-hoststring Default [*]
dial-rule-translation-source-namestringName of the dial rule translation source. Default [*]
dial-rule-descriptionstring

Example request

curl -X PUT "https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers" \
  -H "Authorization: Bearer $NOODLEVOICE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phonenumber": "15555550123",
    "dial-rule-translation-destination-user": "1001"
  }'
const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers", {
  method: "PUT",
  headers: {
    Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "phonenumber": "15555550123",
    "dial-rule-translation-destination-user": "1001"
  }),
});
const data = await res.json();
import os, requests

r = requests.put(
    "https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers",
    headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
    json={
        "phonenumber": "15555550123",
        "dial-rule-translation-destination-user": "1001"
    },
)
print(r.status_code, r.json())

Response 202

{
  "code": 1,
  "message": "Hello from NoodleVoice"
}
Response fields (2)
FieldTypeNotes
codeintegerHTTP status code.
messagestringWhat happened, in words.

Other responses: 409. See errors.

Update a phone number

PUT/domains/~/phonenumbers/{phonenumber}

Changes an existing phone number. Send the fields you want to set in the body.

Write Key Admin switch: Phone numbers, Write.

Parameters

NameInTypeNotes
phonenumber requiredpathstringThe phone number in E.164 digits, like 15555550123.

Request body application/json

FieldTypeNotes
enabledstringWhether it is turned on (yes or no). One of: yes, no Default yes
dial-rule-applicationstring One of: available-number, to-voicemail-residential, to-callqueue, to-callqueue-announce-count-callers-ahead, to-callqueue-announce-expected-wait-time, to-connection, to-connection-or-user-no-failover, to-single-device, to-user, to-user-residential, to-voicemail, spam-screening, to-connection-block-caller-id, to-connection-no-timeout, to-connection-add-header-force-caller-id, to-connection-add-header-no-timeout, to-connection-add-header, to-single-device-add-header-allow-voicemail, to-single-device-add-header-allow-voicemail-residential, to-single-device-add-header, to-user-add-header, to-user-residential-add-header, to-user-notify-of-recording, hangup, to-user-answer-and-fake-ringback, toggle-timeframe
dial-rule-parameterstring
dial-rule-translation-destination-user requiredstring
dial-rule-translation-destination-hoststring Default [*]
dial-rule-translation-source-namestringName of the dial rule translation source. Default [*]
dial-rule-descriptionstring

Example request

curl -X PUT "https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers/15555550123" \
  -H "Authorization: Bearer $NOODLEVOICE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "dial-rule-translation-destination-user": "1001"
  }'
const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers/15555550123", {
  method: "PUT",
  headers: {
    Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "dial-rule-translation-destination-user": "1001"
  }),
});
const data = await res.json();
import os, requests

r = requests.put(
    "https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers/15555550123",
    headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
    json={
        "dial-rule-translation-destination-user": "1001"
    },
)
print(r.status_code, r.json())

Response 202

{
  "code": 1,
  "message": "Hello from NoodleVoice"
}
Response fields (2)
FieldTypeNotes
codeintegerHTTP status code.
messagestringWhat happened, in words.

Other responses: 409. See errors.

Delete a phone number

DELETE/domains/~/phonenumbers/{phonenumber}

Removes a phone number. This can't be undone.

Write Key Admin switch: Phone numbers, Write.

Parameters

NameInTypeNotes
phonenumber requiredpathstringThe phone number in E.164 digits, like 15555550123.

Example request

curl -X DELETE "https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers/15555550123" \
  -H "Authorization: Bearer $NOODLEVOICE_KEY"
const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/phonenumbers/15555550123", {
  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/~/phonenumbers/15555550123",
    headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
)
print(r.status_code, r.json())

Response 202

{
  "code": 1,
  "message": "Hello from NoodleVoice"
}
Response fields (2)
FieldTypeNotes
codeintegerHTTP status code.
messagestringWhat happened, in words.

Other responses: 409. See errors.