API reference

Browser sync

Cactive Browser's end-to-end encrypted sync of bookmarks, history and settings: the account and its sealed keyset, browsers, requests to add one, and ciphertext records. Every change is signed by the account's sync key.
GET/v1/me/browser-sync

Your sync account (ids, the signing public key, the keyset sealed under your recovery key, a pending reset), the limits and the server's time; account: null when sync is off.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Errors

  • 403Sync is for Cactive Browser's own sign-in.
curl 'https://api.cactive.com.au/v1/me/browser-sync' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  account: null | {
    accountId: string
    keysetId: string
    signingPublicKey: string
    recoveryKeyset: string
    records: number
    resetRequestedAt?: number
    resetAt?: number
    createdAt: number
  }
  limits: {
    historyDays: number
    maxRecords: number
  }
  serverTime: number
}
POST/v1/me/browser-sync

Turns sync on: the account and this browser, signed by the new sync key. 409 when it's on already.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Errors

  • 403Sync is for Cactive Browser's own sign-in.
curl -X POST 'https://api.cactive.com.au/v1/me/browser-sync' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 201

{
  account: {
    accountId: string
    keysetId: string
    signingPublicKey: string
    recoveryKeyset: string
    records: number
    resetRequestedAt?: number
    resetAt?: number
    createdAt: number
  }
  device: {
    deviceId: string
    name: string
    platform: "windows" | "macos" | "linux"
    createdAt: number
    lastSeenAt: number
    removedAt?: number
  }
}
POST/v1/me/browser-sync/purge

Deletes up to 1,000 of your sync rows a call, the account last (done when nothing is left). Signed by a synced browser, or, 7 days after a reset was asked for, from the session alone.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Errors

  • 403Sync is for Cactive Browser's own sign-in.
curl -X POST 'https://api.cactive.com.au/v1/me/browser-sync/purge' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  done: boolean
  deleted: number
}
POST/v1/me/browser-sync/reset

Asks for a reset when no browser and no recovery key can open sync any more; a purge may follow after 7 days.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Errors

  • 403Sync is for Cactive Browser's own sign-in.
curl -X POST 'https://api.cactive.com.au/v1/me/browser-sync/reset' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  resetRequestedAt: number
  resetAt: number
}
DELETE/v1/me/browser-sync/reset

Cancels a reset (signed by a synced browser).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Errors

  • 403Sync is for Cactive Browser's own sign-in.
curl -X DELETE 'https://api.cactive.com.au/v1/me/browser-sync/reset' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  ok: true
}
GET/v1/me/browser-sync/devices

The browsers set up for sync, removed ones included.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Errors

  • 403Sync is for Cactive Browser's own sign-in.
curl 'https://api.cactive.com.au/v1/me/browser-sync/devices' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  devices: {
    deviceId: string
    name: string
    platform: "windows" | "macos" | "linux"
    createdAt: number
    lastSeenAt: number
    removedAt?: number
  }[]
}
PUT/v1/me/browser-sync/devices/:deviceId

Registers (or renames) the signing browser itself.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • deviceId

    Device id: an agent's (dev_…); under /v1/me/notifications a phone's install id; under /v1/me/sign-in-approvals a phone that approves sign-ins (apd_…); under /v1/me/vault the id a device made for its vault, and under /v1/me/browser-sync the id a browser made for sync (22 base64url characters).

Errors

  • 403Sync is for Cactive Browser's own sign-in.
curl -X PUT 'https://api.cactive.com.au/v1/me/browser-sync/devices/{deviceId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  device: {
    deviceId: string
    name: string
    platform: "windows" | "macos" | "linux"
    createdAt: number
    lastSeenAt: number
    removedAt?: number
  }
}
DELETE/v1/me/browser-sync/devices/:deviceId

Removes a browser from sync (signed): its changes are refused from then on.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • deviceId

    Device id: an agent's (dev_…); under /v1/me/notifications a phone's install id; under /v1/me/sign-in-approvals a phone that approves sign-ins (apd_…); under /v1/me/vault the id a device made for its vault, and under /v1/me/browser-sync the id a browser made for sync (22 base64url characters).

Errors

  • 403Sync is for Cactive Browser's own sign-in.
