# Save Generated Threat

Saves the threat produced by an AI Threat Builder generation to the Threat Library.

This endpoint can be used for generations in the READY status, including:

  • Generations created with auto_save=false.
  • Generations whose previous save operation failed with SAVE_FAILED.

The threat is saved using the threat_name provided in the original generation request, if specified. Otherwise, the automatically generated threat name is used.

Authorization

The threat is saved on behalf of the user associated with the original generation. Any access token within the same account with the required write scope can initiate the save operation, subject to the applicable permission and entitlement checks.

Request Processing

This endpoint does not require a request body.

The save operation is processed asynchronously. The API returns 202 Accepted with the generation details and a Location header.

Poll the URL provided in the Location header using a GET request every 10 seconds to track the save status.

Generation StatusStep / ErrorDescription
GENERATINGTHREAT_BUILDThe save operation is in progress.
COMPLETED—The threat has been successfully saved to the Threat Library. The threat field contains the saved threat information.
READYSAVE_FAILEDThe save operation failed after three attempts. The save operation can be requested again.

If the save operation finishes before the initial response is returned, the 202 Accepted response may already contain a generation with the COMPLETED status.

Idempotency and Retry Behavior

Repeated save requests do not create duplicate threats.

  • If a save operation is already in progress, the API returns 202 Accepted without initiating another save operation.
  • If the generation is already COMPLETED, the API returns 200 OK with the existing generation and saved threat information.
  • If the API returns 500 Internal Server Error, the request can be safely retried.

This behavior ensures that retrying a request after a timeout or a lost response does not create a duplicate threat in the Threat Library.

Errors, in the order of the checks: 401, 429, 403, 401, 402, 422, 404, 403, 402, 403, 409, 500.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The generation_id of the create response, a UUID.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json