---
title: "Add a Answerrule for a User"
method: POST
path: "/domains/{domain}/users/{user}/answerrules"
tags: ["Answer Rules"]
---

# Add a Answerrule for a User

`POST /domains/{domain}/users/{user}/answerrules`

## Path parameters

- `domain` string, 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.
- `user` string, 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.

## Request body

- object
  - `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-frame` string, 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-active` boolean, 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.
  - `order` integer — 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.
  - `simultaneous-ring` AnswerruleFeatureSimRing
    - `enabled` 'yes' | 'no', required
    - `parameters` union[] — This field will provide the values needed to configure the parent feature. These values could be multiple strings or numbers.
      - union
        - string
        - number
  - `do-not-disturb` object — When enabled this feature will block all inbound ringing and send the call to voicemails if enabled.
    - `enabled` 'yes' | 'no', required
  - `forward-always` AnswerruleFeature
    - `enabled` 'yes' | 'no', required
    - `parameters` union[] — This field will provide the values needed to configure the parent feature. These values could be multiple strings or numbers.
      - union
        - string
        - number
  - `forward-on-active` AnswerruleFeature
    - `enabled` 'yes' | 'no', required
    - `parameters` union[] — This field will provide the values needed to configure the parent feature. These values could be multiple strings or numbers.
      - union
        - string
        - number
  - `forward-on-busy` AnswerruleFeature
    - `enabled` 'yes' | 'no', required
    - `parameters` union[] — This field will provide the values needed to configure the parent feature. These values could be multiple strings or numbers.
      - union
        - string
        - number
  - `forward-no-answer` AnswerruleFeature
    - `enabled` 'yes' | 'no', required
    - `parameters` union[] — This field will provide the values needed to configure the parent feature. These values could be multiple strings or numbers.
      - union
        - string
        - number
  - `forward-when-unregistered` AnswerruleFeature
    - `enabled` 'yes' | 'no', required
    - `parameters` union[] — This field will provide the values needed to configure the parent feature. These values could be multiple strings or numbers.
      - union
        - string
        - number
  - `forward-on-dnd` AnswerruleFeature
    - `enabled` 'yes' | 'no', required
    - `parameters` union[] — This field will provide the values needed to configure the parent feature. These values could be multiple strings or numbers.
      - union
        - string
        - number
  - `forward-on-spam-call` AnswerruleFeature
    - `enabled` 'yes' | 'no', required
    - `parameters` union[] — This field will provide the values needed to configure the parent feature. These values could be multiple strings or numbers.
      - union
        - string
        - number
  - `call-screening` object — When enabled this feature will enable the call screening application asking the caller to record their name before attempting the connection based on other answer rules.
    - `enabled` 'yes' | 'no', required
  - `phone-numbers-to-allow` AnswerruleFeatureWithRemove
    - `enabled` 'yes' | 'no'
    - `parameters` union[] — This field will provide the values needed to configure the parent feature. These values could be multiple strings or numbers.
      - union
        - string
        - number
  - `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
  - `phone-numbers-to-reject` AnswerruleFeatureWithRemove
    - `enabled` 'yes' | 'no'
    - `parameters` union[] — This field will provide the values needed to configure the parent feature. These values could be multiple strings or numbers.
      - union
        - string
        - number

## Response `202`

- object

## Other responses

- `400`
- `401`
- `404`

---

[API](https://skmtc.net/ns-api/apis/netsapiens-api-v2.md) · [All operations](https://skmtc.net/ns-api/apis/netsapiens-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ns-api/netsapiens-api-v2/revisions/d37f65b5b886/schema)
