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

# Create customers

> Create a new customer

<Note>
  **SystemUser permission:** `CustomerService:createCustomer,
      EntityService:createEntity`
</Note>


## OpenAPI

````yaml post /customers
openapi: 3.0.3
info:
  title: Enso API
  description: >-
    REST API for Enso's billing & metering platform. This reference covers
    endpoints accessible to the SystemUser role — the role used by API
    integrations.
  version: 1.0.0
  license:
    name: Proprietary
servers:
  - url: https://api.getenso.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Apps
    description: Third-party app integrations and credentials
  - name: Attributes
    description: Custom attribute definitions on catalog/customer entities
  - name: Auth
    description: Exchange API credentials for an access token
  - name: Billing
    description: Plans and plan items — what your contracts apply
  - name: Catalog
    description: SKUs and SKU groups — the product taxonomy that plans price against
  - name: Chatbot
    description: Conversational endpoints
  - name: Collections
    description: ''
  - name: Contracts
    description: Contracts that bind a customer to one or more billing plans
  - name: Customers
    description: Manage customer records — the parties Enso bills
  - name: Email templates
    description: Manage email templates
  - name: Entities
    description: Entities (legal entity, contracting organisation) used in billing
  - name: Events
    description: Raw event ingestion — the input to the metering pipeline
  - name: FSM (object lifecycle)
    description: >-
      Drive lifecycle transitions on Invoice/Contract/etc. — used for raise,
      send, mark-paid, etc.
  - name: FX Rates
    description: Currency conversion rates
  - name: Geography
    description: Country/state lookups — reference data for addresses
  - name: Invoices
    description: Invoice CRUD, items, sync, PDF generation, document upload
  - name: Jobs
    description: >-
      Background job orchestration — used by long-running operations like bulk
      sync
  - name: Masters
    description: ''
  - name: Meters
    description: Usage meters — the per-aggregation tally that feeds invoices
  - name: Objects
    description: Generic object schema and query — exposes the data model dynamically
  - name: Organisation
    description: ''
  - name: Organisation attributes
    description: Organisation-level custom attributes
  - name: Organisation settings
    description: Organisation-wide configuration values
  - name: Revenue
    description: Recognised revenue records derived from invoices
  - name: Usage
    description: Usage records — what got billed against each meter for a billing period
  - name: Users
    description: User account read access
paths:
  /customers:
    post:
      tags:
        - Customers
      summary: Create customers
      description: Create a new customer
      operationId: createCustomer
      requestBody:
        description: Customer object that needs to be created
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
      responses:
        '400':
          description: Bad request — validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: Unauthorized — token missing or invalid
        '403':
          description: Forbidden — insufficient permissions
components:
  schemas:
    Customer:
      type: object
      properties:
        name:
          type: string
          example: Acme Corp
        entity:
          $ref: '#/components/schemas/ContractEntity'
      required:
        - name
        - entity
    ErrorEnvelope:
      type: object
      properties:
        status:
          type: string
          example: error
        message:
          type: string
          example: Forbidden
        errors:
          type: array
          items:
            type: object
    ContractEntity:
      type: object
      properties:
        legalName:
          type: string
          example: Acme Corporation Private Limited
        alias:
          type: string
          example: Acme
        email:
          type: array
          items:
            type: string
            format: email
          example:
            - billing@acme.com
        phoneNumber:
          type: string
          example: '9876543210'
        Addresses:
          type: array
          items:
            $ref: '#/components/schemas/ContractAddress'
      required:
        - legalName
        - alias
    ContractAddress:
      type: object
      description: >-
        State is optional and independent of Country - either State or Country
        (or both) may be provided.
      properties:
        address1:
          type: string
          example: 123 Business Park Road
        address2:
          type: string
          example: Floor 5, Tower B
        city:
          type: string
          example: Bengaluru
        zip:
          type: string
          example: '560001'
        taxId:
          type: string
          example: 29ABCDE1234F1Z5
        State:
          $ref: '#/components/schemas/ContractState'
        Country:
          $ref: '#/components/schemas/ContractCountry'
          description: Used instead of State when the address has no state/province.
      required:
        - address1
        - city
        - zip
    ContractState:
      type: object
      properties:
        name:
          type: string
          example: Karnataka
        code:
          type: string
          example: KA
        Country:
          $ref: '#/components/schemas/ContractCountry'
      required:
        - name
        - Country
    ContractCountry:
      type: object
      properties:
        name:
          type: string
          example: India
        iso2:
          type: string
          example: IN
        iso3:
          type: string
          example: IND
      required:
        - name
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT bearer token obtained from POST /auth/system-login using your client
        credentials.

````