Get relay configuration

Changed on

The routes document End Close is managing for the environment this API key belongs to: which processor webhook routes the relay accepts, how each is verified, and the field map that decides what leaves your network.

This is the only thing End Close tells a relay, and the status code is the whole message. A 200 is itself the statement that End Close owns this configuration, so the relay runs the document and hides its own config editor — there is no local copy that can drift. A 304 says the same and that nothing moved. A 404 means End Close is not managing this environment (nothing provisioned, or the switch turned off in Settings → Relay). It is a state, not a terminal answer: keep the document you already have, fall back to local configuration if you have one, and keep polling at your normal cadence — this is the only way you will hear that management was switched back on, and stopping forwarding on a 404 would turn a settings toggle into an outage.

Poll it with If-None-Match. The 200 carries a strong ETag identifying the document, which changes only when the document itself changes — a save that alters nothing keeps it — so the ordinary answer on a heartbeat is a 304 with no body. The API key alone resolves the environment: no parameters are needed, and rotating the key does not change the document. routes has the same content as the routes: block of the relay's relay.yaml; environment is informational.

get/relays/config

Request

  • Base URL
    https://api.endclose.com/v1
  • Auth
    API key in header X-API-KEY

Headers

If-None-Matchstring

The ETag from the last 200. Send it back and an unchanged document answers 304.

Response

The provisioned routes document. The ETag header identifies it.

environmentstring

Name of the environment the API key belongs to, and that owns this document. Informational: the relay logs it and writes it into a comment in its stored copy.

Example response

{
  "environment": "Sandbox",
  "routes": [
    {
      "id": "payabli-settlements",
      "auth": {
        "secret_env": "PAYABLI_WEBHOOK_SECRET"
      }
    }
  ]
}

Changes