> ## 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.

# Create bot

> Provision a new Annie bot for the organization.



## OpenAPI

````yaml /openapi/openapi.yaml post /bots
openapi: 3.0.3
info:
  title: Annie API
  description: >
    ### Overview


    The Annie API is a (mostly) RESTful API. Typically, both POST bodies and
    responses are JSON-encoded.


    Note: The documenation is Work In Progress and is subject to change.


    ### Base URL


    The base URL for the Annie API is https://api.helloannie.com/.


    Examples in this document may abbreviate this to `/`.


    ### Versioning


    Routes are prefixed with a version number i.e. `v1`. The version will change
    when there is a non-backwards compatible or other significant change to the
    api.


    ### Authentication


    The Annie API supports two authentication methods API Keys and OAuth Access
    Tokens:


    #### API Keys


    API Keys are long-lived tokens that can be generated from the Developer
    Portal on your organization page. API keys are prefixed with `annie-sk-v2-`
    and can be used directly in the `Authorization` header.


    ```

    curl -H "Authorization: Bearer annie-sk-xxxxx"
    https://api.helloannie.com/...

    ```


    #### OAuth Tokens


    OAuth tokens are short-lived access tokens generated using the OAuth 2.0
    Client Credentials flow (Machine-to-Machine). OAuth clients provide scoped
    permissions and are ideal for server-to-server integrations.


    **Creating an OAuth Client**


    OAuth clients can be created in the Developer Portal on your organization
    page. When creating a client, you'll receive:


    - `client_id`: Your OAuth client identifier

    - `client_secret`: Your OAuth client secret (store this securely)


    **Generating an OAuth Token**


    To generate an OAuth access token, make a POST request to the Annie OAuth
    token endpoint:


    **Endpoint:** `https://annie-external-api.us.auth0.com/oauth/token`


    **Example Request:**


    ```bash

    curl -X POST https://annie-external-api.us.auth0.com/oauth/token \
      -H "Content-Type: application/json" \
      -d '{
        "grant_type": "client_credentials",
        "client_id": "your-client-id",
        "client_secret": "your-client-secret",
        "audience": "https://api.helloannie.com"
      }'
    ```


    The `access_token` from the response should be used in the `Authorization`
    header when making requests to the Annie API:


    ```

    curl -H "Authorization: Bearer eyJhbGciOiJSUzI..."
    https://api.helloannie.com/v1/...

    ```


    ### API Response Structure


    The Annie API returns status codes consistent with standard HTTP
    conventions. Success and Error responses follow the below structure:


    ```

    {
      "success": boolean
      "data": {}
      "message": string // optional
    }

    ```


    ### Rate Limiting


    The Annie API enforces rate limits to ensure stability and fair usage. The
    default rate limit is **60 requests per minute** per organization. This
    limit is applied per endpoint pattern (e.g. `GET /v1/bots/:id`).


    When the rate limit is exceeded, the API responds with HTTP `429 Too Many
    Requests`.


    Response headers include:


    - `X-RateLimit-Limit`: The maximum number of requests allowed in the current
    window.

    - `X-RateLimit-Remaining`: The number of requests remaining in the current
    window.

    - `X-RateLimit-Reset`: The time at which the current rate limit window
    resets (in UTC epoch seconds).


    If you exceed the limit, the response will contain a `Retry-After` header
    indicating how many seconds to wait before retrying.


    ### Pagination


    The Annie API does not currently support pagination. All results are
    returned at once.
  version: v1
servers:
  - url: https://api.helloannie.com/v1
