API Reference
Key Admin
Numbers and call routing

Answer rules and forwarding

Answer rules decide what happens when a user's extension rings: ring these devices, forward to a cell, go to voicemail, and so on. Each rule is tied to a time frame, and the first rule whose time frame matches is used.

In the Key Admin this is the Answer rules and forwarding switch. Read lets a key call the GET endpoints below. Write lets it call the ones that change data.

List answer rules for a user

GET/domains/~/users/{user}/answerrules

Returns the answer rules for one user.

Read Key Admin switch: Answer rules and forwarding, Read. Read only keys also work.

Parameters

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

Response 200

[
  {
    "domain": "string",
    "user": "1001",
    "time-frame": "string",
    "enabled": "yes",
    "is-active": true,
    "order": 99,
    "simultaneous-ring": {
      "enabled": "yes"
    },
    "do-not-disturb": {
      "enabled": "yes"
    },
    "...": "12 more fields"
  }
]
Response fields (49)
FieldTypeNotes
domainstringThe account the item belongs to. Max length 64
userstringThe user ID (extension).
time-framestring
enabledstringWhether it is turned on (yes or no). One of: yes, no Default yes
is-activeboolean
orderintegerOrder of the item. Default 99 Min 0
simultaneous-ringobject
simultaneous-ring.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
simultaneous-ring.parametersarray of any
do-not-disturbobject
do-not-disturb.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-alwaysobject
forward-always.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-always.parametersarray of any
forward-on-activeobject
forward-on-active.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-on-active.parametersarray of any
forward-on-busyobject
forward-on-busy.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-on-busy.parametersarray of any
forward-no-answerobject
forward-no-answer.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-no-answer.parametersarray of any
forward-when-unregisteredobject
forward-when-unregistered.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-when-unregistered.parametersarray of any
forward-on-dndobject
forward-on-dnd.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-on-dnd.parametersarray of any
forward-on-spam-callobject
forward-on-spam-call.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-on-spam-call.parametersarray of any
call-screeningobject
call-screening.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
phone-numbers-to-allowobject
phone-numbers-to-allow.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
phone-numbers-to-allow.parametersarray of any
new-positionstring One of: top, bottom
phone-numbers-to-rejectobject
phone-numbers-to-reject.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
phone-numbers-to-reject.parametersarray of any
time_range_dataarray of object
time_range_data[].ordinal-orderinteger
time_range_data[].start-datestring (date)Start (date).
time_range_data[].end-datestring (date)End (date).
time_range_data[].day-of-week-numberanyDay of week number.
time_range_data[].start-timestring (time) Default 00:00
time_range_data[].end-timestring (time) Default 23:59
time_range_data[].invert-matchstring One of: yes, no Default no

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

Count answer rules for a user

GET/domains/~/users/{user}/answerrules/count

Returns how many answer rules there are for one user, as {"total": n}.

Read Key Admin switch: Answer rules and forwarding, Read. Read only keys also work.

Parameters

NameInTypeNotes
user requiredpathstringThe 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/answerrules/count" \
  -H "Authorization: Bearer $NOODLEVOICE_KEY"
const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/answerrules/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/~/users/1001/answerrules/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, 403, 404. See errors.

Get an answer rule

GET/domains/~/users/{user}/answerrules/{timeframe}

Returns one of a user's answer rules, by the name of its time frame.

Read Key Admin switch: Answer rules and forwarding, Read. Read only keys also work.

Parameters

NameInTypeNotes
user requiredpathstringThe user ID, usually their extension number, like 1001. Default ~ Min length 0 Max length 16
timeframe requiredpathstringThe name of the time frame the answer rule uses.

Example request

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

Response 200

