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

# Quickstart

> Start receiving SFTP files in under 5 minutes

This guide will get you all set up and ready to use the Nightly API. We'll cover how to get started with an API key and how to make your first API request. We'll also look at where to go next to find all the information you need to take full advantage of the powerful Nightly platform.

## Account Setup

Before you can use the API, you'll need to create a Nightly account and get an API key.

### Create an account

If you don't already have one, start by creating a Nightly account at
[app.nightly.sh](https://app.nightly.sh). This registration process will
guide you through the necessary steps to open an active Nightly account.

### Get an API key

Once your Nightly account is active, head to your [settings
page](https://app.nightly.sh/settings) to find your API key. You'll need
this key to authenticate your API requests.

## Use the API

Now that you have a Nightly account, you can start using the API to create buckets and receive data.

### Create a Bucket

We'll start by using cURL, but you can also use our [libraries](/libraries) to
access the Nightly API. In Nightly, a [Bucket](/buckets) is an SFTP server that you control. You can create as many buckets as you need to receive data from your customers.

Before making your first API request, you need to make
sure cURL is installed:

```bash
# cURL is most likely already installed on your machine
curl --version
```

Once you've confirmed that cURL is installed, you can create your first bucket:

```bash
curl \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer API_KEY_GOES_HERE" \
  -d '{"name": "My First Bucket"}' \
  https://api.nightly.sh/v1/buckets
```

<Note>
  Don't forget to replace `API_KEY_GOES_HERE` with your API key from the
  [settings page](https://app.nightly.sh/settings).
</Note>

Assuming all went well, you'll see a response like this:

```json
{
  "id": "nly_prod_buc_1amaj5125as",
  "name": "My First Bucket",
  "host": "1amaj5125as.sftp.nightly.sh",
  "active": true,
  "created_at": 692233200
}
```

### Create a User

Now that you have a bucket, you can create a user to access it.

```bash
curl \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer API_KEY_GOES_HERE" \
  -d '{"username": "user", "password": "password", "bucket_id": "BUCKET_ID_FROM_PREVIOUS_STEP"}' \
  https://api.nightly.sh/v1/users
```

<Note>
  Don't forget to replace `API_KEY_GOES_HERE` with your API key from the
  [settings page](https://app.nightly.sh/settings) and
  `BUCKET_ID_FROM_PREVIOUS_STEP` with the `id` from the previous JSON response.
</Note>

A successful response will look something like this:

```json
{
  "id": "nly_prod_usr_1amaj5125as",
  "username": "user",
  "active": true,
  "permissions": {},
  "created_at": 692233200
}
```

### Access Your Bucket

Finally, you can use any SFTP client to access your bucket. At Nightly, we're big fans of [Transmit](https://panic.com/transmit/), but you can use any SFTP client you like. You can also use the command line:

```bash
sftp user@1amaj5125as.sftp.nightly.sh
```

## What's Next

Congratulations! You've successfully set up your first SFTP bucket. Here are some more resources to help you dig deeper:

<CardGroup cols={2}>
  <Card title="Pipelines" icon="timeline-arrow" href="/concepts/pipelines">
    Transform received data using a pipeline before sending it to your
    application
  </Card>

  <Card title="EdTech Guides" icon="palette" href="https://mintlify.com/docs/settings/global">
    Learn how EdTech startups use Nightly to move upmarket and support more
    district requirements
  </Card>

  <Card title="FinTech Guides" icon="dollar-sign" href="https://mintlify.com/docs/api-playground/openapi">
    Learn how FinTech startups use Nightly to build pipelines for their
    transaction data (and more!)
  </Card>

  <Card title="Libraries" icon="screwdriver-wrench" href="https://mintlify.com/docs/components/accordion">
    Use our open-source libraries to integrate with Nightly inside of your
    backend application
  </Card>
</CardGroup>
