X-API-Key header. The key also selects the environment: a Sandbox key reads and writes Sandbox data, and a Production key reads and writes Production data.
Find your API key
Open the End Close app and go to Settings > API keys. Each environment has one key; switch environment to see the other.
Build and test against Sandbox, then swap in the Production key when you go live.
Send the key with each request
Put the key in theX-API-Key header. The examples read it from an ENDCLOSE_API_KEY environment variable.
Content-Type: application/json.
Authentication errors
A request without a valid key gets401 Unauthorized and a JSON body with a message:
Some endpoints that manage agents return
403 Forbidden when called with a key other than your environment’s API key. See Errors for every status code.
Related
End Close API
Base URL, environments and conventions.
Errors
Error responses and when to retry.