Skip to content

Creating an agent customer

Method create.customers
Description Creating an agent customer
Available to Partner

Request parameters

Name Type Required Valid values Description
access_token string yes Authentication session key
name string yes Customer name
description string no Description of the customer
tariff_plan_id number yes Unique identifier of the tariff plan. The list of available tariff plans can be obtained using the "get.tariff_plans" method
email string yes Customer email address
password string yes Minimum length: 8 characters Customer password
monthly_base_limit number no Total monthly limit. The value is specified in monetary units.
monthly_base_notify_limit number no Threshold of the total monthly base limit; when it is reached, a notification is sent to the addresses specified in the "monthly_base_notify_emails" parameter
monthly_base_notify_emails array yes Maximum 5 addresses Email addresses that receive notifications when the total monthly limit is reached
monthly_calls_limit number no Monthly call limit. The value is specified as a number of calls.
monthly_calls_notify_limit number no Threshold of the monthly call limit; when it is reached, a notification is sent to the addresses specified in the "monthly_calls_notify_emails" parameter
monthly_calls_notify_emails array yes Maximum 5 addresses Email addresses that receive notifications when the monthly call limit is reached
daily_calls_limit number no Daily call limit. The value is specified as a number of calls.
daily_calls_notify_limit number no Threshold of the daily call limit; when it is reached, a notification is sent to the addresses specified in the "daily_calls_notify_emails" parameter
daily_calls_notify_emails array yes Maximum 5 addresses Email addresses that receive notifications when the daily call limit is reached

Response parameters

Name Type Required Description
id number yes Unique customer identifier

JSON request structure

{
    "jsonrpc": "2.0",
    "id": "number",
    "method": "create.customers",
    "params": {
        "access_token": "string",
        "name": "string",
        "description": "string",
        "tariff_plan_id": "number",
        "email": "string",
        "password": "string",
        "monthly_base_limit": "number",
        "monthly_base_notify_limit": "number",
        "monthly_base_notify_emails": [ "item" ],
        "monthly_calls_limit": "number",
        "monthly_calls_notify_limit": "number",
        "monthly_calls_notify_emails": [ "item" ],
        "daily_calls_limit": "number",
        "daily_calls_notify_limit": "number",
        "daily_calls_notify_emails": [ "item" ]
    }
}

JSON response structure

{
    "jsonrpc": "2.0",
    "id": "number",
    "result": {
        "id": "number"
    }
}

List of returned errors

See the section "List of errors for methods with the create method".