API Reference

The Not Diamond API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.


Authentication

The Not Diamond API uses API keys for authentication. Login to your account to retrieve the API key you'll use in your requests.

All API requests should include your API key in an Authorization HTTP header as follows:

--header 'Authorization: Bearer <ND_API_Key>'
headers = {
  "Authorization": "Bearer <ND API KEY>",
  "Content-Type": "application/json"
}

❗️

Remember that your API key is a secret!

Do not share it with others or expose it in any client-side code (browsers, apps). Production requests must be routed through your own backend server where your API key can be securely loaded from an environment variable or key management service.