API reference
Keys
/ v1/ orgs/ :orgId/ keysEvery key that protects the org's data, grouped by app on the page: Drive, secrets, connectors, integrations and the org's own keys (keys:read). With only keys:use, the org's own keys. Also the plan's limits and this month's operations.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Allowed
keys:read;keys:use
Path parameters
orgIdOrganization id (
org_…).
Errors
403Missing scope keys:read
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/keys' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 200
{
keys: {
uses30d: number
lastUsedAt: null | number
keyId: string
name: string
description: null | string
app: "keys" | "drive" | "health" | "vehicles" | "secrets" | "connectors" | "integrations" | "vehicles-tesla"
appLabel: string
protects: string
scope: {
kind: "org" | "project" | "person" | "environment" | "space" | "vehicle"
id: string
}
owner: "org" | "person"
algorithm: "aes-256-gcm" | "ed25519" | "ecdsa-p256" | "s3"
state: "disabled" | "enabled" | "destroyed"
currentVersion: number
managed: boolean
createdAt: number
rotatedAt: null | number
rotateEveryDays: null | number
nextRotationAt: null | number
destroyedAt: null | number
canRotate: boolean
}[]
limits: {
keysMax: number
keyOpsPerMonth: number
secretsMax: number
keyMonthlyPriceCents: number
keyOpsPer10kPriceCents: number
}
operationsThisMonth: number
}/ v1/ orgs/ :orgId/ keysMakes one of the org's own keys (keys:write).
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- keys:write
Path parameters
orgIdOrganization id (
org_…).
Request body
namestringrequired1–100 characters. Trimmed.
algorithm"aes-256-gcm" | "ed25519" | "ecdsa-p256"Default
"aes-256-gcm".descriptionstringUp to 500 characters.
scopeobjectscope.kind"org" | "project" | "environment"requiredscope.idstringrequired1–200 characters.
rotateEveryDaysinteger1–3650.
Errors
400An org key's scope is the org.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/keys' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"name": "Example"
}'Response 201
{
key: {
keyId: string
name: string
description: null | string
app: "keys" | "drive" | "health" | "vehicles" | "secrets" | "connectors" | "integrations" | "vehicles-tesla"
appLabel: string
protects: string
scope: {
kind: "org" | "project" | "person" | "environment" | "space" | "vehicle"
id: string
}
owner: "org" | "person"
algorithm: "aes-256-gcm" | "ed25519" | "ecdsa-p256" | "s3"
state: "disabled" | "enabled" | "destroyed"
currentVersion: number
managed: boolean
createdAt: number
rotatedAt: null | number
rotateEveryDays: null | number
nextRotationAt: null | number
destroyedAt: null | number
canRotate: boolean
}
}/ v1/ orgs/ :orgId/ keys/ :keyIdA key: versions still in use, created, rotated, last used, uses in the last 30 days, recent re-encryption jobs.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Allowed
keys:read;keys:use
Path parameters
orgIdOrganization id (
org_…).keyIdKey id (
key_…).
Errors
403Missing scope keys:read404Key not found
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/keys/{keyId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 200
{
key: {
keyId: string
name: string
description: null | string
app: "keys" | "drive" | "health" | "vehicles" | "secrets" | "connectors" | "integrations" | "vehicles-tesla"
appLabel: string
protects: string
scope: {
kind: "org" | "project" | "person" | "environment" | "space" | "vehicle"
id: string
}
owner: "org" | "person"
algorithm: "aes-256-gcm" | "ed25519" | "ecdsa-p256" | "s3"
state: "disabled" | "enabled" | "destroyed"
currentVersion: number
managed: boolean
createdAt: number
rotatedAt: null | number
rotateEveryDays: null | number
nextRotationAt: null | number
destroyedAt: null | number
canRotate: boolean
versions: {
version: number
createdAt: number
current: boolean
uses30d: number
adopted: boolean
}[]
uses30d: number
lastUsedAt: null | number
usage: {
day: string
uses: number
}[]
canReencrypt: boolean
jobs: {
error?: string
createdAt: number
kind: "reencrypt"
app: "keys" | "drive" | "health" | "vehicles" | "secrets" | "connectors" | "integrations" | "vehicles-tesla"
createdBy: string
keyId: string
total?: number
startedAt?: number
state: "queued" | "done" | "failed" | "running"
jobId: string
failed: number
seen: number
moved: number
finishedAt?: number
current: number
toVersion: number
}[]
}
}/ v1/ orgs/ :orgId/ keys/ :keyId/ auditWho or what used the key, how and when (the org's audit log for this key; keys:read).
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- keys:read
- Allowed
keys:read
Path parameters
orgIdOrganization id (
org_…).keyIdKey id (
key_…).
Query parameters
cursorstringUp to 4,096 characters.
actionstringMatches
^[a-z_]{1,32}(\.[a-z_]{1,32})?$.actorstring1–512 characters.
limitintegerDefault
50. 1–100. Coerced from a string.
Errors
400Invalid cursor404Key not found
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/keys/{keyId}/audit' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 200
{
events: {
eventId: string
orgId: string
action: string
actor: {
type: "user" | "key" | "device" | "system"
id: string
label?: string
}
target: {
type: string
id: string
label?: string
}
metadata?: {
[key: string]: unknown
}
ip?: string
userAgent?: string
createdAt: number
}[]
cursor: null | string
retentionDays?: number
}/ v1/ orgs/ :orgId/ keys/ :keyId/ rotateA new version for new data; older versions keep decrypting. reencrypt: also move existing data to it, in the background.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- keys:write
- Allowed
keys:read
Path parameters
orgIdOrganization id (
org_…).keyIdKey id (
key_…).
Request body
reencryptbooleanDefault
false.
Errors
404Key not found409This key seals Tesla's access tokens, and only the Vehicles functions can open it, so it can't be rotated from here yet.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/keys/{keyId}/rotate' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"reencrypt": false
}'Response 200
{
job?: {
error?: string
createdAt: number
kind: "reencrypt"
app: "keys" | "drive" | "health" | "vehicles" | "secrets" | "connectors" | "integrations" | "vehicles-tesla"
createdBy: string
keyId: string
total?: number
startedAt?: number
state: "queued" | "done" | "failed" | "running"
jobId: string
failed: number
seen: number
moved: number
finishedAt?: number
current: number
toVersion: number
}
key: {
keyId: string
name: string
description: null | string
app: "keys" | "drive" | "health" | "vehicles" | "secrets" | "connectors" | "integrations" | "vehicles-tesla"
appLabel: string
protects: string
scope: {
kind: "org" | "project" | "person" | "environment" | "space" | "vehicle"
id: string
}
owner: "org" | "person"
algorithm: "aes-256-gcm" | "ed25519" | "ecdsa-p256" | "s3"
state: "disabled" | "enabled" | "destroyed"
currentVersion: number
managed: boolean
createdAt: number
rotatedAt: null | number
rotateEveryDays: null | number
nextRotationAt: null | number
destroyedAt: null | number
canRotate: boolean
}
}/ v1/ orgs/ :orgId/ keys/ :keyId/ reencryptMoves existing data to the current version, in the background (where the app supports it).
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- keys:write
- Allowed
keys:read
Path parameters
orgIdOrganization id (
org_…).keyIdKey id (
key_…).
Errors
404Key not found409This key seals Tesla's access tokens, and only the Vehicles functions can open it, so it can't be rotated from here yet.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/keys/{keyId}/reencrypt' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 202
{
job: {
error?: string
createdAt: number
kind: "reencrypt"
app: "keys" | "drive" | "health" | "vehicles" | "secrets" | "connectors" | "integrations" | "vehicles-tesla"
createdBy: string
keyId: string
total?: number
startedAt?: number
state: "queued" | "done" | "failed" | "running"
jobId: string
failed: number
seen: number
moved: number
finishedAt?: number
current: number
toVersion: number
}
}/ v1/ orgs/ :orgId/ keys/ :keyId/ jobs/ :jobIdA re-encryption job's progress: state, seen, moved, current (already on the newest version), failed and total where known. Needs keys:read.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- keys:read
- Allowed
keys:read
Path parameters
orgIdOrganization id (
org_…).keyIdKey id (
key_…).jobIdJob id: an agent job (
job_…), underpipelinesa pipeline job (pjb_…), or undercrman import or export (cjb_…); undermarketinga list import (mkj_…).
Errors
404Key not found404Job not found
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/keys/{keyId}/jobs/{jobId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 200
{
job: {
error?: string
createdAt: number
kind: "reencrypt"
app: "keys" | "drive" | "health" | "vehicles" | "secrets" | "connectors" | "integrations" | "vehicles-tesla"
createdBy: string
keyId: string
total?: number
startedAt?: number
state: "queued" | "done" | "failed" | "running"
jobId: string
failed: number
seen: number
moved: number
finishedAt?: number
current: number
toVersion: number
}
}/ v1/ orgs/ :orgId/ keys/ :keyId/ scheduleRotates every rotateEveryDays days from now; null turns the schedule off.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- keys:write
- Allowed
keys:read
Path parameters
orgIdOrganization id (
org_…).keyIdKey id (
key_…).
Request body
rotateEveryDaysintegerrequiredor null1–3650.
Errors
404Key not found409This key seals Tesla's access tokens, and only the Vehicles functions can open it, so it can't be rotated from here yet.
curl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/keys/{keyId}/schedule' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"rotateEveryDays": 1
}'Response 200
{
key: {
keyId: string
name: string
description: null | string
app: "keys" | "drive" | "health" | "vehicles" | "secrets" | "connectors" | "integrations" | "vehicles-tesla"
appLabel: string
protects: string
scope: {
kind: "org" | "project" | "person" | "environment" | "space" | "vehicle"
id: string
}
owner: "org" | "person"
algorithm: "aes-256-gcm" | "ed25519" | "ecdsa-p256" | "s3"
state: "disabled" | "enabled" | "destroyed"
currentVersion: number
managed: boolean
createdAt: number
rotatedAt: null | number
rotateEveryDays: null | number
nextRotationAt: null | number
destroyedAt: null | number
canRotate: boolean
}
}/ v1/ orgs/ :orgId/ keys/ :keyId/ disableThe org's own keys only: nothing seals or opens with a disabled key until it's enabled again.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- keys:write
- Allowed
keys:read
Path parameters
orgIdOrganization id (
org_…).keyIdKey id (
key_…).
Errors
400Only your organization's own keys can be turned off.404Key not found
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/keys/{keyId}/disable' \
-H "Authorization: Bearer $CACTIVE_TOKEN"/ v1/ orgs/ :orgId/ keys/ :keyId/ enableTurns one of the organization's own keys back on after disable. Needs keys:write.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- keys:write
- Allowed
keys:read
Path parameters
orgIdOrganization id (
org_…).keyIdKey id (
key_…).
Errors
400Only your organization's own keys can be turned off.404Key not found
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/keys/{keyId}/enable' \
-H "Authorization: Bearer $CACTIVE_TOKEN"/ v1/ orgs/ :orgId/ keys/ :keyIdDestroys one of the org's own keys, which must be disabled first: nothing it encrypted can be decrypted again.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- keys:write
- Allowed
keys:read
Path parameters
orgIdOrganization id (
org_…).keyIdKey id (
key_…).
Errors
400Keys that protect the platform's data are destroyed with that data.404Key not found409Disable the key first.
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/keys/{keyId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 204 with no body
/ v1/ orgs/ :orgId/ keys/ :keyId/ encryptEncrypts up to 64 KB with an aes-256-gcm key. context: values the ciphertext is bound to; decrypting needs the same.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- keys:use
Path parameters
orgIdOrganization id (
org_…).keyIdKey id (
key_…).
Request body
plaintextstringrequiredencoding"utf8" | "base64"Default
"utf8".contextobjectKeys 1–128 characters. Values: string (up to 1,024 characters).
Errors
400Not base64.404Key not found413Up to 64 KB at a time.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/keys/{keyId}/encrypt' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"plaintext": "example"
}'Response 200
{
ciphertext: string
keyId: string
version: number
}/ v1/ orgs/ :orgId/ keys/ :keyId/ decryptDecrypts a ciphertext (k1.…) made with this key, with the context it was encrypted with, as text (encoding: "utf8", the default) or base64. Any version of the key opens what it sealed. Counts towards the plan's monthly operations and is an audit event. Needs keys:use.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- keys:use
Path parameters
orgIdOrganization id (
org_…).keyIdKey id (
key_…).
Request body
ciphertextstringrequired1–200,000 characters.
encoding"utf8" | "base64"Default
"utf8".contextobjectKeys 1–128 characters. Values: string (up to 1,024 characters).
Errors
404Key not found
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/keys/{keyId}/decrypt' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"ciphertext": "example"
}'Response 200
{
plaintext: string
keyId: string
version: number
}/ v1/ orgs/ :orgId/ keys/ :keyId/ rewrapThe same ciphertext under the key's current version, without the plaintext leaving the service.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- keys:use
Path parameters
orgIdOrganization id (
org_…).keyIdKey id (
key_…).
Request body
ciphertextstringrequired1–200,000 characters.
contextobjectKeys 1–128 characters. Values: string (up to 1,024 characters).
Errors
400This ciphertext was made with another key.404Key not found
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/keys/{keyId}/rewrap' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"ciphertext": "example"
}'Response 200
{
ciphertext: string
keyId: string
version: number
}/ v1/ orgs/ :orgId/ keys/ :keyId/ signSigns up to 64 KB with an ed25519 or ecdsa-p256 key (ECDSA signs the message's SHA-256).
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- keys:use
Path parameters
orgIdOrganization id (
org_…).keyIdKey id (
key_…).
Request body
messagestringrequiredencoding"utf8" | "base64"Default
"utf8".
Errors
400Not base64.404Key not found413Up to 64 KB at a time.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/keys/{keyId}/sign' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"message": "example"
}'Response 200
{
signature: string
keyId: string
version: number
}/ v1/ orgs/ :orgId/ keys/ :keyId/ verifyChecks a signature (k1s.…) from sign against message: { valid }. Counts towards the plan's monthly operations. Needs keys:use.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- keys:use
Path parameters
orgIdOrganization id (
org_…).keyIdKey id (
key_…).
Request body
messagestringrequiredsignaturestringrequired1–2,000 characters.
encoding"utf8" | "base64"Default
"utf8".
Errors
400Not base64.404Key not found
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/keys/{keyId}/verify' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"message": "example",
"signature": "example"
}'Response 200
{
valid: boolean
keyId: string
version: number
}/ v1/ me/ keysYour personal keys (Health, your own Drive and Photos space) with uses in the last 30 days and when last used. Never key material. Only you see them: people only, not API keys or connected apps.
- Auth
- A person's token or an API key, as Authorization: Bearer.
Errors
403Only you can see your personal keys.
curl 'https://api.cactive.com.au/v1/me/keys' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 200
{
keys: {
uses30d: number
lastUsedAt: null | number
keyId: string
name: string
description: null | string
app: "keys" | "drive" | "health" | "vehicles" | "secrets" | "connectors" | "integrations" | "vehicles-tesla"
appLabel: string
protects: string
scope: {
kind: "org" | "project" | "person" | "environment" | "space" | "vehicle"
id: string
}
owner: "org" | "person"
algorithm: "aes-256-gcm" | "ed25519" | "ecdsa-p256" | "s3"
state: "disabled" | "enabled" | "destroyed"
currentVersion: number
managed: boolean
createdAt: number
rotatedAt: null | number
rotateEveryDays: null | number
nextRotationAt: null | number
destroyedAt: null | number
canRotate: boolean
}[]
}/ v1/ me/ keys/ :keyIdOne of your personal keys: versions still in use, created, last rotated, last used, uses in the last 30 days.
- Auth
- A person's token or an API key, as Authorization: Bearer.
Path parameters
keyIdKey id (
key_…).
Errors
403Only you can see your personal keys.404Key not found
curl 'https://api.cactive.com.au/v1/me/keys/{keyId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 200
{
key: {
keyId: string
name: string
description: null | string
app: "keys" | "drive" | "health" | "vehicles" | "secrets" | "connectors" | "integrations" | "vehicles-tesla"
appLabel: string
protects: string
scope: {
kind: "org" | "project" | "person" | "environment" | "space" | "vehicle"
id: string
}
owner: "org" | "person"
algorithm: "aes-256-gcm" | "ed25519" | "ecdsa-p256" | "s3"
state: "disabled" | "enabled" | "destroyed"
currentVersion: number
managed: boolean
createdAt: number
rotatedAt: null | number
rotateEveryDays: null | number
nextRotationAt: null | number
destroyedAt: null | number
canRotate: boolean
versions: {
version: number
createdAt: number
current: boolean
uses30d: number
adopted: boolean
}[]
uses30d: number
lastUsedAt: null | number
usage: {
day: string
uses: number
}[]
canReencrypt: boolean
jobs: {
error?: string
createdAt: number
kind: "reencrypt"
app: "keys" | "drive" | "health" | "vehicles" | "secrets" | "connectors" | "integrations" | "vehicles-tesla"
createdBy: string
keyId: string
total?: number
startedAt?: number
state: "queued" | "done" | "failed" | "running"
jobId: string
failed: number
seen: number
moved: number
finishedAt?: number
current: number
toVersion: number
}[]
}
}/ v1/ me/ keys/ :keyId/ auditYour key's uses, from your own audit log (nobody else's log has them).
- Auth
- A person's token or an API key, as Authorization: Bearer.
Path parameters
keyIdKey id (
key_…).
Query parameters
cursorstringUp to 4,096 characters.
actionstringMatches
^[a-z_]{1,32}(\.[a-z_]{1,32})?$.actorstring1–512 characters.
limitintegerDefault
50. 1–100. Coerced from a string.
Errors
400Invalid cursor403Only you can see your personal keys.404Key not found
curl 'https://api.cactive.com.au/v1/me/keys/{keyId}/audit' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 200
{
events: {
eventId: string
orgId: string
action: string
actor: {
type: "user" | "key" | "device" | "system"
id: string
label?: string
}
target: {
type: string
id: string
label?: string
}
metadata?: {
[key: string]: unknown
}
ip?: string
userAgent?: string
createdAt: number
}[]
cursor: null | string
retentionDays?: number
}