---
agentTools:
  projectIndex: https://hub.phantombuster.com/llms.txt
---

# /agent/{id}/abort

Abort all running instances of the agent.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "v1",
    "title": "API v1",
    "description": "The Phantombuster API gives you control over your account. It is composed of HTTPS endpoints returning JSON data.\n\nHere’s a short list of what the API allows\\:\n\n- Launch and abort agents\n- Get console output, status, progress and messages from an agent\n- Get real-time console output from an agent\n- Get user, agent and script records\n- Write scripts\n- ...\n\nWe deliberately made the API extremely simple to use. Any developer should be able to get responses in a matter of minutes.\n"
  },
  "paths": {
    "/agent/{id}/abort": {
      "post": {
        "tags": [
          "Agent"
        ],
        "description": "Abort all running instances of the agent.",
        "operationId": "abortAgent",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the agent to stop.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "softAbort",
            "in": "query",
            "description": "If true, tries to soft abort the agent.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "success"
                    },
                    "data": {
                      "type": "object",
                      "example": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FailApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "internalApiKey": []
          }
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.phantombuster.com/api/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "internalApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Phantombuster-Key-1"
      }
    },
    "schemas": {
      "FailApiResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 89,
      "1": 10,
      "2": 119,
      "3": 78,
      "4": 171,
      "5": 142,
      "6": 168,
      "7": 15,
      "8": 0,
      "9": 194,
      "10": 11,
      "11": 171
    }
  }
}
```