> ## 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.

# Update a customer

> Updates an existing customer's information.
    
This endpoint allows you to modify customer details while preserving their core information.

## Use Cases
- Update customer contact information
- Change customer type
- Modify customer status

## Path Parameters
- `id`: Customer UUID (required) - Must be a valid UUID format

## Example Request
`PATCH /api/v0/customers/123e4567-e89b-12d3-a456-426614174000`

## Example Request Body
```json
{
  "first_name": "John",
  "last_name": "Smith",
  "phone_number": "+1-987-654-3210",
  "customer_type": "Small Business"
}
```

## Notes
- Only include fields that need to be updated
- All fields are optional in updates
- Status changes may require additional verification



## OpenAPI

````yaml /swagger.yml patch /api/v0/customers/{id}
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/{id}:
    patch:
      tags:
        - Customers
      summary: Update a customer
      description: >-
        Updates an existing customer's information.
            
        This endpoint allows you to modify customer details while preserving
        their core information.


        ## Use Cases

        - Update customer contact information

        - Change customer type

        - Modify customer status


        ## Path Parameters

        - `id`: Customer UUID (required) - Must be a valid UUID format


        ## Example Request

        `PATCH /api/v0/customers/123e4567-e89b-12d3-a456-426614174000`


        ## Example Request Body

        ```json

        {
          "first_name": "John",
          "last_name": "Smith",
          "phone_number": "+1-987-654-3210",
          "customer_type": "Small Business"
        }

        ```


        ## Notes

        - Only include fields that need to be updated

        - All fields are optional in updates

        - Status changes may require additional verification
      operationId: CustomerController_update
      parameters:
        - name: id
          required: true
          in: path
          description: Customer unique identifier (UUID)
          schema:
            format: uuid
            example: cust_123e4567-e89b-12d3-a456-426614174000
            type: string
      requestBody:
        required: true
        description: Customer update data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomerDto'
      responses:
        '200':
          description: Successfully updated customer
        '400':
          description: Bad Request - Invalid input data or customer ID format
        '401':
          description: Unauthorized - Invalid API credentials
        '404':
          description: Not Found - Customer not found
      security:
        - x-client-secret: []
        - x-client-key: []
components:
  schemas:
    UpdateCustomerDto:
      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'
    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.

````