create_route
Create an HTTP route with a single default response in a Mockoon environment. Specify the method, endpoint path, status code, and optional body and headers.
Instructions
Create a new HTTP route with a single default response. Use create_route_with_responses to add multiple responses in one call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| environmentId | Yes | Environment UUID | |
| method | Yes | HTTP method | |
| endpoint | Yes | Route path without leading slash (e.g. users/:id) | |
| documentation | No | Optional documentation / description for the route | |
| statusCode | No | HTTP status code | |
| body | No | Response body (plain text or JSON string) | |
| contentType | No | Content-Type header value | application/json |
| headers | No | Additional response headers (excluding Content-Type) |