Getting Started

Authentication with API keys

How to authenticate Close API requests using API keys with HTTP Basic Auth.
View as Markdown

API keys are best used for scripts and simple integrations that are internal to your organization. Alternatively, see Authentication with OAuth instead.

Getting an API key

API keys can be created and managed in your Close account under SettingsDeveloperAPI Keys.

API keys are scoped to a particular user/organization combination and can be generated and deleted in the Settings page. See API Keys & OAuth for more information.

Perform API calls with API key

API keys use HTTP Basic client side authentication. Basic authentication is a simple authentication scheme built into the HTTP protocol. To use it, send your HTTP requests with an Authorization header that contains the word Basic followed by a space and a base64-encoded string composed of an api key followed by a colon. The API key acts as the username and the password is always empty.

cURL example

Example cURL request with an api key.

$curl https://api.close.com/api/v1/me/ -u yourapikey:

Notice the ’:’ at the end of the api key. This is used because the key is sent as the username with a blank password.

GET /api/v1/me/ HTTP/1.1
Authorization: Basic eW91cmFwaWtleTo=
Host: api.close.com

This results in the header Authorization: Basic eW91cmFwaWtleTo= sent with the request as base64-encoded string yourapikey: is eW91cmFwaWtleTo=

API Base URL: https://api.close.com/api/v1