KnowledgeFiles
Beta

Upload a knowledge file

Add a file to the organization knowledge library. Files are used as context by AI pentests.

This is a two-step flow:

  1. Create a signed upload URL with POST /v3/upload/signed-url.
  2. PUT the file content to the returned url.
  3. Call this endpoint with the returned id as temporaryObjectKey.

The file is processed asynchronously: poll the list endpoint until the status is COMPLETED or FAILED.

Each upload is stored under its own object, so uploading a file with an already used name adds a new file instead of overwriting the previous one. Uploads are limited to 35MB.

post/knowledge-files

Request

  • Base URL
    https://public.escape.tech/v3
  • Auth
    API key in header X-ESCAPE-API-KEY

Request body

namestring required

The name of the file, including its extension

kind'CSV' | 'DOC' | 'DOCX' | 'FILE' | 'GRAPHQL' | 'HTML' | 'JSON' | 'MD' | 'ODT' | 'PDF' | 'PPT' | 'PPTX' | 'TAR_GZ' | 'TXT' | 'XLS' | 'XLSX' | 'XML' | 'ZIP' required

The kind of the file, derived from its extension

temporaryObjectKeystring uuid required

The id returned by POST /v3/upload/signed-url after the file content was uploaded to it

Example request

{
  "name": "architecture.md",
  "kind": "MD",
  "temporaryObjectKey": "00000000-0000-0000-0000-000000000000"
}

Response

OK

idstring uuid required

The id of the knowledge file

namestring required

The name of the knowledge file

kind'CSV' | 'DOC' | 'DOCX' | 'FILE' | 'GRAPHQL' | 'HTML' | 'JSON' | 'MD' | 'ODT' | 'PDF' | 'PPT' | 'PPTX' | 'TAR_GZ' | 'TXT' | 'XLS' | 'XLSX' | 'XML' | 'ZIP' required

The kind of the knowledge file

status'COMPLETED' | 'FAILED' | 'PENDING' | 'PROCESSING' required

The processing status of the knowledge file

sizeInBytesinteger nullable required

The size of the knowledge file in bytes, known once processing has run

createdAtstring date-time required

The date and time the knowledge file was created

lastProcessingStartAtstring date-time nullable required

The date and time the last processing of the knowledge file started

lastProcessingEndAtstring date-time nullable required

The date and time the last processing of the knowledge file ended

Changes

No recorded changes to this operation across all 1 revision of this API.