> ## Documentation Index
> Fetch the complete documentation index at: https://endclose.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

The End Close API uses API keys to authenticate requests. You can view and manage your API keys in the Settings section of the [End Close dashboard](https://app.endclose.com).

API keys are sensitive and should always be kept secret. You should not store API keys in publically accessible code such as public GitHub repositories or client-side code.

Provide your API key as the value of the Authorization header.

```javascript JavaScript lines icon="js" theme={null}
  fetch('https://api.endclose.com/v1/{endpoint}', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      X-API-KEY: YOUR_API_KEY
    }
  })
```

```ruby Ruby lines icon="ruby" theme={null}
  require 'net/http'
  require 'uri'
  require 'json'
  
  uri = URI.parse('https://api.endclose.com/v1/{endpoint}')
  
  request = Net::HTTP::Post.new(uri)
  request['Content-Type'] = 'application/json'
  request['X-API-KEY'] = YOUR_API_KEY
  
  http.request(request)
```

```python Python lines icon="python" theme={null}
  import requests

  url = "https://api.endclose.com/v1/{endpoint}"

  headers = {
      "Content-Type": "application/json",
      "X-API-KEY": YOUR_API_KEY,
  }

  requests.post(url, headers=headers)
```

```bash cURL lines icon="terminal" theme={null}
  curl -X POST 'https://api.endclose.com/v1/{endpoint}' \
    -H 'X-API-KEY: YOUR_API_KEY'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.