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

# Update a customer

> Patches an existing customer. Only the fields provided in the request body are modified. Supplying contacts or aliases replaces the full list. The `id` path parameter accepts the Alguna account ID, a customer alias, or a connected-account external ID (such as a Stripe customer ID).



## OpenAPI

````yaml /api-reference/v2/specs/2026-04-01.json patch /customers/{id}
openapi: 3.1.0
info:
  title: Alguna Public API
  version: '2026-04-01'
servers:
  - url: https://api.alguna.io
security:
  - bearerAuth: []
tags:
  - name: Billing Events and Metrics
  - name: Credit Notes
  - name: Credits
  - name: Customer Portal Sessions
  - name: Customers
  - name: Insights
  - name: Invoices
  - name: Payments
  - name: Plans
  - name: Product Bundles
  - name: Products
  - name: Refunds
  - name: Revenue Schedules
  - name: Subscription Changes
  - name: Subscription Versions
  - name: Subscriptions
  - name: Wallet Grants
  - name: Wallets
paths:
  /customers/{id}:
    patch:
      tags:
        - Customers
      summary: Update a customer
      description: >-
        Patches an existing customer. Only the fields provided in the request
        body are modified. Supplying contacts or aliases replaces the full list.
        The `id` path parameter accepts the Alguna account ID, a customer alias,
        or a connected-account external ID (such as a Stripe customer ID).
      operationId: update-customer
      parameters:
        - in: header
          name: Alguna-Version
          required: true
          schema:
            enum:
              - '2026-04-01'
            type: string
        - in: header
          name: Idempotency-Key
          schema:
            description: >-
              A unique string used to ensure the request is processed exactly
              once. If you retry a request with the same idempotency key within
              24 hours, the original response is returned without re-executing
              the operation.
            example: ik_a1b2c3d4e5f6
            maxLength: 255
            type: string
        - in: path
          name: id
          required: true
          schema:
            description: Unique identifier for the customer
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomerRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerResponse'
          description: Success
          headers:
            Idempotency-Key:
              description: Echo of the idempotency key provided in the request
              schema:
                type: string
            Idempotent-Replayed:
              description: >-
                Whether this response was replayed from a previous request
                (true) or freshly executed (false)
              schema:
                type: boolean
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: >-
            Conflict — a request with this idempotency key is currently being
            processed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
components:
  schemas:
    UpdateCustomerRequest:
      properties:
        aliases:
          description: Alternative identifiers for the customer
          items:
            type: string
          nullable: true
          type: array
        billing_address:
          allOf:
            - $ref: '#/components/schemas/AddressRequest'
          description: Customer billing address
          nullable: true
        contacts:
          description: Customer contacts. Replaces all existing contacts when provided
          items:
            $ref: '#/components/schemas/ContactRequest'
          type: array
        currency:
          description: ISO 4217 currency code
          example: USD
          nullable: true
          type: string
        name:
          description: The name of the customer
          example: Acme Corp
          nullable: true
          type: string
      type: object
    CustomerResponse:
      properties:
        aliases:
          description: Alternative identifiers for the customer
          items:
            type: string
          type: array
        billing_address:
          allOf:
            - $ref: '#/components/schemas/AddressResponse'
          description: Customer billing address
          nullable: true
        contacts:
          description: Customer contacts
          items:
            $ref: '#/components/schemas/ContactResponse'
          type: array
        created_at:
          description: Timestamp when the customer was created
          example: '2026-04-01T10:00:00Z'
          format: date-time
          type: string
        currency:
          description: ISO 4217 currency code
          example: USD
          type: string
        id:
          description: Unique identifier for the customer
          example: cust_abc123
          type: string
        name:
          description: Customer name
          example: Acme Corp
          type: string
        tax_country:
          description: ISO 3166-1 alpha-2 country code used for tax determination
          example: DE
          nullable: true
          type: string
        tax_id:
          description: Customer tax identification number
          example: DE123456789
          nullable: true
          type: string
        tax_rate:
          description: >-
            Tax rate applied to the customer, expressed as a decimal fraction
            (0.20 = 20%)
          example: '0.20'
          nullable: true
          type: string
        tax_reason:
          description: Reason determining how tax is applied to the customer
          enum:
            - standard_rated
            - reverse_charge
            - not_collecting
            - customer_exempt
            - zero_rated
            - other
          example: standard_rated
          nullable: true
          type: string
        tax_status:
          description: Customer tax status
          example: taxable
          nullable: true
          type: string
        tax_type:
          description: Type of tax applied to the customer
          enum:
            - gst
            - hst
            - igst
            - jct
            - lease_tax
            - pst
            - qst
            - sales_tax
            - service_tax
            - vat
          example: vat
          nullable: true
          type: string
        updated_at:
          description: Timestamp when the customer was last updated
          example: '2026-04-01T12:30:00Z'
          format: date-time
          type: string
      required:
        - created_at
        - currency
        - id
        - name
        - updated_at
      type: object
    ErrorResponse:
      properties:
        detail:
          type: string
        status:
          format: int64
          type: integer
      required:
        - status
        - detail
      type: object
    AddressRequest:
      properties:
        city:
          description: City
          example: San Francisco
          type: string
        country:
          description: ISO 3166-1 alpha-3 country code
          example: USA
          type: string
        line1:
          description: Street address line 1
          example: 123 Main St
          type: string
        line2:
          description: Street address line 2
          example: Suite 100
          type: string
        postal_code:
          description: Postal or ZIP code
          example: '94105'
          type: string
        state:
          description: State or province
          example: CA
          type: string
      required:
        - city
        - country
        - line1
        - postal_code
        - state
      type: object
    ContactRequest:
      properties:
        email:
          description: Contact email address
          example: john@example.com
          type: string
        email_preferences:
          description: Email notification preferences
          items:
            type: string
          nullable: true
          type: array
        first_name:
          description: Contact first name
          example: John
          nullable: true
          type: string
        id:
          description: Contact ID for updating existing contacts
          nullable: true
          type: string
        is_primary:
          description: Whether this is the primary contact
          example: true
          type: boolean
        last_name:
          description: Contact last name
          example: Doe
          nullable: true
          type: string
      required:
        - email
        - is_primary
      type: object
    AddressResponse:
      properties:
        city:
          description: City
          example: San Francisco
          type: string
        country:
          description: ISO 3166-1 alpha-3 country code
          example: USA
          type: string
        line1:
          description: Street address line 1
          example: 123 Main St
          type: string
        line2:
          description: Street address line 2
          example: Suite 100
          type: string
        postal_code:
          description: Postal or ZIP code
          example: '94105'
          type: string
        state:
          description: State or province
          example: CA
          type: string
      required:
        - city
        - country
        - line1
        - postal_code
        - state
      type: object
    ContactResponse:
      properties:
        email:
          description: Contact email address
          example: john@example.com
          type: string
        email_preferences:
          description: Email notification preferences
          items:
            type: string
          nullable: true
          type: array
        first_name:
          description: Contact first name
          example: John
          nullable: true
          type: string
        id:
          description: Unique identifier for the contact
          example: cont_abc123
          type: string
        is_primary:
          description: Whether this is the primary contact
          example: true
          type: boolean
        last_name:
          description: Contact last name
          example: Doe
          nullable: true
          type: string
      required:
        - email
        - id
        - is_primary
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: API Key
      description: API key authentication. Pass your API key as a Bearer token.
      scheme: bearer
      type: http

````