---
title: "Create Campaign"
method: POST
path: "/v1/campaigns"
tags: ["Red Team", "redteam"]
---

# Create Campaign

`POST /v1/campaigns`

Create a new red team campaign.

Launches a K8s Job to run the selected tool against the target agent.
Returns immediately with a pending status; poll via GET for updates.

## Request body

- CreateCampaignRequest — Request body for creating a red team campaign.
  - `team_id` string, uuid, required — Team that owns this campaign
  - `tool` 'diamond_security' | 'promptfoo' | 'garak' | 'pyrit' | 'unknown', required — Supported red team tools.
  - `agent_url` string, uri, nullable — Target agent endpoint URL
  - `agent_id` string, uuid, nullable — Agent ID from Agent Registry (resolves URL)
  - `agent_api_key` string, nullable — API key for the target agent
  - `agent_model_name` string, nullable — Model name if agent is an LLM gateway
  - `purpose` string, required — Agent purpose description (for context-aware attacks)
  - `categories` AttackCategory[], required — Attack categories to test
  - `custom_plugins` string[], nullable — Custom plugin/probe names (for CUSTOM category)
  - `strategies` string[], nullable — Evaluation strategies (tool-specific)
  - `num_tests` integer — Number of test cases per category
  - `provider_config` object, nullable — Provider-specific configuration

## Response `202`

Successful Response

- CreateCampaignResponse — Response after creating a campaign.
  - `campaign_id` string, uuid, required
  - `status` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/vijilai/apis/vijil-console-api-combined.md) · [All operations](https://skmtc.net/vijilai/apis/vijil-console-api-combined/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vijilai/vijil-console-api-combined/versions/a8b2ee2b2d06/schema)
