Activate MFA key

Activates a pending MFA key for the authenticated user. After you [create an MFA key](/developers/api/authentication/post-mfa), the key has status `Activation Pending`. To complete setup, call this endpoint with the MFA key ID and a valid 6-digit time-based one-time password (TOTP) generated from the `secret_key` or `otpauth` URI returned during creation. Once activated, the MFA key status changes to `Active`, and MFA is enforced on subsequent logins with [user credentials](/developers/auth/user-credentials). For more information, see [Multi-factor authentication](/developers/auth/multi-factor-authentication).

Authentication

AuthorizationBearer

An auth_token should be provided to authenticate a session.

To obtain an auth_token, see the /api/v1/authenticate POST request.

Path parameters

key_idintegerRequired

The unique identifier of the MFA key to activate. This ID is returned when you create the MFA key.

Request

This endpoint expects an object.
statusobjectRequired
The target status for the MFA key.
codestringRequired=6 characters

The 6-digit TOTP code generated by your authenticator app using the secret_key or otpauth URI from the MFA key creation response.

This code changes every 30 seconds.

Response

MFA key activated successfully. No content returned.

Errors