Skip to main content
POST
https://agentgate.mynewapi.com
/
api
/
v1
/
verification
/
plugins
Register Plugin
curl --request POST \
  --url https://agentgate.mynewapi.com/api/v1/verification/plugins \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "level": "<string>",
  "priority": 123,
  "enabled": true,
  "continueOnFail": true,
  "options": {},
  "webhookUrl": "<string>",
  "webhookTimeoutMs": 123
}
'

Register Plugin

Registers a new webhook-based verification plugin.

Request

id
string
required
Unique plugin identifier
name
string
required
Human-readable plugin name
description
string
Plugin description
level
string
default:"custom"
Verification level: L0, L1, L2, L3, or custom
priority
number
default:"100"
Execution priority (lower runs first)
enabled
boolean
default:"true"
Whether plugin is enabled
continueOnFail
boolean
default:"false"
Whether to continue verification if this plugin fails
options
object
Plugin-specific options
webhookUrl
string
URL to call for verification (required for webhook plugins)
webhookTimeoutMs
number
default:"30000"
Timeout for webhook calls (1000-300000 ms)
curl -X POST https://agentgate.mynewapi.com/api/v1/verification/plugins \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "custom:security-scan",
    "name": "Security Scanner",
    "description": "Custom security vulnerability scanner",
    "level": "custom",
    "priority": 100,
    "webhookUrl": "https://security.example.com/api/scan",
    "webhookTimeoutMs": 60000,
    "options": {
      "severity": "high"
    }
  }'

Response

Returns the created plugin configuration.

Example Response

{
  "success": true,
  "data": {
    "id": "custom:security-scan",
    "name": "Security Scanner",
    "description": "Custom security vulnerability scanner",
    "level": "custom",
    "priority": 100,
    "enabled": true,
    "continueOnFail": false,
    "options": {
      "severity": "high"
    }
  },
  "requestId": "req_abc123"
}

Webhook Protocol

When the plugin runs, AgentGate POSTs to your webhook URL:
{
  "pluginId": "custom:security-scan",
  "context": {
    "workDir": "/workspace/project",
    "modifiedFiles": ["src/auth.ts", "src/api.ts"],
    "harness": "default",
    "metadata": {}
  }
}
Your webhook should respond with:
{
  "status": "passed",
  "summary": "No vulnerabilities found",
  "checks": [
    {
      "name": "SQL Injection",
      "status": "passed",
      "message": "No SQL injection vulnerabilities"
    }
  ]
}