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

# Create invoice

> Create a draft invoice.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/invoices
openapi: 3.1.0
info:
  title: Bizzy API
  version: 1.0.0
  description: Bizzy API for managing businesses, customers, contacts, and more.
servers:
  - url: https://api.bizzyco.ai
    description: Production
security: []
tags:
  - name: Automations
    description: Manage workflow automation rules
    x-group: Automations
  - name: Automation Executions
    description: View automation execution history
    x-group: Automations
  - name: Businesses
    description: Manage business profiles
    x-group: Businesses
  - name: Business Offerings
    description: Manage products and services offered by businesses
    x-group: Businesses
  - name: Business Online Presences
    description: Manage websites and social media links
    x-group: Businesses
  - name: Business Physical Presences
    description: Manage physical locations and addresses
    x-group: Businesses
  - name: Business Profile
    description: View and update business profile details
    x-group: Businesses
  - name: Contacts
    description: Manage contact records
    x-group: Contacts
  - name: Contact Addresses
    description: Manage mailing addresses for contacts
    x-group: Contacts
  - name: Contact Emails
    description: Manage email addresses for contacts
    x-group: Contacts
  - name: Contact Phone Numbers
    description: Manage phone numbers for contacts
    x-group: Contacts
  - name: Customers
    description: Manage customer records
    x-group: Customers
  - name: Customer Transactions
    description: View customer transaction history
    x-group: Customers
  - name: Domains
    description: Manage domain names
    x-group: Domains
  - name: Domain Contacts
    description: Manage contacts associated with domains
    x-group: Domains
  - name: Domain Registrations
    description: Manage domain registration records
    x-group: Domains
  - name: Email Templates
    description: Manage reusable email templates
    x-group: Email Templates
  - name: Files
    description: Manage file uploads and downloads
    x-group: Files
  - name: File Access Links
    description: Manage shareable file access links
    x-group: Files
  - name: Folders
    description: Organize files into folders
    x-group: Files
  - name: Messages
    description: Manage email messages
    x-group: Messages
  - name: Message Attachments
    description: Access message file attachments
    x-group: Messages
  - name: Message Contacts
    description: View contacts associated with messages
    x-group: Messages
  - name: Tasks
    description: Manage task records
    x-group: Tasks
  - name: Task Assignees
    description: Manage user assignments to tasks
    x-group: Tasks
  - name: Task Activity
    description: View task activity and change history
    x-group: Tasks
paths:
  /v1/invoices:
    post:
      tags:
        - Invoices
      summary: Create invoice
      description: Create a draft invoice.
      operationId: createInvoice
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 255
            description: >-
              Key that makes this request safe to retry. Reuse the same value
              when retrying a request that may already have succeeded — the
              original response is replayed with an `Idempotency-Replay: true`
              header. Use a new value for a new operation.
            example: 9f8c2b1a-4d3e-4a6b-8c1d-2e3f4a5b6c7d
          required: false
          description: >-
            Key that makes this request safe to retry. Reuse the same value when
            retrying a request that may already have succeeded — the original
            response is replayed with an `Idempotency-Replay: true` header. Use
            a new value for a new operation.
          name: idempotency-key
          in: header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceCreate'
      responses:
        '201':
          description: Invoice created successfully
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Maximum burst of requests the tier allows per minute
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: Requests remaining in the current window after this request
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Seconds until the allowance is fully replenished
            Idempotency-Replay:
              schema:
                type: boolean
              description: >-
                Present and `true` when this response is a replay of an earlier
                request with the same Idempotency-Key
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Invoice'
                  meta:
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            type: number
                          limit:
                            type: number
                          offset:
                            type: number
                          hasMore:
                            type: boolean
                        required:
                          - limit
                          - offset
                          - hasMore
                required:
                  - data
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: Insufficient permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: >-
            A request with this Idempotency-Key is still in progress (error code
            IDEMPOTENCY_KEY_IN_FLIGHT)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: >-
            This Idempotency-Key was already used for a different request (error
            code IDEMPOTENCY_KEY_REUSED)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: Rate limit exceeded for the account tier (error code RATE_LIMITED)
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Maximum burst of requests the tier allows per minute
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: Requests remaining in the current window after this request
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Seconds until the allowance is fully replenished
            Retry-After:
              schema:
                type: integer
              description: Seconds to wait before the next request will be accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - bearerAuth: []
