Key Facts
- Category
- Developer & Web
- Input Types
- textarea, text, checkbox, number
- Output Type
- json
- Sample Coverage
- 4
- API Ready
- Yes
Overview
The API Contract Mutation Tester evaluates the defensive validation of your backend by generating semantically risky requests from an OpenAPI 3.x specification. It automatically mutates request fields—such as omitting required parameters, injecting special characters, or violating enum constraints—and can optionally execute these payloads against a live endpoint to verify if your API correctly rejects invalid data.
When to Use
- •When auditing a new API endpoint to ensure it properly rejects malformed or malicious payloads.
- •Before deploying to production to verify that defensive validation rules match the OpenAPI contract.
- •When generating a comprehensive list of negative test cases for automated security or QA pipelines.
How It Works
- •Paste your OpenAPI 3.x specification (YAML or JSON) into the tool to parse documented operations and schemas.
- •The tool generates valid baseline requests, then applies semantic mutations like negative numbers, missing required fields, or invalid enums.
- •If a Base URL is provided and execution is enabled, the tool sends the mutated requests to the target backend.
- •Review the JSON output to see which mutations were 'defended' (rejected by the API) and which were 'accepted' (potentially exposing a validation gap).
Use Cases
Examples
1. Testing a User Signup Endpoint
Security QA Engineer- Background
- A new user registration endpoint has been developed, and the team needs to ensure it doesn't accept invalid data like negative ages or missing emails.
- Problem
- Manually writing negative test cases for every field in the signup payload is time-consuming and prone to human error.
- How to Use
- Paste the OpenAPI YAML for the `/users` endpoint, set 'Mutations Per Field' to 3, and leave the Base URL empty to generate an offline test plan.
- Example Config
-
executeMutations: false, mutationsPerField: 3 - Outcome
- The tool outputs a JSON plan detailing generated mutations, including injecting special characters into the email field and applying negative numbers to the age field.
2. Live Defensive Validation Check
Backend Developer- Background
- An inventory management API is ready for staging, but the developer wants to confirm the API gateway correctly blocks invalid enum values.
- Problem
- Need to quickly fire malformed requests at the staging server without writing a custom test script.
- How to Use
- Paste the OpenAPI spec, enter the staging Base URL, enable 'Execute Mutations', and provide a Bearer token in the Authorization Header.
- Example Config
-
baseUrl: "https://staging-api.example.com", executeMutations: true, authorizationHeader: "Bearer abc123xyz" - Outcome
- The tool executes the mutations against the live endpoint and returns a summary showing which invalid enum requests were 'defended' (e.g., 400 Bad Request) versus 'accepted' (e.g., 200 OK).
Try with Samples
developmentRelated Hubs
FAQ
What versions of OpenAPI are supported?
The tool supports OpenAPI 3.x specifications in both YAML and JSON formats.
Do I have to send requests to a live server?
No. You can leave the Base URL empty and disable execution to generate an offline mutation plan for review.
How does the tool authenticate with my API?
You can provide a raw authorization header, such as a Bearer token, which will be injected into all executed requests.
What types of mutations are generated?
Mutations include required-field omission, negative or oversized numbers, invalid enum members, wrong data types, and special-character payloads.
What do 'defended' and 'accepted' mean in the results?
'Defended' means your API correctly rejected the invalid request. 'Accepted' means the API returned a success code, indicating a potential missing validation rule.