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

# Create a new customer

> Creates a new customer in the system with their personal and contact information.
    
This endpoint allows you to register new customers and store their details for future transactions.

## Use Cases
- Register new customers for payment processing
- Store customer information for recurring payments
- Maintain customer profiles for transaction history

## Example: Create New Customer
```json
{
  "first_name": "John",
  "last_name": "Doe",
  "email": "john.doe@example.com",
  "phone_number": "+1-555-123-4567",
  "customer_type": "Startup",
  "status": "ACTIVE"
}
```

## Required Fields
- `first_name`: Customer's first name (1-100 characters)
- `last_name`: Customer's last name (1-100 characters)
- `phone_number`: Customer's phone number (max 20 characters)

## Optional Fields
- `email`: Valid email address (max 255 characters)
- `customer_type`: Type of customer account (Individual, Startup, Small Business, Medium Business, Enterprise, Non-Profit, Government)
- `status`: Customer status (ACTIVE, BLACKLISTED, DEACTIVATED)



## OpenAPI

````yaml /swagger.yml post /api/v0/customers
openapi: 3.0.0
info:
  title: Devdraft AI Payment & Business Management API
  description: >-

    A comprehensive payment processing and business management API that enables
    seamless integration of cryptocurrency and traditional payment methods.
        
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.devdraft.ai
    description: Production Server
security: []
tags: []
paths:
  /api/v0/customers:
    post:
      tags:
        - Customers
      summary: Create a new customer
      description: >-
        Creates a new customer in the system with their personal and contact
        information.
            
        This endpoint allows you to register new customers and store their
        details for future transactions.


        ## Use Cases

        - Register new customers for payment processing

        - Store customer information for recurring payments

        - Maintain customer profiles for transaction history


        ## Example: Create New Customer

        ```json

        {
          "first_name": "John",
          "last_name": "Doe",
          "email": "john.doe@example.com",
          "phone_number": "+1-555-123-4567",
          "customer_type": "Startup",
          "status": "ACTIVE"
        }

        ```


        ## Required Fields

        - `first_name`: Customer's first name (1-100 characters)

        - `last_name`: Customer's last name (1-100 characters)

        - `phone_number`: Customer's phone number (max 20 characters)


        ## Optional Fields

        - `email`: Valid email address (max 255 characters)

        - `customer_type`: Type of customer account (Individual, Startup, Small
        Business, Medium Business, Enterprise, Non-Profit, Government)

        - `status`: Customer status (ACTIVE, BLACKLISTED, DEACTIVATED)
      operationId: CustomerController_create
      parameters: []
      requestBody:
        required: true
        description: Customer creation data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomerDto'
      responses:
        '201':
          description: Customer created successfully
        '400':
          description: Bad Request - Invalid input data
        '401':
          description: Unauthorized - Invalid API credentials
        '409':
          description: Conflict - Customer with the same email already exists
      security:
        - x-client-secret: []
        - x-client-key: []
components:
  schemas:
    CreateCustomerDto:
      type: object
      properties:
        first_name:
          type: string
          description: >-
            Customer's first name. Used for personalization and legal
            documentation.
          example: John
          minLength: 1
          maxLength: 100
        last_name:
          type: string
          description: >-
            Customer's last name. Used for personalization and legal
            documentation.
          example: Doe
          minLength: 1
          maxLength: 100
        email:
          type: string
          description: >-
            Customer's email address. Used for notifications, receipts, and
            account management. Must be a valid email format.
          example: john.doe@example.com
          format: email
        phone_number:
          type: string
          description: >-
            Customer's phone number. Used for SMS notifications and
            verification. Include country code for international numbers.
          example: +1-555-123-4567
          pattern: ^[+]?[1-9]\d{1,14}$
        customer_type:
          description: >-
            Type of customer account. Determines available features and
            compliance requirements.
          example: Individual
          default: Individual
          allOf:
            - $ref: '#/components/schemas/CustomerType'
        status:
          description: >-
            Current status of the customer account. Controls access to services
            and features.
          default: ACTIVE
          example: ACTIVE
          allOf:
            - $ref: '#/components/schemas/CustomerStatus'
      required:
        - first_name
        - last_name
        - phone_number
    CustomerType:
      type: string
      enum:
        - Individual
        - Startup
        - Small Business
        - Medium Business
        - Enterprise
        - Non-Profit
        - Government
      description: >-
        Type of customer account. Determines available features and compliance
        requirements.
    CustomerStatus:
      type: string
      enum:
        - ACTIVE
        - BLACKLISTED
        - DEACTIVATED
        - DELETED
      description: >-
        Current status of the customer account. Controls access to services and
        features.
  securitySchemes:
    x-client-secret:
      type: apiKey
      in: header
      name: x-client-secret
      description: >-
        Your secret API key. Keep this secure and never expose it in client-side
        code.
    x-client-key:
      type: apiKey
      in: header
      name: x-client-key
      description: Your unique client API key. Obtain this from your Devdraft AI dashboard.

````