---
title: "POST /_system/security/methods - System Security · RUAL Documentation"
description: "Create new 2FA authentication method"
canonical: https://docs.rual.nl/cluster/api/system-security/system-security-methods-post
language: en
---

# POST /_system/security/methods

Create new 2FA authentication method

| Key | Type | Example | Description |
| --- | --- | --- | --- |
| **[authorization](https://docs.rual.nl/cluster/api#token-providing)** required | `string` | `"Bearer access_token"` | Access token |

| Key | Type | Example | Description |
| --- | --- | --- | --- |
| **name** required | `string` | `"production"` | Device name |
| **phone_number** optional | `string` | `"+31612345678"` | Phone number (for SMS type) |
| **type** required | `string` | `"totp"` | 2FA device type Allowed: `"totp"`, `"sms"`, `"email"` |

```
{
  "_meta": {
    "cms": 1782166695813,
    "created": 1782166695,
    "entity": 1,
    "expiry": 3600,
    "guid": "a23575f49d0af385314c1f02280163374297e018a692e5e4ab85eb307ebf6ebc",
    "removed": 0,
    "ums": 1782166695813,
    "update_hash": "60e27209fa93063b5605e41605c2722ed428cae0",
    "updated": 1782166695
  },
  "default": true,
  "iv": "9f86d081884c7d659a2feaa0",
  "method": "GET",
  "name": "production",
  "phonenumber": "+31612345678",
  "secret": "JBSWY3DPEHPK3PXP",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJndWlkIjoiYjllZTZhNjMxYjI0In0",
  "user_guid": "b9ee6a631b24e78d1aa48aef0dc067fff7bfbacd24a56ef4ed1f08e537d48b6b"
}
```

```
{
  "error": "ERROR_KEY"
}
```

| Permission | Description |
| --- | --- |
| `Bearer token` | Access token required via Authorization header, x-authtoken, x-token, query param, or cookie |
| `users_twofactorauth_create` | Required scope: users_twofactorauth_create |
