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

# Quickstart

> Learn how to get started with the Pocketflows API

## Fetch your API keys

Log into [dashboard.pocketflows.com](https://dashboard.pocketflows.com) and
navigate to the [API Keys tab](https://dashboard.pocketflows.com/api_keys). If
you don't have credentials yet, reach out to us
[team@pocketflows.com](mailto:team@pocketflows.com)! Pocketflows provides
different environments for development and production, and you can toggle
between them by using the "Test Mode" toggle at the top right corner of your
dashboard.

All API endpoints are authenticated using Basic HTTP authentication. Pass the
`project_id` and `secret_key` as `username` and `password` in Basic HTTP
authentication.

## Create your first business

A Pocketflows `business` usually maps to one of your SMB customers. For example,
if you're Toasté, a vertical SaaS company for restaurants, a Pocketflows
`business` object would map to one of your restaurant customers.

```
POST /businesses

Headers
{
  "Authorization": "Basic base64encode(project_id:test_secret_key)",
  "Content-Type": "application/json"
}

Body
{
  "name": "Test Business"
}
```

The response will contain your `business_id`—save this value to use in the
subsequent steps below.

## Create a customer within the business

A Pocketflows `customer` refers to one of your customer's customers. Continuing
the Toasté example, a diner at one of the restaurants that uses Toasté would be
a Pocketflows `customer`. For this example, pass in your own email address in
`your_email_address` and the `business_id` from the previous step in the `POST`
request.

```
POST /businesses/:id/customers

Headers
{
  "Authorization": "Basic base64encode(project_id:test_secret_key)",
  "Content-Type": "application/json"
}

Body
{
  "email_address": "your_email_address"
}

```

## Create an embed

A Pocketflows embed is a URL that you can you can add directly inside your
existing application so that your customers can create marketing without leaving
your platform. To create an embed:

```
POST /businesses/:id/embeds

Headers
{
  "Authorization": "Basic base64encode(project_id:test_secret_key)",
  "Content-Type": "application/json"
}
```

This will return a URL of your embedded marketing flow, which you can open in
your browser of choice. This embed is exactly what your restaurant customer
`Test Business` would be able to see! Now you can create a campaign, trigger,
customers, and more via our pre-built marketing flows! You can try sending
yourself any of the pre-built campaigns.