{
  "domain": "string",
  "user": "1001",
  "time-frame": "string",
  "enabled": "yes",
  "is-active": true,
  "order": 99,
  "simultaneous-ring": {
    "enabled": "yes"
  },
  "do-not-disturb": {
    "enabled": "yes"
  },
  "...": "12 more fields"
}
Response fields (49)
FieldTypeNotes
domainstringThe account the item belongs to. Max length 64
userstringThe user ID (extension).
time-framestring
enabledstringWhether it is turned on (yes or no). One of: yes, no Default yes
is-activeboolean
orderintegerOrder of the item. Default 99 Min 0
simultaneous-ringobject
simultaneous-ring.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
simultaneous-ring.parametersarray of any
do-not-disturbobject
do-not-disturb.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-alwaysobject
forward-always.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-always.parametersarray of any
forward-on-activeobject
forward-on-active.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-on-active.parametersarray of any
forward-on-busyobject
forward-on-busy.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-on-busy.parametersarray of any
forward-no-answerobject
forward-no-answer.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-no-answer.parametersarray of any
forward-when-unregisteredobject
forward-when-unregistered.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-when-unregistered.parametersarray of any
forward-on-dndobject
forward-on-dnd.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-on-dnd.parametersarray of any
forward-on-spam-callobject
forward-on-spam-call.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-on-spam-call.parametersarray of any
call-screeningobject
call-screening.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
phone-numbers-to-allowobject
phone-numbers-to-allow.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
phone-numbers-to-allow.parametersarray of any
new-positionstring One of: top, bottom
phone-numbers-to-rejectobject
phone-numbers-to-reject.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
phone-numbers-to-reject.parametersarray of any
time_range_dataarray of object
time_range_data[].ordinal-orderinteger
time_range_data[].start-datestring (date)Start (date).
time_range_data[].end-datestring (date)End (date).
time_range_data[].day-of-week-numberanyDay of week number.
time_range_data[].start-timestring (time) Default 00:00
time_range_data[].end-timestring (time) Default 23:59
time_range_data[].invert-matchstring One of: yes, no Default no

Create an answer rule for a user

POST/domains/~/users/{user}/answerrules

Adds a new answer rule for one user.

Write Key Admin switch: Answer rules and forwarding, Write.

Parameters

NameInTypeNotes
user requiredpathstringThe user ID, usually their extension number, like 1001. Default ~ Min length 0 Max length 16

Request body application/json

FieldTypeNotes
synchronous requiredstringSet to yes to wait until the change is finished before the response comes back. One of: yes, no Default no
time-frame requiredstring
enabled requiredstringWhether it is turned on (yes or no). One of: yes, no Default yes
is-active requiredboolean
orderintegerOrder of the item. Default 99 Min 0
simultaneous-ringobject
simultaneous-ring.enabled requiredstringWhether it is turned on (yes or no). One of: yes, no Default no
simultaneous-ring.parametersarray of any
do-not-disturbobject
do-not-disturb.enabled requiredstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-alwaysobject
forward-always.enabled requiredstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-always.parametersarray of any
forward-on-activeobject
forward-on-active.enabled requiredstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-on-active.parametersarray of any
forward-on-busyobject
forward-on-busy.enabled requiredstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-on-busy.parametersarray of any
forward-no-answerobject
forward-no-answer.enabled requiredstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-no-answer.parametersarray of any
forward-when-unregisteredobject
forward-when-unregistered.enabled requiredstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-when-unregistered.parametersarray of any
forward-on-dndobject
forward-on-dnd.enabled requiredstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-on-dnd.parametersarray of any
forward-on-spam-callobject
forward-on-spam-call.enabled requiredstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-on-spam-call.parametersarray of any
call-screeningobject
call-screening.enabled requiredstringWhether it is turned on (yes or no). One of: yes, no Default no
phone-numbers-to-allowobject
phone-numbers-to-allow.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
phone-numbers-to-allow.parametersarray of any
new-positionstring One of: top, bottom
phone-numbers-to-rejectobject
phone-numbers-to-reject.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
phone-numbers-to-reject.parametersarray of any

Example request

curl -X POST "https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/answerrules" \
  -H "Authorization: Bearer $NOODLEVOICE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "synchronous": "yes",
    "time-frame": "string",
    "enabled": "yes",
    "is-active": true
  }'
const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/answerrules", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "synchronous": "yes",
    "time-frame": "string",
    "enabled": "yes",
    "is-active": true
  }),
});
const data = await res.json();
import os, requests

r = requests.post(
    "https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/answerrules",
    headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
    json={
        "synchronous": "yes",
        "time-frame": "string",
        "enabled": "yes",
        "is-active": True
    },
)
print(r.status_code, r.json())

Response 202

Returns a status code with a short JSON message.

Reorder a user's answer rules

