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

# Quickstart

> Build your first agent in 5 steps

This guide walks you through creating a basic agent that can answer calls. By the end, you'll have a working agent attached to a phone number.

<Info>
  Need API access? Email [devs@helloannie.com](mailto:devs@helloannie.com) to get started.
</Info>

## Prerequisites

* An Annie account with API access
* Your API key

Not sure how to authenticate? See the [Authentication guide](/overview/authentication).

***

## Step 1: Create an Organization

An organization represents a physical location—your practice, clinic, or office. It stores the details your agent needs to answer questions accurately.

<CodeGroup>
  ```javascript Node.js theme={null}
  const response = await fetch("https://api.helloannie.com/v1/organizations", {
    method: "POST",
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      name: "Downtown Dental",
      phone: "+15551234567",
      timezone: "America/New_York"
    })
  })

  const { data } = await response.json()
  // data.id contains the organization ID for the next steps
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.helloannie.com/v1/organizations",
      headers={
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json"
      },
      json={
          "name": "Downtown Dental",
          "phone": "+15551234567",
          "timezone": "America/New_York"
      }
  )

  data = response.json()["data"]
  # data["id"] contains the organization ID for the next steps
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.helloannie.com/v1/organizations \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Downtown Dental",
      "phone": "+15551234567",
      "timezone": "America/New_York"
    }'
  ```
</CodeGroup>

Save the `id` from the response—you'll need it in the next steps.

<Card title="Organizations Guide" icon="building" href="/overview/guides/organizations/overview">
  Learn about addresses, office hours, staff, and multi-location setups.
</Card>

***

## Step 2: Create a Bot

A bot is your AI agent. It handles conversations and can be trained with custom knowledge specific to your organization.

<CodeGroup>
  ```javascript Node.js theme={null}
  const response = await fetch("https://api.helloannie.com/v1/bots", {
    method: "POST",
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      name: "Annie",
      orgId: "YOUR_ORG_ID",
      greeting: "Hi! Thanks for reaching out. How can I help you today?"
    })
  })

  const { data } = await response.json()
  // data.id contains your new bot ID
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.helloannie.com/v1/bots",
      headers={
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json"
      },
      json={
          "name": "Annie",
          "orgId": "YOUR_ORG_ID",
          "greeting": "Hi! Thanks for reaching out. How can I help you today?"
      }
  )

  data = response.json()["data"]
  # data["id"] contains your new bot ID
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.helloannie.com/v1/bots \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Annie",
      "orgId": "YOUR_ORG_ID",
      "greeting": "Hi! Thanks for reaching out. How can I help you today?"
    }'
  ```
</CodeGroup>

<Card title="Bots Guide" icon="message-bot" href="/overview/guides/bots/overview">
  Configure bot settings, integrations, and parent-child relationships.
</Card>

***

## Step 3: Add Training

Annie supports multiple training modules to teach your agent how to respond—FAQs, insurances, office information, workflows, and more. For this quickstart, we'll use a **template**, which bundles common training into a single configuration you can apply to your bot.

Templates are pre-built for common use cases like dental scheduling agents or general FAQ agents.

<Info>
  Since the API is invite-only, part of your onboarding includes setting up your first template. We'll add default templates to your account so you can get up and testing quickly—then tweak and fine-tune them later.
</Info>

<CodeGroup>
  ```javascript Node.js theme={null}
  const response = await fetch(
    "https://api.helloannie.com/v1/templates/TEMPLATE_ID/apply",
    {
      method: "POST",
      headers: {
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
      },
      body: JSON.stringify({
        botId: "YOUR_BOT_ID",
        variables: {
          "office_name": "Downtown Dental",
          "office_phone": "+15551234567"
        }
      })
    }
  )
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.helloannie.com/v1/templates/TEMPLATE_ID/apply",
      headers={
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json"
      },
      json={
          "botId": "YOUR_BOT_ID",
          "variables": {
              "office_name": "Downtown Dental",
              "office_phone": "+15551234567"
          }
      }
  )
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.helloannie.com/v1/templates/TEMPLATE_ID/apply \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "botId": "YOUR_BOT_ID",
      "variables": {
        "office_name": "Downtown Dental",
        "office_phone": "+15551234567"
      }
    }'
  ```
</CodeGroup>

<Info>
  Templates may contain variables that must be filled in when applying. The `variables` field is required—pass an empty object `{}` if the template has no variables. Check your template's `variables` array to see what values are needed.

  More documentation on template variables is coming soon.
</Info>

<Card title="Training Guide" icon="graduation-cap" href="/overview/guides/training/overview">
  Learn about all the training modules—FAQs, insurances, workflows, and more.
</Card>

***

## Step 4: Attach a Phone Number

Connect a phone number to your bot so it can receive calls.

<CodeGroup>
  ```javascript Node.js theme={null}
  const response = await fetch(
    "https://api.helloannie.com/v1/phone-numbers/PHONE_NUMBER_ID/attach",
    {
      method: "POST",
      headers: {
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
      },
      body: JSON.stringify({
        botId: "YOUR_BOT_ID"
      })
    }
  )
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.helloannie.com/v1/phone-numbers/PHONE_NUMBER_ID/attach",
      headers={
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json"
      },
      json={
          "botId": "YOUR_BOT_ID"
      }
  )
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.helloannie.com/v1/phone-numbers/PHONE_NUMBER_ID/attach \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "botId": "YOUR_BOT_ID"
    }'
  ```
</CodeGroup>

<Card title="Phone Numbers Guide" icon="phone" href="/overview/guides/deploying/phone-numbers">
  Provision numbers, configure forwarding, and manage number routing.
</Card>

***

## Step 5: Test Your Agent

Call your phone number. Your agent should answer and respond based on the training you've provided.

***

## What's Next?

This quickstart covered the basics, but each step has many more customization options and features. Dive deeper with our guides:

<CardGroup cols={2}>
  <Card title="Organizations" icon="building" href="/overview/guides/organizations/overview">
    Addresses, office hours, staff, and multi-location configurations.
  </Card>

  <Card title="Bots" icon="message-bot" href="/overview/guides/bots/overview">
    Integrations, parent-child relationships, and advanced settings.
  </Card>

  <Card title="Training" icon="graduation-cap" href="/overview/guides/training/overview">
    FAQs, insurances, workflows, and how training affects behavior.
  </Card>

  <Card title="Phone Numbers" icon="phone" href="/overview/guides/deploying/phone-numbers">
    Provisioning, forwarding, and routing configurations.
  </Card>

  <Card title="Bot Architecture" icon="sitemap" href="/overview/guides/bots/architecture">
    Architecture patterns for multi-location and enterprise deployments.
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Full documentation for all endpoints.
  </Card>
</CardGroup>
