SOPHIA XT

Gate API

Put the gate in front of your own software.

Two calls. POST /api/v1/protect swaps client data for placeholders before text goes to an AI, a vendor or a log. POST /api/v1/restore puts the real values back into whatever comes back. The firm's industry template, names settings, topics and client list all apply, exactly as in the extension. The developer reference with a full JavaScript round trip is at desk.sophiaxt.com/docs/api; this page adds what an IT reviewer needs.

Keys

Protect

curl https://desk.sophiaxt.com/api/v1/protect \
  -H "Authorization: Bearer $SAFE_DESK_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Client Dana Reyes, SSN 123-45-6789, needs a letter."}'
{
  "outcome": "alerted",
  "protected_text": "Client [NAME_1], SSN [SSN_1], needs a letter.",
  "findings": [
    { "rule": "ssn",  "label": "Social Security number",   "action": "alert",  "kept": false },
    { "rule": "name", "label": "Person's name (detected)", "action": "redact", "kept": false }
  ],
  "vault": "v1...."
}
FieldMeaning
outcomeclean, redacted, alerted (the owner was notified) or blocked.
protected_textWhat to send onward; null when blocked. Passwords, keys and privileged material are always blocked. In strict mode the identifiers the template marks Stop are blocked, and everything else caught is removed rather than swapped.
findingsWhat was caught, by rule, never the value. kept is true for items the firm set to Flag: reported to the owner, left in the text as written.
vaultThe swap table, sealed with AES-256-GCM and bound to the account that owns the key. Nobody holding it can read or change it. Send it back with the next protect in the same conversation, so the same value keeps the same placeholder, and with restore.

Restore

curl https://desk.sophiaxt.com/api/v1/restore \
  -H "Authorization: Bearer $SAFE_DESK_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Letter for [NAME_1] ([SSN_1]).", "vault": "v1...."}'
{ "text": "Letter for Dana Reyes (123-45-6789)." }

Errors

Every error has the shape {"error": {"code": "...", "message": "..."}}.

StatusCodeMeaning
400bad_requestA required field is missing, or the body isn't valid JSON.
400bad_vaultA vault this key's account didn't issue, or one that was altered.
401unauthorizedMissing, wrong or revoked key.
402inactiveThe firm's subscription isn't active.
409strict_moderestore while the firm uses strict mode. Nothing is filled back in, whatever vault was kept from before the switch.
413too_largeText over 100,000 characters. It is refused, never cut short.
413too_many_valuesMore than 500 different client values in one vault. Start a new conversation without the old vault.
415unsupported_media_typeThe body wasn't sent as Content-Type: application/json.
429rate_limitedOver a limit below. Wait the number of seconds in Retry-After.

Limits

LimitValue
Requests per key600 a minute
Requests per network address, any key1,200 a minute
Text through the gate for the whole firm4,000,000 characters a minute, shared with the extension and the desk
Text per call100,000 characters
Different client values per vault500

Metering

The Gate API is included in the seat. protect and restore are not billed by use. The characters passing through are counted, at about four characters a token, for the admin panel only. The only thing billed by use in Safe-Desk is AI inside Safe-Desk's own chat.

What the API stores

Nothing you send. The text, the protected text and the values are never written to the database or the logs. The owner's log records that a call was made through the API, which account's key made it, the outcome and which rules fired. Alerts reach the owner the same way as from the extension. All traffic is HTTPS.