PUT/domains/~/users/{user}/answerrules/reorder

Sets the order answer rules are checked in. The first rule whose time frame matches wins.

Write Key Admin switch: Answer rules and forwarding, Write.

Parameters

NameInTypeNotes
user requiredpathstringThe user ID, usually their extension number, like 1001. Default ~ Min length 0 Max length 16

Example request

curl -X PUT "https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/answerrules/reorder" \
  -H "Authorization: Bearer $NOODLEVOICE_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "time-frame": "string"
    }
  ]'
const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/answerrules/reorder", {
  method: "PUT",
  headers: {
    Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify([
    {
      "time-frame": "string"
    }
  ]),
});
const data = await res.json();
import os, requests

r = requests.put(
    "https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/answerrules/reorder",
    headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
    json=[
        {
            "time-frame": "string"
        }
    ],
)
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: 400, 404. See errors.

Update a user's answer rule

PUT/domains/~/users/{user}/answerrules/{timeframe}

Changes one of a user's answer rules.

Write Key Admin switch: Answer rules and forwarding, Write.

Parameters

NameInTypeNotes
user requiredpathstringThe user ID, usually their extension number, like 1001. Default ~ Min length 0 Max length 16
timeframe requiredpathstringThe name of the time frame the answer rule uses.

Request body application/json

FieldTypeNotes
enabled requiredstringWhether it is turned on (yes or no). One of: yes, no Default yes
is-active requiredboolean
orderintegerOrder of the item. Default 99 Min 0
simultaneous-ringobject
simultaneous-ring.enabled requiredstringWhether it is turned on (yes or no). One of: yes, no Default no
simultaneous-ring.parametersarray of any
do-not-disturbobject
do-not-disturb.enabled requiredstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-alwaysobject
forward-always.enabled requiredstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-always.parametersarray of any
forward-on-activeobject
forward-on-active.enabled requiredstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-on-active.parametersarray of any
forward-on-busyobject
forward-on-busy.enabled requiredstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-on-busy.parametersarray of any
forward-no-answerobject
forward-no-answer.enabled requiredstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-no-answer.parametersarray of any
forward-when-unregisteredobject
forward-when-unregistered.enabled requiredstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-when-unregistered.parametersarray of any
forward-on-dndobject
forward-on-dnd.enabled requiredstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-on-dnd.parametersarray of any
forward-on-spam-callobject
forward-on-spam-call.enabled requiredstringWhether it is turned on (yes or no). One of: yes, no Default no
forward-on-spam-call.parametersarray of any
call-screeningobject
call-screening.enabled requiredstringWhether it is turned on (yes or no). One of: yes, no Default no
phone-numbers-to-allowobject
phone-numbers-to-allow.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
phone-numbers-to-allow.parametersarray of any
new-positionstring One of: top, bottom
phone-numbers-to-rejectobject
phone-numbers-to-reject.enabledstringWhether it is turned on (yes or no). One of: yes, no Default no
phone-numbers-to-reject.parametersarray of any

Example request

curl -X PUT "https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/answerrules/Business%20Hours" \
  -H "Authorization: Bearer $NOODLEVOICE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": "yes",
    "is-active": true
  }'
const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/answerrules/Business%20Hours", {
  method: "PUT",
  headers: {
    Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "enabled": "yes",
    "is-active": true
  }),
});
const data = await res.json();
import os, requests

r = requests.put(
    "https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/answerrules/Business%20Hours",
    headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
    json={
        "enabled": "yes",
        "is-active": True
    },
)
print(r.status_code, r.json())

Response 202

Returns a status code with a short JSON message.

Delete a user's answer rule

DELETE/domains/~/users/{user}/answerrules/{timeframe}

Removes one of a user's answer rules. This can't be undone.

Write Key Admin switch: Answer rules and forwarding, Write.

Parameters

NameInTypeNotes
user requiredpathstringThe user ID, usually their extension number, like 1001. Default ~ Min length 0 Max length 16
timeframe requiredpathstringThe name of the time frame the answer rule uses.

Example request

curl -X DELETE "https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/answerrules/Business%20Hours" \
  -H "Authorization: Bearer $NOODLEVOICE_KEY"
const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/users/1001/answerrules/Business%20Hours", {
  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/answerrules/Business%20Hours",
    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.