OpenAI is partnering with Hacktron to find vulnerabilities in its systems. Read the announcement.

Skip to content Hacktron Sign in [S]
Hacktron Sign in [S] Customers Docs Contact Sign in

Add a context document

1 min
, View, ChatGPT, Claude, Perplexity, OpenAPI

Copy page

Add a context document

View MarkdownOpen in ChatGPTOpen in ClaudeOpen in PerplexityDownload OpenAPI

Saves Markdown, such as a design decision, a product spec, or an accepted risk, as a context document on a repository. Use the repository’s id from GET /repos. name holds up to 200 characters and content up to 200,000. You need the member role or above.

Scans read the document, and the next threat model update folds it into the repository’s threat model. To start that update now, call POST /repositories/{id}/threat-model/sync.

Request

POST /context-documents

Send an API key with the write scope in the X-Api-Key header.

Body

A required application/json body.

FieldDescription
repository_id
string (uuid), required
Id from the repository list.
name
string, required
Document title.
content
string, required
Markdown content.

Responses

200 OK

FieldDescription
id
string (uuid), required
name
string, required
kind
string, required
One of threat_model, application_threat_model, or document.
updated_at
string (date-time), required
readable
boolean, required
Whether the content is text this API returns; PDFs open in Hacktron.
[↓] [↑] [enter] to visit
Menu
[M]
Next in menu
[J]
Previous in menu
[K]
Find
[F]
Ask
[A]
Sign in
[S]
Copy page
[C]
Listen
[L]
Justification
[R]
Language
[G]
Dark mode
[D]
High contrast
[H]
Shortcuts
[I]
Close
[Esc]