API reference
Sign-in approvals
/ v1/ me/ sign-in-approvals/ settingsSign-in approvals for your account: on, pausedUntil (epoch ms, while requests are paused after denials), the phones that approve (devices: name, model, system, where the key lives, when added and last used; never keys) and twoStep (whether the account has a code to fall back to; requests need one). From the Authenticator app's sign-in only.
- Auth
- A person's token or an API key, as Authorization: Bearer.
Errors
403Sign-in approvals open only in the Authenticator app.
curl 'https://api.cactive.com.au/v1/me/sign-in-approvals/settings' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 200
{
twoStep: boolean
on: boolean
pausedUntil?: number
devices: {
deviceId: string
name: string
model?: string
os?: string
keyStorage: "secure-enclave" | "keychain" | "keystore"
createdAt: number
lastUsedAt?: number
}[]
}/ v1/ me/ sign-in-approvals/ requestsSign-in requests waiting for an answer, newest first: what's signing in (app), from which browser (device), roughly where (place), createdAt and expiresAt. No numbers. What the app shows when it opens, for a notification that never arrived.
- Auth
- A person's token or an API key, as Authorization: Bearer.
Errors
403Sign-in approvals open only in the Authenticator app.
curl 'https://api.cactive.com.au/v1/me/sign-in-approvals/requests' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 200
{
requests: {
approvalId: string
app: string
device?: string
place?: string
createdAt: number
expiresAt: number
}[]
}/ v1/ me/ sign-in-approvals/ requests/ :approvalIdOne waiting request with the three numbers to show (choices), the account (userId, email) and the binding the answer is signed with; 404 once answered, withdrawn or expired.
- Auth
- A person's token or an API key, as Authorization: Bearer.
Path parameters
approvalIdApproval id (
apr_…): an issue's, from itsapprovals; under/v1/me/sign-in-approvalsa sign-in request.
Errors
403Sign-in approvals open only in the Authenticator app.404This request was answered or has expired.
curl 'https://api.cactive.com.au/v1/me/sign-in-approvals/requests/{approvalId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 200
{
request: {
approvalId: string
app: string
device?: string
place?: string
createdAt: number
expiresAt: number
userId: string
email: string
choices: number[]
binding: string
}
}/ v1/ me/ sign-in-approvals/ requests/ :approvalIdAnswers a request from this phone (deviceId): decision approve with the number tapped, or deny, with signature (see above). The right number approves; another number or deny denies (reason wrong_number or not_me, and paused when requests are now paused for an hour). 403 when the signature doesn't verify or the phone was removed, 409 when already answered or expired, 429 past 20 answers in 15 minutes.
- Auth
- A person's token or an API key, as Authorization: Bearer.
Path parameters
approvalIdApproval id (
apr_…): an issue's, from itsapprovals; under/v1/me/sign-in-approvalsa sign-in request.
Request body (up to 4 KB)
deviceIdstringrequiredUp to 64 characters.
decision"approve" | "deny"requirednumberinteger10–99.
signaturestringrequired8–200 characters.
Also checked: Unknown fields are rejected.
Errors
403Sign-in approvals open only in the Authenticator app.
curl -X POST 'https://api.cactive.com.au/v1/me/sign-in-approvals/requests/{approvalId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"deviceId": "<deviceId>",
"decision": "approve",
"signature": "example"
}'Response 200
{
status: string
reason?: "not_me" | "wrong_number"
paused?: boolean
}/ v1/ me/ sign-in-approvals/ devicesEnrols this phone's key: publicKey, keyStorage (secure-enclave, keychain or keystore), name, optional model, os, appVersion, installId, timeZone, with signedAt and the key's signature over the enrolment message. 201 with the device (200 for a key already enrolled); the same phone's older key is replaced; up to 10 phones. 403 with code: "reauth" until the app's sign-in is recent and two-step or a passkey. Turns approvals on.
- Auth
- A person's token or an API key, as Authorization: Bearer.
Request body (up to 4 KB)
publicKeystringrequiredUp to 100 characters.
keyStorage"secure-enclave" | "keychain" | "keystore"requirednamestringrequiredUp to 200 characters.
modelstringUp to 200 characters.
osstringUp to 100 characters.
appVersionstringUp to 100 characters.
installIdstringUp to 128 characters.
timeZonestringUp to 64 characters.
signedAtintegerrequiredsignaturestringrequired8–200 characters.
Also checked: Unknown fields are rejected.
Errors
403Sign-in approvals open only in the Authenticator app.
curl -X POST 'https://api.cactive.com.au/v1/me/sign-in-approvals/devices' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"publicKey": "example",
"keyStorage": "secure-enclave",
"name": "Example",
"signedAt": 1,
"signature": "example"
}'/ v1/ me/ sign-in-approvals/ devices/ :deviceIdRemoves a phone: it gets no more requests and its answers are refused.
- Auth
- A person's token or an API key, as Authorization: Bearer.
Path parameters
deviceIdDevice id: an agent's (
dev_…); under/v1/me/notificationsa phone's install id; under/v1/me/sign-in-approvalsa phone that approves sign-ins (apd_…); under/v1/me/vaultthe id a device made for its vault (22 base64url characters).
Errors
403Sign-in approvals open only in the Authenticator app.
curl -X DELETE 'https://api.cactive.com.au/v1/me/sign-in-approvals/devices/{deviceId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 204 with no body
/ v1/ me/ sign-in-approvals/ secureSigns your account out everywhere but this app, after this phone answered a request with No (approvalId, within 30 minutes): every browser session at ID with the web apps' sign-ins from them, every other phone app and every command-line sign-in. Signed with the phone's key (deviceId, signedAt, signature). Returns how many browsers, apps and commandLine sign-ins ended.
- Auth
- A person's token or an API key, as Authorization: Bearer.
Request body (up to 4 KB)
deviceIdstringrequiredUp to 64 characters.
approvalIdstringrequiredUp to 64 characters.
signedAtintegerrequiredsignaturestringrequired8–200 characters.
Also checked: Unknown fields are rejected.
Errors
403Sign-in approvals open only in the Authenticator app.
curl -X POST 'https://api.cactive.com.au/v1/me/sign-in-approvals/secure' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"deviceId": "<deviceId>",
"approvalId": "<approvalId>",
"signedAt": 1,
"signature": "example"
}'Response 200
{
browsers: number
apps: number
commandLine: number
}