Skip to main content
POST
/
v1
/
campaigns
Create Campaign
curl --request POST \
  --url https://api.example.com/v1/campaigns \
  --header 'Content-Type: application/json' \
  --data '
{
  "team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "tool": "diamond_security",
  "purpose": "<string>",
  "categories": [
    "injection"
  ]
}
'
{
  "campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "<string>"
}

Body

application/json

Request body for creating a red team campaign.

team_id
string<uuid>
required

Team that owns this campaign

tool
enum<string>
required

Red team tool to use

Available options:
diamond_security,
promptfoo,
garak,
pyrit,
unknown
purpose
string
required

Agent purpose description (for context-aware attacks)

Minimum string length: 1
categories
enum<string>[]
required

Attack categories to test

Minimum array length: 1

Abstract attack categories (tool-agnostic).

Each adapter maps these to tool-native plugin/probe/strategy names. Use CUSTOM with custom_plugins for tool-native passthrough.

Available options:
injection,
jailbreak,
harmful,
pii,
toxicity,
hallucination,
overreliance,
custom
agent_url
string<uri> | null

Target agent endpoint URL

Required string length: 1 - 2083
agent_id
string<uuid> | null

Agent ID from Agent Registry (resolves URL)

agent_api_key
string | null

API key for the target agent

agent_model_name
string | null

Model name if agent is an LLM gateway

custom_plugins
string[] | null

Custom plugin/probe names (for CUSTOM category)

strategies
string[] | null

Evaluation strategies (tool-specific)

num_tests
integer
default:25

Number of test cases per category

Required range: 1 <= x <= 100
provider_config
Provider Config · object

Provider-specific configuration

Response

Successful Response

Response after creating a campaign.

campaign_id
string<uuid>
required
status
string
required
Last modified on April 21, 2026