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

# Create a new customer



## OpenAPI

````yaml POST /external/customer
openapi: 3.1.0
info:
  title: OpenAPI Valyx API
  description: To demonstrate features in the Valyx
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.valyx.com
security:
  - bearerAuth:
      - demo-api
tags:
  - name: billing
    description: External Billing APIs
  - name: external
    description: External APIs for customers
  - name: invoice
    description: Invoice APIs
  - name: creditNote
    description: Credit Note APIs
paths:
  /external/customer:
    post:
      tags:
        - external
      summary: Create customer with its tags, internal stakeholders and contacts
      operationId: post_customer_create_route
      parameters:
        - name: X-Valyx-Signature
          in: header
          required: true
          schema:
            type: string
          description: Auth key for creating customers
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateExternalCustomer'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties: {}
components:
  schemas:
    CreateExternalCustomer:
      properties:
        customer:
          $ref: '#/components/schemas/CreateExternalCustomerModel'
      type: object
    CreateExternalCustomerModel:
      required:
        - isManuallyCreated
      properties:
        companyId:
          type: string
          description: companyId
        name:
          type: string
          description: name
        alias:
          type: string
          description: alias
        registeredAddress:
          $ref: '#/components/schemas/CreateExternalCustomerModelregisteredAddress'
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/CreateExternalCustomerModeladdresses'
        contactsData:
          type: array
          items:
            $ref: '#/components/schemas/CreateExternalCustomerModelcontactsData'
        ownersData:
          type: array
          items:
            $ref: '#/components/schemas/CreateExternalCustomerModelownersData'
        stateCode:
          type: string
          description: stateCode
        countryCode:
          type: string
          description: countryCode
          default: IN
        country:
          type: string
          description: country
        primaryPhone:
          type: string
          description: primaryPhone
        primaryEmail:
          type: string
          description: primaryEmail
        taxIdentifiers:
          type: array
          items:
            $ref: '#/components/schemas/CreateExternalCustomerModeltaxIdentifiers'
        customerContactPerson:
          type: string
          description: customerContactPerson
        currency:
          type: string
          description: currency
          default: INR
        currencyId:
          type: string
          description: currencyId
        tags:
          type: object
        metaData:
          type: object
        isManuallyCreated:
          type: boolean
          description: isManuallyCreated
          default: true
        customerStatus:
          type: string
          example: PROSPECT
          enum:
            - PROSPECT
            - LIVE
            - CHURNED
            - INACTIVE
        upcomingCustomerStatus:
          type: string
          example: PROSPECT
          enum:
            - PROSPECT
            - LIVE
            - CHURNED
            - INACTIVE
        upcomingCustomerStatusChangeDate:
          type: string
          format: date
          description: upcomingCustomerStatusChangeDate
        upcomingCustomerStatusChangeReason:
          type: string
          description: upcomingCustomerStatusChangeReason
        upcomingCustomerStatusChangeByUserid:
          type: string
          description: upcomingCustomerStatusChangeByUserid
        erpId:
          type: string
          description: erpId
      type: object
    CreateExternalCustomerModelregisteredAddress:
      properties:
        line1:
          type: string
          description: line1
        line2:
          type: string
          description: line2
        state:
          type: string
          description: state
        city:
          type: string
          description: city
        country:
          type: string
          description: country
        zipCode:
          type: string
          description: zipCode
      type: object
    CreateExternalCustomerModeladdresses:
      properties:
        line1:
          type: string
          description: line1
        line2:
          type: string
          description: line2
        state:
          type: string
          description: state
        city:
          type: string
          description: city
        country:
          type: string
          description: country
        zipCode:
          type: string
          description: zipCode
      type: object
    CreateExternalCustomerModelcontactsData:
      required:
        - id
        - name
        - primaryEmail
        - primaryPhone
        - role
      properties:
        id:
          type: string
          description: id
        name:
          type: string
          description: name
        primaryPhone:
          type: string
          description: primaryPhone
        primaryEmail:
          type: string
          description: primaryEmail
        role:
          type: string
          description: role
      type: object
    CreateExternalCustomerModelownersData:
      required:
        - id
        - name
        - primaryEmail
        - primaryPhone
      properties:
        id:
          type: string
          description: id
        name:
          type: string
          description: name
        primaryPhone:
          type: string
          description: primaryPhone
        primaryEmail:
          type: string
          description: primaryEmail
        role:
          type: string
          description: role
        isRegistered:
          type: boolean
          description: isRegistered
          default: false
      type: object
    CreateExternalCustomerModeltaxIdentifiers:
      required:
        - value
      properties:
        value:
          type: string
          description: value
        type:
          type: string
          example: GSTIN
          enum:
            - GSTIN
            - PAN
            - VAT
            - OTHER
      type: object

````