curl -X DELETE 'https://api.cactive.com.au/v1/me/browser-sync/devices/{deviceId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  ok: true
}
GET/v1/me/browser-sync/pairings

Requests to add a browser that are waiting for an answer.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Errors

  • 403Sync is for Cactive Browser's own sign-in.
curl 'https://api.cactive.com.au/v1/me/browser-sync/pairings' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  pairings: {
    pairingId: string
    publicKey: string
    name: string
    platform: "windows" | "macos" | "linux"
    createdAt: number
    expiresAt: number
    approval?: {
      publicKey: string
      sealed: string
      deviceId: string
      at: number
    }
  }[]
}
POST/v1/me/browser-sync/pairings

Asks to add this browser: its one-off public key, name and platform (expires in 10 minutes).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Errors

  • 403Sync is for Cactive Browser's own sign-in.
curl -X POST 'https://api.cactive.com.au/v1/me/browser-sync/pairings' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 201

{
  pairing: {
    pairingId: string
    publicKey: string
    name: string
    platform: "windows" | "macos" | "linux"
    createdAt: number
    expiresAt: number
    approval?: {
      publicKey: string
      sealed: string
      deviceId: string
      at: number
    }
  }
}
GET/v1/me/browser-sync/pairings/:pairingId

A request and, once a synced browser answered, its answer.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • pairingId

    A request to add a browser to sync: 22 base64url characters, made by the browser asking.

Errors

  • 403Sync is for Cactive Browser's own sign-in.
curl 'https://api.cactive.com.au/v1/me/browser-sync/pairings/{pairingId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  pairing: {
    pairingId: string
    publicKey: string
    name: string
    platform: "windows" | "macos" | "linux"
    createdAt: number
    expiresAt: number
    approval?: {
      publicKey: string
      sealed: string
      deviceId: string
      at: number
    }
  }
}
DELETE/v1/me/browser-sync/pairings/:pairingId

Withdraws a request.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • pairingId

    A request to add a browser to sync: 22 base64url characters, made by the browser asking.

Errors

  • 403Sync is for Cactive Browser's own sign-in.
curl -X DELETE 'https://api.cactive.com.au/v1/me/browser-sync/pairings/{pairingId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  ok: true
}
POST/v1/me/browser-sync/pairings/:pairingId/approval

A synced browser's answer (signed): its one-off public key and the sealed keyset. Once, before the request expires.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • pairingId

    A request to add a browser to sync: 22 base64url characters, made by the browser asking.

Errors

  • 403Sync is for Cactive Browser's own sign-in.
curl -X POST 'https://api.cactive.com.au/v1/me/browser-sync/pairings/{pairingId}/approval' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  pairing: {
    pairingId: string
    publicKey: string
    name: string
    platform: "windows" | "macos" | "linux"
    createdAt: number
    expiresAt: number
    approval?: {
      publicKey: string
      sealed: string
      deviceId: string
      at: number
    }
  }
}
POST/v1/me/browser-sync/records

Up to 100 changes (signed), each at the version it replaces: ok, conflict with the current record, or refused.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Errors

  • 403Sync is for Cactive Browser's own sign-in.
curl -X POST 'https://api.cactive.com.au/v1/me/browser-sync/records' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  results: {
    recordId: string
    collection: "history" | "settings" | "bookmarks"
    status: "ok"
    version: number
    ts: number
  } | {
    recordId: string
    collection: "history" | "settings" | "bookmarks"
    status: "conflict"
    record: null | {
      collection: "history" | "settings" | "bookmarks"
      recordId: string
      version: number
      deleted: boolean
      data: string
      ts: number
    }
  } | {
    recordId: string
    collection: "history" | "settings" | "bookmarks"
    status: "refused"
    code: "limit"
  }[]
  serverTime: number
}
GET/v1/me/browser-sync/records

A collection's records written since since (ms, less 5 minutes), oldest first, 500 a page (page continues).

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Query parameters

  • collectionstring
  • sincestring
  • pagestring

Errors

  • 403Sync is for Cactive Browser's own sign-in.
curl 'https://api.cactive.com.au/v1/me/browser-sync/records' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  records: {
    collection: "history" | "settings" | "bookmarks"
    recordId: string
    version: number
    deleted: boolean
    data: string
    ts: number
  }[]
  next?: string
  serverTime: number
}