iblai-api-agent-privacy
Mirrored from
iblai/vibe·skills/agents/iblai-api-agent-privacy/SKILL.md. This page is generated — edit it in the repository, not here.
Configure an agent's Privacy Router via the API: enable PII detection, pick the
allow / redact / mask / block action and the entity types to watch, set the response
returned when PII is caught, and toggle output filtering — all saved through the
single settings/ endpoint — plus review the organization’s read-only PII/PHI
detection audit log (privacy-flags). Use when controlling how the agent handles
personal data or auditing what sensitive data flowed through the agents. The UI
twin is /iblai-vibe-agent-privacy.
Auth & conventions
- Base URL:
https://api.iblai.app - Header:
Authorization: Api-Token $IBLAI_API_KEYon every request. - Path vars:
{org}=$IBLAI_ORG,{username}=$IBLAI_USERNAME,{mentor}= the agent's unique id (e.g.d17dc729-60fd-4363-81a0-f67d9318b03e). - Settings writes go through one endpoint —
PUT
…/users/{username}/mentors/{mentor}/settings/— sending only the changed field(s). It accepts JSON,multipart/form-dataand form-encoded bodies; prefer JSON, which keepsprivacy_entitiesa plain array (the Privacy tab sends JSON). - Not connected yet? Run
/iblai-api-loginfirst to populateIBLAI_ORG,IBLAI_USERNAME, andIBLAI_API_KEY.
Reads
- GET
https://api.iblai.app/dm/api/ai-mentor/orgs/{org}/users/{username}/mentors/{mentor}/settings/— load the current privacy fields. - GET
https://api.iblai.app/dm/api/ai-mentor/orgs/{org}/users/{username}/mentors/{mentor}/public-settings/— privacy-router state for anonymous (unauthenticated) requests. - GET
https://api.iblai.app/dm/api/ai-mentor/orgs/{org}/users/{username}/privacy-flags/?mentor={mentor}&rail={pii|phi}&action_taken={redact|mask|block|allow}&source={text_prompt|file_text|file_image|file_pdf|llm_response|memory_retrieval}&session_id={id}&username={u}&start_time={iso}&end_time={iso}&search={q}&ordering={field}&page={n}&page_size={n}— list every PII/PHI detection recorded across the organization (read-only audit log). Each row reports therailthat fired (pii/phi), theaction_taken, thesource, anddetected_entities— the entity types only (e.g.["EMAIL_ADDRESS", "US_SSN"]), never the raw detected values. File-sourced rows also carryfile_name,file_content_type,file_size, andfile_reference. The actor is named byusername,email, anduser_full_name(all three arenullfor a since-deleted user, since identity resolves through the user relation).searchmatchesusername,session_id, andfile_name. - GET
https://api.iblai.app/dm/api/ai-mentor/orgs/{org}/users/{username}/privacy-flags/{id}/— retrieve a single detection.
Writes
- PUT
…/mentors/{mentor}/settings/— update privacy fields (send only changed keys):{ "enable_privacy_router": "boolean", "privacy_action": "allow|redact|mask|block", "privacy_entities": "string[] (PERSON, EMAIL_ADDRESS, US_SSN, …)", "privacy_response": "string", "enable_privacy_output_filter": "boolean", "disable_chathistory": "boolean (Incognito policy: Always Incognito)", "disable_privacy_mode": "boolean (Incognito policy: Never Incognito)" }
Example
Enable the Privacy Router to redact names, emails, and SSNs, with a custom response and output filtering on (only the changed fields are sent):
curl -X PUT \
"https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mentors/$MENTOR/settings/" \
-H "Authorization: Api-Token $IBLAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enable_privacy_router": true,
"privacy_action": "redact",
"privacy_entities": ["PERSON", "EMAIL_ADDRESS", "US_SSN"],
"privacy_response": "Please remove personal information and try again.",
"enable_privacy_output_filter": true
}'
Notes
- A field left out of the PUT is left unchanged — never resend the whole object.
privacy_actionis one ofallow,redact,mask, orblock(defaultredact);blockstops the turn and returnsprivacy_response,redact/maskrewrite the detected PII, andallowleaves the message as is (detections are still recorded inprivacy-flags).- The two Incognito flags are the agent tier of chat privacy:
disable_chathistorymakes every conversation incognito (nothing saved to history or memory, for anyone);disable_privacy_modetakes Incognito away from users of this agent (a user whose default is Incognito is saved anonymized instead). Set at most one: with both true the backend checksdisable_chathistoryfirst and behaves as Always Incognito (chat-privacy-effective/?mentor=answersmode: disabled,source: mentor; no history is written), while the agent's Privacy tab shows the record as Never Incognito. The organization gate, the user default and the per-session flip are in/iblai-vibe-incognito. privacy_entitiesis a list of detector names:PERSON,EMAIL_ADDRESS,PHONE_NUMBER,US_SSN,CREDIT_CARD,LOCATION,DATE_TIME,US_PASSPORT,US_DRIVER_LICENSE,IP_ADDRESS,IBAN_CODE,MEDICAL_LICENSE,US_BANK_NUMBER. An empty list uses the defaults. Inmultipart/form-data, repeat the key per entity.enable_privacy_output_filterapplies the same detection to the agent's output, not just the user's input.- Use the
public-settings/read to confirm the state applied to anonymous (unauthenticated) requests. privacy-flags/is a read-only audit log — there are no write/delete verbs. A row is recorded at every detection point (text-prompt input, LLM response output, uploaded files, and memory retrieval), so it captures more than just the input rail.raildistinguishes PII (pii) from PHI (phi) detections.- Privacy flags store entity types only, so a detection is still audited even
on a private turn where the raw prompt is withheld —
detected_entitiesnever contains the personal data itself. - Verified against the live schema (4.411.0) and a live round-trip of every field on 2026-10-02.