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

# Update customer

> This endpoint allows updating a customer by id.



## OpenAPI

````yaml /api-reference/openapi.yaml put /v1/customers/{id}
openapi: 3.1.0
info:
  title: API Reference
  version: '1.0'
  description: Aira API Reference
  x-logo:
    url: https://static.useaira.com/images/airalogo.svg
    backgroundColor: '#FFFFFF'
    altText: Aira Logo
servers:
  - url: https://api.useaira.com
    description: API base URL
security:
  - ApiKey: []
paths:
  /v1/customers/{id}:
    put:
      tags:
        - Customers
      summary: Update customer
      description: This endpoint allows updating a customer by id.
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
          description: The unique identifier of the customer in our system.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                externalId:
                  description: >-
                    An optional external identifier of the customer from the
                    external system, used throughout the system to identify the
                    customer.
                  type: string
                  pattern: ^[a-zA-Z0-9_-]+$
                  example: 705faf65-9c8b-4053-8c0b-2021281ce83f
                name:
                  description: The name of the customer.
                  type: string
                  example: Acme Inc.
                customFields:
                  type: object
                  description: >-
                    Custom fields that can be associated with the entity. The
                    fields must be previously created in the system before they
                    can be used.
                  additionalProperties:
                    anyOf:
                      - type: string
                      - type: array
                        items:
                          type: string
                  default: {}
                  example:
                    customField1: value1
                    customField2:
                      - value2
                      - value3
              required:
                - name
              additionalProperties: false
        required: true
        description: Schema representing a customer.
      responses:
        '200':
          description: Schema representing a customer.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    description: The unique identifier of the customer in our system.
                    type: string
                    format: uuid
                  externalId:
                    description: >-
                      An optional external identifier of the customer from the
                      external system, used throughout the system to identify
                      the customer.
                    type: string
                    pattern: ^[a-zA-Z0-9_-]+$
                    example: 705faf65-9c8b-4053-8c0b-2021281ce83f
                  name:
                    description: The name of the customer.
                    type: string
                    example: Acme Inc.
                  invoicePrefix:
                    description: >-
                      The prefix of the customer's invoices. This is generated
                      by the system and cannot be updated.
                    type: string
                    example: ACMEI
                  type:
                    description: Customer type in organizations hierarchy.
                    type: string
                    enum:
                      - individual
                      - organization
                      - subsidiary
                    example: individual
                  parentCustomerId:
                    description: Parent customer ID when customer is a subsidiary.
                    type:
                      - 'null'
                      - string
                    format: uuid
                  archivedAt:
                    description: Archive timestamp for customers that were archived.
                    type:
                      - 'null'
                      - string
                    format: date-time
                  customFields:
                    type: object
                    description: >-
                      Custom fields that can be associated with the entity. The
                      fields must be previously created in the system before
                      they can be used.
                    additionalProperties:
                      anyOf:
                        - type: string
                        - type: array
                          items:
                            type: string
                    default: {}
                    example:
                      customField1: value1
                      customField2:
                        - value2
                        - value3
                required:
                  - id
                  - externalId
                  - name
                  - type
                additionalProperties: false
        '404':
          description: Error object returned to the client when a resource is not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: A human-readable description of the error
        '409':
          description: >-
            Error object returned to the client when the request conflicts with
            the current state of the resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: A human-readable description of the error
                  code:
                    type: string
                    description: A unique identifier for the type of error
                  details:
                    oneOf:
                      - type: object
                        additionalProperties: true
                      - type: array
                    description: >-
                      Additional context about the conflict, such as the
                      references that block the operation
                  causations:
                    type: array
                    description: >-
                      Optional array of error objects following the same
                      structure as the parent error
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          description: >-
                            A human-readable description of the underlying error
                            cause
                        code:
                          type: string
                          description: A unique identifier for the type of underlying error
                        details:
                          type: object
                          additionalProperties: true
                          description: Additional context about the underlying error
                      required:
                        - message
                        - code
                      additionalProperties: false
                required:
                  - code
                  - message
                additionalProperties: false
components:
  securitySchemes:
    ApiKey:
      type: apiKey
      description: API Key Authentication.
      name: X-API-KEY
      in: header

````