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 Status | Step / Error | Description |
|---|---|---|
GENERATING | THREAT_BUILD | The save operation is in progress. |
COMPLETED | — | The threat has been successfully saved to the Threat Library. The threat field contains the saved threat information. |
READY | SAVE_FAILED | The 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 Acceptedwithout initiating another save operation. - If the generation is already
COMPLETED, the API returns200 OKwith 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.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||