v1

latestOpenAPI 3.1.02026-07-24317911.4 MB
Answer Rules

Add a Answerrule for a User

post/domains/{domain}/users/{user}/answerrules

Path parameters

domainstring required

This is the main organization name. This is used to link resource to its group/tenant/organization/enterprise. Then using in path for GET you can set to "~" to use the domain name linked to your token/key instead of the domain name itself when reading for your own domain.

Example:example.com
userstring required

This is the main user extension for the user account. ~ can be used to mean "my account" which will extract the user from the token/key used for authentication.

Example:1000

Request body

synchronous'yes' | 'no' required

When synchronous is requested with "yes" the response will be a 200 on success and will contain a valid JSON representiation of the new resource. If no or left off request a 202 "Accepted" will be given in a success case and this can be considered a success. Synchronous responses will be a little slower as the API will process the geo replication request and wait till the local copy has been written and can be read back berfore sending a response.

time-framestring required

This is the timeframe that also is needed to make this set of answer rules unique. * is teh default and if no timeframes are setup this is is how to set anserrules.

enabled'yes' | 'no' required
is-activeboolean required

This is read only option that will be true if this timeframe is active for this user when taking into account current settings, date/time and all timeframes.

orderinteger

This is to allow for a priority based order of different timeframes. The default is to add it in value higher (lower priority) than the lowest priority timeframe. Timeframe * will get 99 if not already set.

new-position'top' | 'bottom'

This will move the answerrule to the top or bottom in the priority list. Top having the most priority, and bottom having the least priority

Example request

{
  "simultaneous-ring": {
    "parameters": [
      "1234wp"
    ]
  },
  "forward-always": {
    "parameters": [
      "park_1234"
    ]
  },
  "forward-on-active": {
    "parameters": [
      "park_1234"
    ]
  },
  "forward-on-busy": {
    "parameters": [
      "park_1234"
    ]
  },
  "forward-no-answer": {
    "parameters": [
      "park_1234"
    ]
  },
  "forward-when-unregistered": {
    "parameters": [
      "park_1234"
    ]
  },
  "forward-on-dnd": {
    "parameters": [
      "park_1234"
    ]
  },
  "forward-on-spam-call": {
    "parameters": [
      "park_1234"
    ]
  },
  "phone-numbers-to-allow": {
    "parameters": [
      "park_1234"
    ]
  },
  "new-position": "top",
  "phone-numbers-to-reject": {
    "parameters": [
      "park_1234"
    ]
  }
}

Response

object required