---
title: "Kill agent"
url: https://hexelstudio.com/docs/api/titan/administration/agent-controls-kill
---

# Kill agent

**POST** `/titan/admin/agent-controls:kill`

Irreversibly kill a target in the enforcement deployment named by Titan-Enforcement-Deployment. target_id by target_type: agent, deployment and session ids; organization: the deployment's own organization id; workspace and environment: an id one of the deployment's agent deployments runs in; capability: a capability id in the deployment's catalog; destination: a type:id boundary whose type a catalog capability uses; connection: the connected account's nano_id (the kill latches its connected_account_id, returned as target_id); durable_session: a dss_ id, which ends the durable session (state killed) and kills its live legs as sessions in one generation. A target outside the deployment's organization is 404.

## Headers

- `Authorization: string`

  `Bearer <token>`. A Hexel Studio access token for a member or a service user of your organization (or send a service user's API key as X-API-Key).

- `Titan-Enforcement-Deployment: optional string`

  The enforcement deployment this call acts on (its td-... id). Required on the shared plane, where one Gateway serves many tenants and there is no default: a missing, unknown, repeated or other organization's deployment answers 403, like a failed authorization. Optional on a dedicated cell, which defaults to its one deployment.

## Body parameters

- `reason_code: string`

  One of: `"OPERATOR_REQUEST"`, `"SECURITY_INCIDENT"`, `"POLICY_VIOLATION"`

- `target_id: string`

- `target_type: string`

  One of: `"agent"`, `"deployment"`, `"session"`, `"organization"`, `"workspace"`, `"environment"`, `"capability"`, `"connection"`, `"destination"`, `"durable_session"`

## Returns

`200` Successful response; exact status varies by operation. (`object`)

- `changed: boolean`

- `effective: optional boolean`

- `generation: optional integer`

- `state: string`

  One of: `"quarantined"`, `"active"`, `"killed"`

- `target_id: string`

- `target_type: string`

## Errors

- `400` Admin error
- `403` Admin error
- `404` Admin error
- `413` Admin error
- `415` Admin error
- `503` Admin error

## Example

```bash
curl --request POST \
  --url 'https://api.hexelstudio.com/v1/titan/admin/agent-controls:kill' \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
  "reason_code": "OPERATOR_REQUEST",
  "target_id": "string",
  "target_type": "agent"
}'
```

### Response (200)

```json
{
  "changed": true,
  "effective": true,
  "generation": 0,
  "state": "quarantined",
  "target_id": "string",
  "target_type": "string"
}
```

### Response (400)

```json
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
```

### Response (403)

```json
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
```

### Response (404)

```json
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
```

### Response (413)

```json
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
```

### Response (415)

```json
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
```

### Response (503)

```json
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
```
