Activate Custom Error Template
Mark a previously-uploaded template as the active one for a given error type. The matching previously-active template (if any) is automatically deactivated — only one template per type is active at a time.
The type in the request body must match the type the template was uploaded with; it's required so the server can verify intent and atomically deactivate the right sibling.
Path params
Request body
type string Req
Must match the template's
type. One of: firewall, rate_limit, bad_gateway, service_unavailable, not_found, request_timeout, internal_error, gateway_timeout.Unknown fields in the body are rejected with 400 Bad Request.
Response (200 OK)
Empty body on success. The template is now serving requests of the given type; any previously-active template of the same type is deactivated.
Errors
400 Bad Request
id is not a positive integer, type is unknown, body is not JSON, or body contains unexpected fields.401 Unauthorized
Missing or invalid auth.
Request
curl -X POST "https://api.ngris.com/v1/templates/42/activate" \
-H "X-API-KEY: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{"type": "firewall"}'
Python
from ngris import Ngris
client = Ngris(api_key="<your_api_key>")
client.templates.activate(42, type="firewall")
Response — 200 OK
(empty body)