[comment]: # ({6a21ab39-3ac6704c})
# mfa.create

[comment]: # ({/6a21ab39-3ac6704c})

[comment]: # ({40aabbb7-b5627910})
### Description

`object mfa.create(object/array MFA methods)`

This method allows to create new MFA methods.

::: noteclassic
This method is only available to *Super admin* user type.
Permissions to call the method can be revoked in user role settings.
See [User roles](/manual/web_interface/frontend_sections/users/user_roles) for more information.
:::

[comment]: # ({/40aabbb7-b5627910})

[comment]: # ({abca8999-ea339a55})
### Parameters

`(object/array)` MFA methods to create.

The method accepts MFA methods with the [standard MFA method properties](/manual/api/reference/mfa/object#mfa).

[comment]: # ({/abca8999-ea339a55})

[comment]: # ({3bbabc9e-8025b2cc})
### Return values

`(object)` Returns an object containing the IDs of the created MFA methods under the `mfaids` property.
The order of the returned IDs matches the order of the passed items.

[comment]: # ({/3bbabc9e-8025b2cc})

[comment]: # ({b41637d2-d25cc781})
### Examples

[comment]: # ({/b41637d2-d25cc781})

[comment]: # ({3dbb4346-b7ca3116})
#### Creating MFA methods

Create a "Zabbix TOTP" MFA method utilizing time-based one-time passwords (TOTP), with the hash function for generating TOTP codes set to SHA-1 and the verification code length set to 6 digits.

[Request](/manual/api#performing-requests):

```json
{
    "jsonrpc": "2.0",
    "method": "mfa.create",
    "params": {
        "type": 1,
        "name": "Zabbix TOTP",
        "hash_function": 1,
        "code_length": 6
    },
    "id": 1
}
```

Response:

```json
{
    "jsonrpc": "2.0",
    "result": {
        "mfaids": [
            "1"
        ]
    },
    "id": 1
}
```

[comment]: # ({/3dbb4346-b7ca3116})

[comment]: # ({fcaf7dc4-0bb24199})
### Source

CMfa::create() in *ui/include/classes/api/services/CMfa.php*.

[comment]: # ({/fcaf7dc4-0bb24199})
