Skip to main content

Proxies

A Proxy defines a single API endpoint within a Collection. It specifies the path, HTTP methods, parameters, schemas, and optional workflow for that endpoint.

Proxy guides​

What is a Proxy?​

A proxy is the unit of routing in Zerq. When a request arrives at the gateway, Zerq matches it to a collection (by base path) and then to a proxy by path only. The request's method is then checked against that proxy's allowed methods: any other method gets 405.

Example mapping:

  • Incoming request: GET /payments/transactions?limit=10
  • Matched collection base path: /payments
  • Matched proxy path: /transactions, whose allowed methods include GET
  • Forwarded target path: /v2/txns (backend receives GET /v2/txns?limit=10)

Because the method is not part of the match, give each path one proxy and list every method it serves on that proxy. If two published proxies in a collection have the same path, requests reach only one of them, and methods that only the other one allows get 405.

Creating a Proxy​

From inside a collection, click Add Proxy. The creation form has multiple steps:

1. Basic Information​

FieldDescription
NameDisplay name (e.g., "List Transactions")
DescriptionShown in Developer Portal
HTTP MethodsOne or more of GET, POST, PUT, DELETE, PATCH (the API also accepts HEAD and OPTIONS). See Allowed methods
Request loggingHow much of each request the request log stores: gateway default, full, headers only, metadata only or off. See Request log levels.

2. Path Configuration​

FieldDescription
PathIncoming path relative to collection base path (e.g., /transactions)
Target PathPath sent to the backend (can differ from incoming path)

Path parameters use {param} syntax:

Path:        /users/{userId}/orders/{orderId}
Target Path: /api/users/{userId}/orders/{orderId}

