Skip to main content

API Documentation

Enterprise plan · REST API for programmatic access

Authentication

All authenticated endpoints require a session cookie (obtained via sign-in) or an API key in the Authorization header:

Authorization: Bearer tc_your_api_key_here

Base URL

https://threatcast.io

Endpoints

POST/api/ttx/generate

Generate a new exercise

Auth: Bearer token

Request body
{ "theme": "ransomware", "difficulty": "INTERMEDIATE", "questionCount": 12, "language": "en" }
GET/api/ttx/session/{id}

Get exercise session details

Auth: Bearer token

POST/api/ttx/session/{id}/answer

Submit an answer

Auth: Bearer token

Request body
{ "questionIndex": 0, "selectedOption": "B" }
GET/api/portal/sessions

List all exercises for your org

Auth: Bearer token

GET/api/portal/benchmarks

Get performance benchmarks

Auth: Bearer token

GET/api/portal/report?sessionId={id}

Generate executive report (HTML)

Auth: Bearer token

GET/api/portal/certificate?sessionId={id}

Generate completion certificate (HTML)

Auth: Bearer token

GET/api/threat-intel

Get threat intelligence events

Auth: None

POST/api/threat-intel

Trigger threat intel scan

Auth: Bearer token

POST/api/portal/invite

Send team invitations

Auth: Bearer token

Request body
{ "emails": ["user@company.com"] }
POST/api/auth/register

Register new user

Auth: None

Request body
{ "email": "...", "password": "...", "firstName": "...", "lastName": "..." }
GET/api/portal/ai-provider

Get BYOK AI provider config

Auth: Bearer token (Admin)

POST/api/portal/ai-provider

Save BYOK provider settings (Pro/Enterprise)

Auth: Bearer token (Admin)

Request body
{ "provider": "openai", "apiKey": "sk-...", "model": "gpt-4o", "enabled": true }
GET/api/portal/gdpr-export

Download all personal data (GDPR Article 15)

Auth: Bearer token

POST/api/portal/delete-account

Delete your account and all data (GDPR Article 17)

Auth: Bearer token

Request body
{ "confirmEmail": "user@company.com" }
GET/api/portal/daily-drill

Get today's adaptive daily drill

Auth: Bearer token

GET/api/portal/duels

List duels for your organisation

Auth: Bearer token

POST/api/portal/duels

Create a new duel challenge

Auth: Bearer token

Request body
{ "theme": "ransomware" }