Endpoint
Authentication
Requires a Personal API Access Token.Header
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer | Yes |
| Content-Type | application/json | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name |
Request Body
Full JSON Body Example
Request Body Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| buildCustomMessage | boolean | No | false | Enable custom response message building |
| customMessageTemplate | string | No | - | Response body template (supports variables) |
| customMessageContentType | string | No | - | Content-Type header for the custom response |
| customMessageHttpStatusCode | integer | No | - | HTTP status code for the custom response |
Response
Success Response (200 OK)
Error Response (401 Unauthorized)
Error Response (404 Not Found)
cURL Example
Example 1: Enable Custom JSON Response
Example 2: Enable Custom XML Response
Example 3: Disable Custom Message (Resume Normal Routing)
Notes and Warnings
- Custom Message Mode: When
buildCustomMessage=true, the gateway returns the custom response template instead of routing to backend - Template Variables: The template supports Apinizer variables (e.g.,
${request_httpMethod},${request_uri}) that are resolved at runtime - Content Type: Set
customMessageContentTypeto match your template format (e.g.,application/json,application/xml,text/plain) - HTTP Status Code: The
customMessageHttpStatusCodeoverrides the default 200 status code - Use Cases: Health check endpoints, mock responses, maintenance responses, API versioning redirects
Permissions
User must haveAPI_MANAGEMENT + MANAGE permission in the project.
Related Documentation
- Update Error Handling - Configure error handling strategy
- Update Maintenance Mode - Configure maintenance mode
- Update Routing Status - Enable/disable routing

