---
title: Flagpole quickstart
description: Start Flagpole locally, create a release flag, and verify its evaluation over HTTP.
url: https://pr-15-c0fdf0ef9f59.thally.app/flagpole/quickstart
---

# Flagpole quickstart

Start Flagpole locally, create a release flag, and verify its evaluation over HTTP.

In this quickstart, you will run Flagpole in memory and use a boolean flag to
control a checkout release. You need Git, `curl`, and Node.js 20 or later.

#### Start the API

    ```bash
    git clone https://github.com/kenny-io/flagpole-api.git
    cd flagpole-api
    npm install
    npm run dev
    ```

    Flagpole listens on `http://localhost:3333`. Keep this terminal open.

#### Check the running release

    In a second terminal, call the public health endpoint:

    ```bash
    curl -s http://localhost:3333/health
    ```

    A current server returns `{"status":"ok","version":"1.1.0"}`.

#### Create a flag

    ```bash
    curl -s -X POST http://localhost:3333/v1/flags \
      -H 'content-type: application/json' \
      -d '{"key":"new-checkout","description":"New checkout flow","enabled":true,"tags":["checkout"]}'
    ```

    The response is `201 Created` and includes the flag's timestamps.

#### Evaluate the flag

    ```bash
    curl -s 'http://localhost:3333/v1/flags/new-checkout/evaluate?unit=user-42'
    ```

    The response includes `{"key":"new-checkout","enabled":true}`. You now
    have a release decision another service can consume.

## Make the local setup durable

The quickstart intentionally disables authentication and keeps state in
memory. For any shared environment, restart with both settings:

```bash
export FLAGPOLE_API_TOKEN="$(openssl rand -hex 24)"
printf 'Copy this token into your client terminal: %s\n' "$FLAGPOLE_API_TOKEN"
FLAGPOLE_DATA_FILE=./data/flags.json \
npm start
```

The token remains exported in the server terminal and is printed once so you
can copy it into another terminal. Every `/v1` request must then send
`Authorization: Bearer <printed-token>`. The health and version endpoints stay
public.

Next, learn how [rollouts and environments](/flagpole/concepts) affect an
evaluation, or browse the [generated API reference](/api/default/health/get).