Skip to main content

Update account

PATCH 

/clients/accounts/:id

JSON-RPC

clients.accounts.update

info

All parameters except id are optional, only provided parameters will be updated.

Request​

Path Parameters

    id integerrequired

    Account ID.

Bodyrequired

    clients_idintegerrequired

    Client ID.

    namestringrequired

    Name.

    Possible values: <= 64 characters

    auth_typestringrequired

    Type of identification.

    Possible values: [name, ip, ani]

    notesstring | nullnullable

    Notes.

    Default value: null
    orig_tagsstring[]

    Origination: tag(s) that are assigned to the event originated by the account.

    Default value: []
    term_tagsstring[]

    Termination: tag(s) that are assigned to the event terminated by the account.

    Default value: []
    tech_prefixstring | nullnullable

    Technical prefix. Checked against the prefix of the dst_party_id in the xDR. Stripped from the dst_party_id on successful match.

    Possible values: <= 64 characters

    Default value: null
    anistring | nullnullable

    Identification: ANI. Required when auth_type is ani.

    Possible values: <= 64 characters

    Default value: null
    accnamestring | nullnullable

    Identification: name. Required when auth_type is name.

    Possible values: <= 128 characters

    Default value: null
    passwordstring | nullnullable

    Identification: password. Used with name auth type. Should be supported by the equipment. Typically used when registration of the account is done via billing system.

    Possible values: <= 256 characters

    Default value: null
    orig_enabledboolean

    Origination: if True, the account is allowed to originate events (calls).

    Default value: false
    orig_capacityinteger | nullnullable

    Origination: concurrent channels capacity.

    Possible values: >= 0 and <= 2147483647

    Default value: null
    orig_rate_tables_idsinteger[]nullable

    Origination: rate table ID(s). If not given, the rate tables of the client are used.

    Default value: null
    routing_plans_idinteger | nullnullable

    Origination: routing plan ID. If not given, the routing plan of the client is used.

    Default value: null
    term_enabledboolean

    Termination: if True, the account is allowed to terminate events (calls).

    Default value: false
    term_capacityinteger | nullnullable

    Termination: concurrent channels capacity.

    Possible values: >= 0 and <= 2147483647

    Default value: null
    term_rate_tables_idsinteger[]nullable

    Termination: rate table ID(s). If not given, the rate tables of the client are used.

    Default value: null
    protocolstring | nullnullable

    Termination: protocol. Should be supported by the equipment.

    Possible values: <= 64 characters

    Default value: null
    portstring | nullnullable

    Termination: port. Should be supported by the equipment.

    Possible values: <= 64 characters

    Default value: null
    proxy_modeinteger

    Termination: proxy mode. Should be supported by the equipment.

    Possible values: >= 0 and <= 7

    Default value: 1
    ipscidr[]

    Identification: IP address(es). Required when auth_type is ip.

    Default value: []
    equipment_idsinteger[]

    Identification: Equipment ID(s) on which the account is allowed to be used.

    Default value: []

Responses​

Number of the affected rows.

Schema
    integerinteger

Authorization: X-Api-Key

name: X-Api-Keytype: apiKeyin: headerdescription: Token for API access
curl -L -X PATCH 'https://docs.jerasoft.net/clients/accounts/:id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Api-Key: <X-Api-Key>'
Request Collapse all
Auth
Parameters
— pathrequired
Body required
{
  "clients_id": 0,
  "name": "string",
  "auth_type": "name",
  "orig_tags": [
    "string"
  ],
  "term_tags": [
    "string"
  ],
  "orig_enabled": false,
  "term_enabled": false,
  "proxy_mode": 1,
  "ips": [
    "string"
  ],
  "equipment_ids": [
    0
  ]
}