Wildcard paths use suffix /*:

Path:        /files/*
Target Path: /storage/*

Use wildcard routes only when suffix depth is variable and cannot be represented with stable {param} segments.

3. Headers​

Add headers that Zerq appends to the forwarded request for this specific proxy. Like collection-level headers, values can be static strings or environment variable references.

4. Parameters​

Define the parameters your endpoint accepts:

Path Parameters

Name:     userId
Type: string
Required: true
Description: The unique user identifier

Query Parameters

Name:     limit
Type: integer
Required: false
Default: 20
Description: Maximum number of results to return

Defining parameters enables:

  • Input validation
  • Developer Portal interactive testing with pre-filled fields
  • OpenAPI spec generation

5. Schemas​

Define JSON schemas for request and response bodies. Zerq uses these for:

  • Validation (request body)
  • Developer Portal documentation with examples
  • OpenAPI spec export

Example request schema:

{
"type": "object",
"required": ["amount", "currency"],
"properties": {
"amount": { "type": "number", "description": "Amount in cents" },
"currency": { "type": "string", "enum": ["USD", "EUR", "GBP"] }
}
}

6. Review​

Review the full configuration before saving.

Allowed methods​

A proxy's allowed methods (methods in the API) decide which HTTP methods the gateway accepts on its path. The same rule applies to pass-through and workflow-enabled proxies, for every request, and it cannot be turned off:

  • A request whose method is not in the list gets 405 with {"error":"Method POST not allowed for this endpoint"} (naming the request's method). On a workflow-enabled proxy the check runs before the workflow, so the workflow does not run.
  • The check ignores case, so a list stored in lower case (post) by an older version allows POST.
  • A proxy with an empty list rejects every method.
  • The client profile's own allowed methods, if set, are checked earlier, during authentication. A method the profile blocks gets 405 with {"error":"HTTP method not allowed"}, so the error text tells you which list to change.
  • CORS preflight requests (OPTIONS with Origin and Access-Control-Request-Method headers) are answered with 204 before this check. A plain OPTIONS request needs OPTIONS in the list.

Workflow-enabled proxies follow this rule from the 2026-11-08 release; before it, their workflow ran for every method. When upgrading, add the methods each workflow proxy actually serves first, as described in the upgrade note.

Supported methods are GET, POST, PUT, PATCH, DELETE, HEAD and OPTIONS. Zerq stores them upper-case and without duplicates, whichever way the proxy is written:

How the proxy is writtenMethods
Console formAt least one method is required; the form offers GET, POST, PUT, DELETE and PATCH.
POST /api/v1/proxiesA body without methods gets ["GET"]. An empty list or a method outside the supported ones returns 400 (for example methods contains unsupported HTTP method "FETCH"; use only GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS).
PUT /api/v1/proxies/:idA body that sends methods (including null or []) must hold a valid list, or the update returns 400. An update that does not send methods never fails because of the stored list.
Management MCP create_proxy / update_proxymethods is required on create. A missing (on create), empty, null, non-array or unsupported value returns a tool error without calling the API. See the tool catalog.
Collection JSON importNon-string and unsupported entries are dropped; a missing or empty list, or one with nothing valid left, becomes ["GET"]. See Import & Export.
OpenAPI importThe methods of the path's operations.
Duplicate collectionEach proxy's methods are copied with unsupported entries dropped. No method is added, so an empty list stays empty. See Duplicate.

Streaming responses​

Enable Streaming for endpoints that return Server-Sent Events (SSE) or long-lived streaming responses. When enabled, Zerq disables buffering, caching, and compression for this proxy.

Workflows​

Each proxy can have an optional Workflow — a node-based processing pipeline that runs for every request. Click Workflow on the proxy's row in its collection to open the workflow editor; turn it on with the editor's Active switch.

The workflow runs only for the proxy's allowed methods; other methods get 405 before the workflow starts. List every method the workflow's clients send. Many workflow templates take POST, while a new proxy defaults to GET, so add POST to the proxy when you use one. The builder warns when a template or the HTTP trigger uses a method the proxy does not allow.

→ See Workflows

Proxy status​

Proxies follow a draft → published lifecycle:

  • Draft: Only visible to admins; not accessible through the gateway
  • Published: Live — accessible to clients and visible in the Developer Portal

Toggle status from the proxy list or detail view.

Bulk operations​

Select multiple proxies using the checkboxes in the proxy list to apply an action to all of them at once:

ActionEffect
PublishSets all selected proxies to published status
UnpublishSets all selected proxies to draft status
DeletePermanently removes all selected proxies
caution

Bulk delete and unpublish immediately affect live traffic for all selected proxies.

Editing and Deleting​

  • Click the edit icon to modify any proxy setting
  • Click the delete icon to permanently remove a proxy
caution

Deleting a published proxy immediately makes that endpoint unavailable to all clients.

History: compare and restore versions​

Every save of a proxy is kept as a version: its settings (from the proxy form, the API, the Management MCP or a collection import) and its workflow (from its workflow page, linking or unlinking a shared workflow, or a publish of a workflow it uses). Each version records who saved it, when, and which settings changed.

  • History on the proxy card, or History at the top of the proxy's workflow page, lists the versions, newest first. Current marks the proxy as it is now.
  • Compare shows what differs between a version and now. You can then pick any two versions: changed settings are listed with their old and new values, and workflow changes are listed as steps added, removed and changed (by name, without their values). Secret values in a workflow are never shown.
  • Restore (modifier role) puts the proxy's settings and workflow back to that version. The restore is saved as a new version (Restored version N), so you can always go back. It is recorded in the audit log as proxy / restore_version.

Restoring a version that had no workflow turns the proxy's workflow off and keeps its steps, so nothing is deleted. Restoring a version that used a shared workflow links that workflow again. The proxy then runs that workflow's current published version; to go back further, restore a version of the workflow itself in Workflows. If the version's path and method are now used by another proxy, or its workflow no longer validates, the restore fails and nothing changes.

A proxy created before history existed gets its first version, Before version history started, the first time it is saved. Deleting a proxy, or the collection it belongs to, deletes its history.

The same is available through the API (GET /api/v1/proxies/:id/versions, GET …/versions/compare?from=1&to=current, POST …/versions/:version/restore) and the Management MCP tools list_proxy_versions, get_proxy_version, compare_proxy_versions and restore_proxy_version.

Duplicating a Proxy​

Duplicate a proxy to create a copy with similar configuration: Duplicate on the proxy card opens the Duplicate Proxy dialog, filled in from the original and named <name> (Copy); change what differs and choose Create Proxy. The copy is created in draft status. You can duplicate within the same collection or into a different one.

Proxy URL structure​

A client calls a proxy at:

https://<gateway-host>/<collection-base-path>/<proxy-path>

Example:

https://api.example.com/payments/transactions

Where:

  • api.example.com = gateway host
  • /payments = collection base path
  • /transactions = proxy path