REST action reference
Duplicate a policy
Duplicate a policy. REST and MCP call the same domain service, so a successful invocation returns the same canonical result.
Request schema
Unknown fields are rejected. Path parameters merge with the JSON body or query input before validation.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"key": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$"
}
},
"required": [
"id",
"name",
"key"
],
"additionalProperties": false
}Example request
{
"id": "00000000-0000-4000-8000-000000000001",
"name": "Signup protection copy",
"key": "signup_protection_copy"
}Response schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}Example success response
REST returns JSON. MCP returns the same object in structuredContent plus a transport request ID.
{
"id": "00000000-0000-4000-8000-000000000001",
"status": "available"
}Errors and recovery
Common statuses: 422 invalid input, 403 missing scope or organization access, 404 not found, 409 revision or idempotency conflict, 429 rate limit, 504 deadline exceeded.Include the request ID from the error envelope when you contact support.
Idempotency and deadlines
Send a stable Idempotency-Key and reuse it only for an exact retry of this mutation.Server deadline: 5s. Retry only when error.retryable is true.
cURL
curl -X POST https://abusezero.com/v1/policies/RESOURCE_ID/duplicate \
-H "Authorization: Bearer $ABUSEZERO_SECRET_KEY" \
-H "AbuseZero-Organization: $ABUSEZERO_ORGANIZATION" \
-H "Idempotency-Key: operation_123" \
-H "Content-Type: application/json" \
--data '{"name":"Signup protection copy","key":"signup_protection_copy"}'Node SDK
const result = await abusezero.call("/v1/policies/RESOURCE_ID/duplicate", {
method: "POST",
input: {"id":"00000000-0000-4000-8000-000000000001","name":"Signup protection copy","key":"signup_protection_copy"},
idempotencyKey: "operation_123",
});MCP
abusezero_duplicate_policy({
"id": "00000000-0000-4000-8000-000000000001",
"name": "Signup protection copy",
"key": "signup_protection_copy",
"idempotency_key": "operation_123"
})