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

# Update Customer

> Update an existing



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/billing/customer/
openapi: 3.1.0
info:
  title: Diga API
  version: 0.1.0
servers:
  - url: https://api.diga.io
    description: Production
security: []
paths:
  /v1/billing/customer/:
    patch:
      tags:
        - Billing - Customers
      summary: Update Customer
      description: Update an existing
      operationId: update_customer_v1_billing_customer__patch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerRequestSchema'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerResponseSchema'
        '403':
          description: Forbidden - Insufficient permissions
          content:
            application/json:
              example:
                status: error
                error_code: INTERNAL_SERVER_ERROR
                message: Missing required permissions
              schema:
                $ref: '#/components/schemas/ErrorResponseSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Default Payment Method Not Allowed On Create
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseSchema'
              example:
                status: error
                error_code: DEFAULT_PAYMENT_METHOD_NOT_ALLOWED_ON_CREATE
                message: 'Error: Default Payment Method Not Allowed On Create'
      security:
        - CustomHTTPBearer: []
components:
  schemas:
    CustomerRequestSchema:
      properties:
        address:
          anyOf:
            - $ref: '#/components/schemas/AddressSchema'
            - type: 'null'
          title: Address
          description: >-
            The customer's address. Check more at
            https://docs.stripe.com/api/customers/object?api-version=2025-09-30.clover#customer_object-address
        email:
          anyOf:
            - type: string
              format: email
            - type: 'null'
          title: Email
          description: >-
            The customer's email address. Check more at
            https://docs.stripe.com/api/customers/object?api-version=2025-09-30.clover#customer_object-email
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: >-
            The customer's name. Check more at
            https://docs.stripe.com/api/customers/object?api-version=2025-09-30.clover#customer_object-name
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
          description: >-
            The customer's phone number. Check more at
            https://docs.stripe.com/api/customers/object?api-version=2025-09-30.clover#customer_object-phone
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: >-
            A set of key-value pairs that can be attached to a customer object.
            Check more at
            https://docs.stripe.com/api/customers/object?api-version=2025-09-30.clover#customer_object-metadata
        default_payment_method_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Default Payment Method ID
          description: The ID of the default payment method for the customer.
      type: object
      title: CustomerRequestSchema
    CustomerResponseSchema:
      properties:
        address:
          anyOf:
            - $ref: '#/components/schemas/AddressSchema'
            - type: 'null'
          title: Address
          description: >-
            The customer's address. Check more at
            https://docs.stripe.com/api/customers/object?api-version=2025-09-30.clover#customer_object-address
        email:
          anyOf:
            - type: string
              format: email
            - type: 'null'
          title: Email
          description: >-
            The customer's email address. Check more at
            https://docs.stripe.com/api/customers/object?api-version=2025-09-30.clover#customer_object-email
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: >-
            The customer's name. Check more at
            https://docs.stripe.com/api/customers/object?api-version=2025-09-30.clover#customer_object-name
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
          description: >-
            The customer's phone number. Check more at
            https://docs.stripe.com/api/customers/object?api-version=2025-09-30.clover#customer_object-phone
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: >-
            A set of key-value pairs that can be attached to a customer object.
            Check more at
            https://docs.stripe.com/api/customers/object?api-version=2025-09-30.clover#customer_object-metadata
        default_payment_method_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Default Payment Method ID
          description: The ID of the default payment method for the customer.
        id:
          type: string
          title: Customer ID
          description: Unique identifier for the customer
      type: object
      required:
        - id
      title: CustomerResponseSchema
    ErrorResponseSchema:
      properties:
        status:
          type: string
          title: Status
          description: Status of the response, always 'error' for error responses
          default: error
        error_code:
          type: string
          title: Error Code
          description: Machine-readable error code in SCREAMING_SNAKE_CASE format
          examples:
            - PROJECT_NOT_FOUND
            - INVALID_EMAIL
            - UNAUTHORIZED_ROLE
        message:
          type: string
          title: Message
          description: Human-readable error message with details
          examples:
            - Project with id 550e8400-e29b-41d4-a716-446655440000 not found
            - The email invalid@email is not valid
            - Insufficient permissions to perform this action
      type: object
      required:
        - error_code
        - message
      title: ErrorResponseSchema
      description: Standard error response format for all API errors.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AddressSchema:
      properties:
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
        line1:
          anyOf:
            - type: string
            - type: 'null'
          title: Line1
        line2:
          anyOf:
            - type: string
            - type: 'null'
          title: Line2
        postal_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Postal Code
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
      type: object
      title: AddressSchema
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    CustomHTTPBearer:
      type: http
      scheme: bearer

````