Skip to main content
The End Close API authenticates every request with a secret API key sent in the 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.
API keys are secrets. Keep them out of client-side code, public repositories and anything else you share. Load them from an environment variable or a secrets manager.

Send the key with each request

Put the key in the X-API-Key header. The examples read it from an ENDCLOSE_API_KEY environment variable.
For requests with a body, also send Content-Type: application/json.

Authentication errors

A request without a valid key gets 401 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.

End Close API

Base URL, environments and conventions.

Errors

Error responses and when to retry.