Finish sign-in on the chosen account
curl --request POST \
--url https://api.quiva.ai/accounts/auth-select-account \
--header 'Content-Type: application/json' \
--data '
{
"token": "select_token_abcdef1234567890",
"account_id": "acct_12345"
}
'import requests
url = "https://api.quiva.ai/accounts/auth-select-account"
payload = {
"token": "select_token_abcdef1234567890",
"account_id": "acct_12345"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({token: 'select_token_abcdef1234567890', account_id: 'acct_12345'})
};
fetch('https://api.quiva.ai/accounts/auth-select-account', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.quiva.ai/accounts/auth-select-account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'token' => 'select_token_abcdef1234567890',
'account_id' => 'acct_12345'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.quiva.ai/accounts/auth-select-account"
payload := strings.NewReader("{\n \"token\": \"select_token_abcdef1234567890\",\n \"account_id\": \"acct_12345\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.quiva.ai/accounts/auth-select-account")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"select_token_abcdef1234567890\",\n \"account_id\": \"acct_12345\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quiva.ai/accounts/auth-select-account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"select_token_abcdef1234567890\",\n \"account_id\": \"acct_12345\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"refresh_token": "<string>",
"auth_token": "<string>",
"passkey_enabled": true,
"totp_enabled": true,
"first_sign_in": true,
"account": {
"name": "<string>",
"id": "<string>",
"display_name": "<string>",
"root_email": "jsmith@example.com",
"subscription_status": "active",
"subscription_plan": "<string>",
"emergency_credit": 123,
"country": "<string>",
"company_name": "<string>",
"address": "<string>",
"website": "<string>",
"phone_number": "<string>",
"scheduled_for_deletion": true,
"deletion_date": "2023-11-07T05:31:56Z",
"region": "<string>",
"provider": "<string>",
"bstier": 123,
"cloud": true,
"hub": true
},
"user": "jsmith@example.com",
"user_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"role": "<string>",
"mfa": {
"passkey_enabled": true,
"totp_enabled": true
},
"theme": "<string>",
"sound": true,
"advanced_mode": true,
"voice_transcription": true,
"onboarding_progress": {},
"timezone": "<string>",
"notification_preferences": {},
"folder": "<string>",
"device_token": "<string>"
}
}{
"error": "<string>"
}Authentication
Finish sign-in on the chosen account
Public. Completes an email-only sign-in that returned select_account. The token is single-use and every refusal is the same 401, so a token cannot be used to probe memberships. The response is AuthResponse, or MfaRequiredResponse when the account’s user has TOTP on and the device is not remembered.
POST
/
accounts
/
auth-select-account
Finish sign-in on the chosen account
curl --request POST \
--url https://api.quiva.ai/accounts/auth-select-account \
--header 'Content-Type: application/json' \
--data '
{
"token": "select_token_abcdef1234567890",
"account_id": "acct_12345"
}
'import requests
url = "https://api.quiva.ai/accounts/auth-select-account"
payload = {
"token": "select_token_abcdef1234567890",
"account_id": "acct_12345"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({token: 'select_token_abcdef1234567890', account_id: 'acct_12345'})
};
fetch('https://api.quiva.ai/accounts/auth-select-account', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.quiva.ai/accounts/auth-select-account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'token' => 'select_token_abcdef1234567890',
'account_id' => 'acct_12345'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.quiva.ai/accounts/auth-select-account"
payload := strings.NewReader("{\n \"token\": \"select_token_abcdef1234567890\",\n \"account_id\": \"acct_12345\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.quiva.ai/accounts/auth-select-account")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"select_token_abcdef1234567890\",\n \"account_id\": \"acct_12345\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quiva.ai/accounts/auth-select-account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"select_token_abcdef1234567890\",\n \"account_id\": \"acct_12345\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"refresh_token": "<string>",
"auth_token": "<string>",
"passkey_enabled": true,
"totp_enabled": true,
"first_sign_in": true,
"account": {
"name": "<string>",
"id": "<string>",
"display_name": "<string>",
"root_email": "jsmith@example.com",
"subscription_status": "active",
"subscription_plan": "<string>",
"emergency_credit": 123,
"country": "<string>",
"company_name": "<string>",
"address": "<string>",
"website": "<string>",
"phone_number": "<string>",
"scheduled_for_deletion": true,
"deletion_date": "2023-11-07T05:31:56Z",
"region": "<string>",
"provider": "<string>",
"bstier": 123,
"cloud": true,
"hub": true
},
"user": "jsmith@example.com",
"user_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"role": "<string>",
"mfa": {
"passkey_enabled": true,
"totp_enabled": true
},
"theme": "<string>",
"sound": true,
"advanced_mode": true,
"voice_transcription": true,
"onboarding_progress": {},
"timezone": "<string>",
"notification_preferences": {},
"folder": "<string>",
"device_token": "<string>"
}
}{
"error": "<string>"
}Body
application/json