---
title: "Create a new attack."
method: POST
path: "/attacks"
tags: ["attacks"]
---

# Create a new attack.

`POST /attacks`

Create a new attack by specifying the attack configuration, targets and sampling configuration
Requires the privilege [`EXPERIMENTS_RUN`](https://www.gremlin.com/docs/user-management/access-control/#privileges)

## Query parameters

- `teamId` string, required

## Request body

- CreateAttackRequest
  - `attackConfiguration` AttackConfiguration, required
    - `command` ServiceCommand, required
      - `infraCommandType` 'CPU' | 'IO' | 'Memory' | 'Disk' | 'Thread_Bomb' | 'Blackhole' | 'DNS' | 'Latency' | 'Packet_Loss' | 'Collect_Certs' | 'Shutdown' | 'Time_Travel' | 'Process_Killer' | 'Process_Exhaustion' | 'GPU' | 'Unknown'
      - `infraCommandArgs` InfraCommandArgs
        - `type` 'CPU' | 'IO' | 'Memory' | 'Disk' | 'Thread_Bomb' | 'Blackhole' | 'DNS' | 'Latency' | 'Packet_Loss' | 'Collect_Certs' | 'Shutdown' | 'Time_Travel' | 'Process_Killer' | 'Process_Exhaustion' | 'GPU' | 'Unknown'
        - `unknownArgs` object
        - `duplicateArgs` object[]
        - `cliArgs` string[]
        - `lengthOrZero` integer
    - `targets` ServiceTarget[], required
      - `serviceId` string
      - `targetingStrategy` TargetingStrategy, required
        - `type` string, required
    - `sampling` TargetSampling
      - `type` string, required
  - `includeNewTargets` boolean
  - `continueOnEmptyTargets` boolean

## Response `default`

default response

- AttackForServiceResponse[]
  - `serviceId` string
  - `type` 'Host' | 'Container' | 'Kubernetes'
  - `attackId` string
  - `k8sAttackId` string

## Other responses

- `401` — Authorization header missing or malformed. Please provide proper credentials in the authorization header.
- `403` — User requires privilege for target team: EXPERIMENTS_RUN

---

[API](https://skmtc.net/gremlin/apis/gremlin-api.md) · [All operations](https://skmtc.net/gremlin/apis/gremlin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gremlin/gremlin-api/revisions/36ee938323f0/schema)
