CitadelSuite

Docs · CitadelGate

API reference

These endpoints are live on gate.citadelframe.com for signed-in users with the right role. Requests are scoped to the client organisation in your session token, and every write is audited.

Authentication

Use the bearer token from your CitadelGate session. Admin and Owner accounts must have completed MFA. Provider staff working in a client workspace use the client-scoped session token.

AI investigations

Start an investigation

POST /api/ai/investigations
{ "prompt": "Accounts can't print since this morning", "ticketId": "<optional ticket id>", "deviceId": "<optional device id>" }

Roles: Technician, Admin, Owner. Prompt length 1 to 4,000 characters. Returns 202 Accepted with the investigation. If ticketId is set and deviceId isn't, the ticket's device is used. At most 5 investigations can be queued or running per client at a time (429 beyond that).

Get an investigation

GET /api/ai/investigations/{id}

Fields include status (Queued, Running, Completed, Unavailable, Failed), report (Markdown), proposedActions, toolCalls, model, token counts and timestamps.

List investigations

GET /api/ai/investigations?ticketId={optional}

The 50 most recent for the client, newest first.

Script library

CallPurposeRoles
POST /api/scriptsCreate a draft script (fields: name, language, content, platform, riskLevel, aiDescription, parameters, category, tags)Technician, Admin, Owner
PUT /api/scripts/{id}Edit; resets approval to DraftTechnician, Admin, Owner
POST /api/script-library/{id}/submit-for-reviewSubmit a draft for reviewTechnician, Admin, Owner
POST /api/script-library/{id}/approveApprove, with optional {"notes": "...", "riskLevel": "Low"}; records the content fingerprintAdmin, Owner (not the author)
POST /api/script-library/{id}/rejectReject with notesAdmin, Owner
GET /api/script-library/pending-reviewsScripts waiting for reviewSigned-in staff
GET /api/script-librarySearch and filter the librarySigned-in staff

Errors

400 invalid input · 401 not signed in · 403 role or MFA requirement not met · 404 not found in your organisation · 429 too many requests.