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

# Introduction

> Learn the basics of the Nickel API

## API Reference

The Nickel API is organized around [REST](https://en.wikipedia.org/wiki/REST). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

## Authorization and Testing

The Nickel API uses [Bearer Authentication](https://datatracker.ietf.org/doc/html/rfc6750). You will be provided with a pair of [API keys](https://www.nickel.com/integrations/api): one for production and one for sandbox testing.

| Environment | Base URL                          |
| ----------- | --------------------------------- |
| Production  | `https://rest.nickel.com`         |
| Sandbox     | `https://rest.staging.nickel.com` |

<Note>
  The interactive API playground on this site uses the **staging** environment. Make sure to use your **sandbox API key** when testing requests in the playground.
</Note>

Include your API key in the `Authorization` header of every request:

```
Authorization: Bearer YOUR_API_KEY
```

## Requests and Responses

For `POST` requests, set the `Content-Type` header to `application/json` and pass parameters in the JSON request body.

For `GET` requests, pass parameters as query string parameters in the URL.

All API responses return `application/json`.

## Errors

The Nickel API uses standard HTTP response codes to indicate the success or failure of a request.

* **2xx** — Success
* **4xx** — Client error (invalid request, authentication failure, etc.)
* **5xx** — Server error

When an error occurs, the API returns a JSON object with an `error` field containing a human-readable description of the problem:

```json theme={null}
{
  "error": "A human-readable error message describing what went wrong"
}
```
