Complete 2FA login (partition-scoped)
POST
/v1/pt/{ptid}/login/2fa
const url = 'https://example.com/v1/pt/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/login/2fa';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"challenge_id":"example","code":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/pt/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/login/2fa \ --header 'Content-Type: application/json' \ --data '{ "challenge_id": "example", "code": "example" }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”ptid
required
string format: uuid
Partition UUID
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
challenge_id
required
The challenge_id from the password-login response.
string
code
required
A 6-digit TOTP code or a recovery code (TOTP is tried first).
string
Examplegenerated
{ "challenge_id": "example", "code": "example"}Responses
Section titled “Responses”Full token issued
Media typeapplication/json
Returned by the API-key login and the 2FA-exchange step with a full token, and by password login (no TOTP enrolled) with a bootstrap token.
object
success
required
boolean
token
required
The JWT to send as Authorization: Bearer <jwt>.
string
type
required
full grants every endpoint the user is authorized for; bootstrap only opens the TOTP-enrollment endpoints.
string
Example
{ "type": "full"}default
Section titled “default”Error response
Media typeapplication/problem+json
RFC 7807 Problem Details
object
type
Problem type slug URI
string
title
string
status
integer
detail
string
key
additional properties
any
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}