components:
  schemas:
    InvoiceCreate:
      type: object
      properties:
        businessId:
          type: string
          format: uuid
        customerId:
          type: string
          format: uuid
        billToName:
          type:
            - string
            - 'null'
        billToEmail:
          type:
            - string
            - 'null'
        billToAddressLine1:
          type:
            - string
            - 'null'
        billToAddressLine2:
          type:
            - string
            - 'null'
        billToCity:
          type:
            - string
            - 'null'
        billToState:
          type:
            - string
            - 'null'
        billToPostalCode:
          type:
            - string
            - 'null'
        billToCountry:
          type:
            - string
            - 'null'
        dueAt:
          type:
            - string
            - 'null'
          format: date-time
        notes:
          type:
            - string
            - 'null'
        terms:
          type:
            - string
            - 'null'
        data:
          type:
            - object
            - 'null'
          additionalProperties: {}
        currency:
          type: string
          enum:
            - aed
            - afn
            - all
            - amd
            - ang
            - aoa
            - ars
            - aud
            - awg
            - azn
            - bam
            - bbd
            - bdt
            - bgn
            - bhd
            - bif
            - bmd
            - bnd
            - bob
            - bov
            - brl
            - bsd
            - btn
            - bwp
            - byn
            - bzd
            - cad
            - cdf
            - che
            - chf
            - chw
            - clf
            - clp
            - cny
            - cop
            - cou
            - crc
            - cup
            - cve
            - czk
            - djf
            - dkk
            - dop
            - dzd
            - egp
            - ern
            - etb
            - eur
            - fjd
            - fkp
            - gbp
            - gel
            - ghs
            - gip
            - gmd
            - gnf
            - gtq
            - gyd
            - hkd
            - hnl
            - htg
            - huf
            - idr
            - ils
            - inr
            - iqd
            - irr
            - isk
            - jmd
            - jod
            - jpy
            - kes
            - kgs
            - khr
            - kmf
            - kpw
            - krw
            - kwd
            - kyd
            - kzt
            - lak
            - lbp
            - lkr
            - lrd
            - lsl
            - lyd
            - mad
            - mdl
            - mga
            - mkd
            - mmk
            - mnt
            - mop
            - mru
            - mur
            - mvr
            - mwk
            - mxn
            - mxv
            - myr
            - mzn
            - nad
            - ngn
            - nio
            - nok
            - npr
            - nzd
            - omr
            - pab
            - pen
            - pgk
            - php
            - pkr
            - pln
            - pyg
            - qar
            - ron
            - rsd
            - rub
            - rwf
            - sar
            - sbd
            - scr
            - sdg
            - sek
            - sgd
            - shp
            - sle
            - sos
            - srd
            - ssp
            - stn
            - svc
            - syp
            - szl
            - thb
            - tjs
            - tmt
            - tnd
            - top
            - try
            - ttd
            - twd
            - tzs
            - uah
            - ugx
            - usd
            - usn
            - uyi
            - uyu
            - uyw
            - uzs
            - ved
            - ves
            - vnd
            - vuv
            - wst
            - xaf
            - xcd
            - xcg
            - xdr
            - xof
            - xpf
            - xsu
            - xua
            - yer
            - zar
            - zmw
            - zwg
      required:
        - businessId
        - customerId
      additionalProperties: false
    Invoice:
      type: object
      properties:
        id:
          type: string
          format: uuid
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type:
            - string
            - 'null'
          format: date-time
        organizationId:
          type: string
          format: uuid
        businessId:
          type: string
          format: uuid
        customerId:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - draft
            - open
            - paid
            - void
            - uncollectible
        invoiceNumber:
          type: string
        billToName:
          type:
            - string
            - 'null'
        billToEmail:
          type:
            - string
            - 'null'
        billToAddressLine1:
          type:
            - string
            - 'null'
        billToAddressLine2:
          type:
            - string
            - 'null'
        billToCity:
          type:
            - string
            - 'null'
        billToState:
          type:
            - string
            - 'null'
        billToPostalCode:
          type:
            - string
            - 'null'
        billToCountry:
          type:
            - string
            - 'null'
        totalAmountCents:
          type: integer
        currency:
          type: string
        issuedAt:
          type:
            - string
            - 'null'
          format: date-time
        dueAt:
          type:
            - string
            - 'null'
          format: date-time
        overdueAt:
          type:
            - string
            - 'null'
          format: date-time
        notes:
          type:
            - string
            - 'null'
        terms:
          type:
            - string
            - 'null'
        data:
          type:
            - object
            - 'null'
          additionalProperties: {}
        lineItems:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineItem'
      required:
        - id
        - createdAt
        - updatedAt
        - deletedAt
        - organizationId
        - businessId
        - customerId
        - status
        - invoiceNumber
        - billToName
        - billToEmail
        - billToAddressLine1
        - billToAddressLine2
        - billToCity
        - billToState
        - billToPostalCode
        - billToCountry
        - totalAmountCents
        - currency
        - issuedAt
        - dueAt
        - overdueAt
        - notes
        - terms
        - data
        - lineItems
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
            details: {}
          required:
            - message
            - code
      required:
        - error
    InvoiceLineItem:
      type: object
      properties:
        id:
          type: string
          format: uuid
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type:
            - string
            - 'null'
          format: date-time
        organizationId:
          type: string
          format: uuid
        invoiceId:
          type: string
          format: uuid
        description:
          type: string
        quantity:
          type: string
        unitAmountCents:
          type: integer
        amountCents:
          type: integer
        currency:
          type: string
        position:
          type: integer
          minimum: 0
          maximum: 2147483647
      required:
        - id
        - createdAt
        - updatedAt
        - deletedAt
        - organizationId
        - invoiceId
        - description
        - quantity
        - unitAmountCents
        - amountCents
        - currency
        - position
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key authentication via Bearer token

````