security: []
paths:
  /bots:
    post:
      tags:
        - Bots
      summary: Create bot
      description: Provision a new Annie bot for the organization.
      operationId: postV1Bots
      requestBody:
        description: Payload required to create a new bot
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBotRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CreateBotRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateBotRequest'
      responses:
        '200':
          description: Response returned after creating a bot
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BotCreateResponse'
        '400':
          description: The request was invalid or malformed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '403':
          description: You do not have permission to perform this action
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: The requested resource was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
components:
  schemas:
    CreateBotRequest:
      additionalProperties: false
      type: object
      required:
        - orgId
        - name
        - greeting
      properties:
        orgId:
          format: uuid
          description: The organization ID for the bot
          type: string
        name:
          description: The name of the bot
          type: string
        greeting:
          description: The greeting message for the bot
          type: string
        internalName:
          description: Internal name for the bot
          type: string
        companyName:
          description: >-
            DEPRECATED: This field uses the organization's name. Values provided
            are ignored when creating or updating bots.
          deprecated: true
          type: string
        industry:
          type: string
          enum:
            - DENTAL
            - CHIROPRACTIC
            - OPTOMETRY
            - WELLNESS
            - PEDIATRIC
            - PEDIATRIC_DENTISTRY
            - ORTHODONTIST
            - SLEEP_MEDICINE
            - BUSINESS_CONSULTANT
            - MARKETING_COMPANY
        phoneGreeting:
          description: The phone greeting message for the bot
          type: string
        closedChatGreeting:
          description: The closed chat greeting message
          type: string
        closedPhoneGreeting:
          description: The closed phone greeting message
          type: string
        outbound:
          description: Whether the bot is used to make outbound/recare calls
          default: false
          type: boolean
        isRagEnabled:
          description: 'DEPRECATED: This field is ignored. RAG is always disabled.'
          default: false
          deprecated: true
          type: boolean
        isGuardianEnabled:
          description: 'DEPRECATED: This field is ignored. Guardian is always enabled.'
          default: true
          deprecated: true
          type: boolean
        integrationId:
          format: uuid
          description: The integration ID for the bot
          type: string
    BotCreateResponse:
      additionalProperties: false
      type: object
      required:
        - success
        - data
      properties:
        success:
          enum:
            - true
          type: boolean
        data:
          additionalProperties: false
          description: Represents a single Annie bot and its configuration
          type: object
          required:
            - id
            - name
            - internalName
            - createdAt
            - updatedAt
            - companyName
            - industry
            - greeting
            - phoneGreeting
            - closedChatGreeting
            - closedPhoneGreeting
            - outbound
            - isRagEnabled
            - isGuardianEnabled
            - orgId
          properties:
            id:
              format: uuid
              type: string
            name:
              type: string
            internalName:
              type: string
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            companyName:
              description: >-
                DEPRECATED: This field uses the organization's name. Values
                provided are ignored when creating or updating bots.
              deprecated: true
              type: string
              nullable: true
            industry:
              type: string
              enum:
                - DENTAL
                - CHIROPRACTIC
                - OPTOMETRY
                - WELLNESS
                - PEDIATRIC
                - PEDIATRIC_DENTISTRY
                - ORTHODONTIST
                - SLEEP_MEDICINE
                - BUSINESS_CONSULTANT
                - MARKETING_COMPANY
              nullable: true
            greeting:
              type: string
            phoneGreeting:
              type: string
              nullable: true
            closedChatGreeting:
              type: string
              nullable: true
            closedPhoneGreeting:
              type: string
              nullable: true
            outbound:
              description: Whether the bot is used to make outbound/recare calls
              default: false
              type: boolean
            isRagEnabled:
              description: >-
                DEPRECATED: New bots always have this set to false. Updates only
                accept false.
              default: false
              deprecated: true
              type: boolean
            isGuardianEnabled:
              description: >-
                DEPRECATED: New bots always have this set to true. Updates only
                accept true.
              default: true
              deprecated: true
              type: boolean
            orgId:
              format: uuid
              type: string
    BadRequestResponse:
      additionalProperties: false
      type: object
      required:
        - success
        - data
        - message
      properties:
        success:
          enum:
            - false
          type: boolean
        data:
          additionalProperties: false
          type: object
          properties: {}
        message:
          type: string
    ForbiddenResponse:
      additionalProperties: false
      type: object
      required:
        - success
        - data
        - message
      properties:
        success:
          enum:
            - false
          type: boolean
        data:
          additionalProperties: false
          type: object
          properties: {}
        message:
          type: string
    NotFoundResponse:
      additionalProperties: false
      type: object
      required:
        - success
        - data
        - message
      properties:
        success:
          enum:
            - false
          type: boolean
        data:
          additionalProperties: false
          type: object
          properties: {}
        message:
          type: string

````