Launch Week 02 wrapped — explore all five launches

Update Method

PUThttps://api.confident-ai.com/v2/attack-methods/{attackMethodId}

Configures the parameter values your project runs an attack method with, and returns the method. The values replace this project's stored configuration wholesale, so send every value you want kept. An attack method that takes no parameters cannot be configured.

PUT/v2/attack-methods/{attackMethodId}
curl -X PUT "https://api.confident-ai.com/v2/attack-methods/{attackMethodId}" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "parameters": {
    "persona": "urgent"
  }
}'
200
{
  "success": true,
  "data": {
    "id": "Prompt Injection",
    "name": "Prompt Injection",
    "description": "Embeds instructions in the input that try to override the system prompt.",
    "multiTurn": false,
    "exploitability": "LOW",
    "configurable": true,
    "parameters": {}
  },
  "link": "https://app.confident-ai.com/project/<PROJECT-ID>/threats/attacks",
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • attackMethodIdstringRequired

    The id of the attack method, as the list returns it. A method's catalog name also resolves.

Request body

  • parametersobjectRequired

    The values to configure, keyed by parameter name. They replace this project's stored configuration wholesale, so send every value you want kept, and each must match the type its parameter declares.

Response

Update Method succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    One way of attacking the system under test, drawn from the Confident AI catalog and configured per project.

    Show 7 propertiesHide 7 properties
    • idstring

      The id of the attack method. It is the method's catalog name until this project configures it, and its generated id afterwards; both keep resolving.

    • namestring

      The name of the attack method, as the catalog spells it.

    • descriptionstring | null

      What the attack method does to the system under test.

    • multiTurnboolean

      Whether the attack plays out over a conversation rather than a single request.

    • exploitabilityenum | null

      A three-step scale, LOW to HIGH, used for how exposed a system under test is and how easily an attack method exploits it.

      Show 3 enum valuesHide 3 enum values
      • LOW
      • MEDIUM
      • HIGH
    • configurableboolean

      Whether the attack method takes parameters. Updating one that takes none is rejected.

    • parametersobject | null

  • linkstring

    This is the URL of the resource on the Confident AI platform.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI