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

# Create a new customer

> **Scopes:** `customer:create`



## OpenAPI

````yaml /api-reference/openapi.json post /v0/business/{business_id}/customers
openapi: 3.1.0
info:
  title: Asset API
  version: '0.1'
servers:
  - url: https://api.sandbox.getasset.com
    description: Sandbox
  - url: https://api.getasset.com
    description: Production
security: []
paths:
  /v0/business/{business_id}/customers:
    post:
      tags:
        - Customer
      summary: Create a new customer
      description: '**Scopes:** `customer:create`'
      operationId: create_customer_v0_business__business_id__customers_post
      parameters:
        - name: business_id
          in: path
          required: true
          schema:
            type: string
            format: biz_string
            title: Business Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomerRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerSuccess'
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Content
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Service Unavailable
      security:
        - OAuth2PasswordBearer:
            - customer:create
components:
  schemas:
    CreateCustomerRequest:
      properties:
        external_id:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: External Id
          description: The external ID of the customer
        name:
          type: string
          maxLength: 255
          title: Name
          description: The name of the customer
        email:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Email
          description: The email address of the customer
        billing_address:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
          description: The billing address of the customer
        shipping_address:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
          description: The shipping address of the customer
        phone_number:
          anyOf:
            - type: string
              maxLength: 32
            - type: 'null'
          title: Phone Number
          description: The phone number of the customer
      type: object
      required:
        - name
      title: CreateCustomerRequest
    CustomerSuccess:
      properties:
        data:
          $ref: '#/components/schemas/Customer'
      type: object
      required:
        - data
      title: CustomerSuccess
    ErrorResponse:
      properties:
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: A description of the error
        data:
          title: Data
          description: Data associated with the error
      type: object
      required:
        - error
        - data
      title: ErrorResponse
    Address:
      properties:
        street_1:
          type: string
          maxLength: 255
          title: Street 1
          description: The street address - line 1
        street_2:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Street 2
          description: The street address - line 2
        city:
          type: string
          maxLength: 100
          title: City
          description: The city
        state:
          type: string
          maxLength: 100
          title: State
          description: The state or province
        postal_code:
          type: string
          maxLength: 20
          title: Postal Code
          description: The postal or zip code
        country:
          type: string
          maxLength: 100
          title: Country
          description: The country
      type: object
      required:
        - street_1
        - city
        - state
        - postal_code
        - country
      title: Address
    Customer:
      properties:
        external_id:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: External Id
          description: The external ID of the customer
        name:
          type: string
          maxLength: 255
          title: Name
          description: The name of the customer
        email:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Email
          description: The email address of the customer
        billing_address:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
          description: The billing address of the customer
        shipping_address:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
          description: The shipping address of the customer
        phone_number:
          anyOf:
            - type: string
              maxLength: 32
            - type: 'null'
          title: Phone Number
          description: The phone number of the customer
        id:
          type: string
          format: cus_string
          title: Id
          description: The ID of the customer
        is_disabled:
          type: boolean
          title: Is Disabled
          description: Whether the customer is disabled
      type: object
      required:
        - name
        - id
        - is_disabled
      title: Customer
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /v0/auth/token

````