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

# Update a customer



## OpenAPI

````yaml openapi-core.json POST /v1/customers/{id}
openapi: 3.1.0
info:
  title: Yorlet Core API
  description: Core platform APIs including buildings, customers, units, and tasks.
  version: 1.0.0
servers:
  - url: https://api.yorlet.com
    description: Production
  - url: https://api.yorlet.io
    description: Sandbox
security: []
paths:
  /v1/customers/{id}:
    post:
      tags:
        - Customers
      summary: Update a customer
      operationId: customers_update
      parameters:
        - schema:
            type: string
            description: The id identifier.
          required: true
          description: The id identifier.
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  format: email
                  description: The customer's email address.
                address:
                  type: object
                  properties:
                    line1:
                      type:
                        - string
                        - 'null'
                    line2:
                      type:
                        - string
                        - 'null'
                    city:
                      type:
                        - string
                        - 'null'
                    country:
                      type:
                        - string
                        - 'null'
                    postal_code:
                      type:
                        - string
                        - 'null'
                    state:
                      type:
                        - string
                        - 'null'
                  description: The customer's address.
                description:
                  type: string
                  description: An arbitrary description attached to the customer.
                invoice_prefix:
                  type: string
                  description: >-
                    The prefix for the customer used to generate unique invoice
                    numbers.
                invoicing:
                  type: object
                  properties:
                    arrears_emails:
                      type: boolean
                      description: Whether the customer should receive arrears emails.
                    email_cc:
                      type: array
                      items:
                        type: string
                      description: Email addresses to CC on invoice emails.
                    email_to:
                      type: string
                      description: >-
                        The primary email address to send invoices to. Defaults
                        to the customer email when not set.
                  description: Invoicing preferences for the customer.
                legal:
                  type: object
                  properties:
                    dob:
                      type: object
                      properties:
                        day:
                          type: integer
                          minimum: 1
                          maximum: 31
                        month:
                          type: integer
                          minimum: 1
                          maximum: 12
                        year:
                          type: integer
                          minimum: 1900
                          maximum: 9999
                      required:
                        - day
                        - month
                        - year
                      description: The customer's date of birth.
                    first_name:
                      type: string
                      description: The customer's legal first name.
                    last_name:
                      type: string
                      description: The customer's legal last name.
                  description: Legal information about the customer.
                metadata:
                  type:
                    - object
                    - 'null'
                  additionalProperties:
                    type: string
                  description: >-
                    Set of key-value pairs that you can attach to an object.
                    This can be useful for storing additional information about
                    the object in a structured format.
                name:
                  type: string
                  description: The customer's full name.
                next_invoice_sequence:
                  type: integer
                  description: >-
                    The sequence to be used for the next invoice issued to this
                    customer.
                phone:
                  type: string
                  description: The customer's phone number.
                archived:
                  type: boolean
                  description: Whether the customer is archived.
      responses:
        '200':
          description: Returns the customer object if the update succeeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the object.
                  created:
                    type: number
                    description: >-
                      Time at which the object was created. Measured in seconds
                      since the Unix epoch.
                  account:
                    type: string
                    description: >-
                      The account that the object belongs to. Only returned if
                      the request is made with a valid Yorlet-Context header.
                  deleted:
                    type: boolean
                    default: false
                    description: Only returned if the object has been deleted.
                  object:
                    type: string
                    enum:
                      - customer
                  address:
                    type: object
                    properties:
                      line1:
                        type:
                          - string
                          - 'null'
                      line2:
                        type:
                          - string
                          - 'null'
                      city:
                        type:
                          - string
                          - 'null'
                      country:
                        type:
                          - string
                          - 'null'
                      postal_code:
                        type:
                          - string
                          - 'null'
                      state:
                        type:
                          - string
                          - 'null'
                    description: The customer's address.
                  default_payment_method:
                    anyOf:
                      - type: string
                      - type: object
                        additionalProperties: {}
                      - type: 'null'
                    description: ID of the default payment method for the customer.
                  delinquent:
                    type: boolean
                    description: Whether the customer has any unpaid or past-due invoices.
                  description:
                    type:
                      - string
                      - 'null'
                    description: An arbitrary description attached to the customer.
                  email:
                    type: string
                    format: email
                    description: The customer's email address.
                  invoice_prefix:
                    type: string
                    description: >-
                      The prefix for the customer used to generate unique
                      invoice numbers.
                  invoicing:
                    type: object
                    properties:
                      arrears_emails:
                        type: boolean
                        description: Whether the customer should receive arrears emails.
                      email_cc:
                        type: array
                        items:
                          type: string
                          format: email
                        description: Email addresses to CC on invoice emails.
                      email_to:
                        type:
                          - string
                          - 'null'
                        format: email
                        description: >-
                          The primary email address to send invoices to.
                          Defaults to the customer email when not set.
                    required:
                      - arrears_emails
                      - email_cc
                    description: Invoicing preferences for the customer.
                  legal:
                    type: object
                    properties:
                      dob:
                        type: object
                        properties:
                          day:
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                            maximum: 31
                          month:
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                            maximum: 12
                          year:
                            type:
                              - integer
                              - 'null'
                            minimum: 1900
                            maximum: 9999
                        required:
                          - day
                          - month
                          - year
                        description: The customer's date of birth.
                      first_name:
                        type:
                          - string
                          - 'null'
                        description: The customer's legal first name.
                      last_name:
                        type:
                          - string
                          - 'null'
                        description: The customer's legal last name.
                    required:
                      - dob
                      - first_name
                      - last_name
                    description: Legal information about the customer.
                  metadata:
                    type:
                      - object
                      - 'null'
                    additionalProperties:
                      type: string
                    description: >-
                      Set of key-value pairs that you can attach to an object.
                      This can be useful for storing additional information
                      about the object in a structured format.
                  name:
                    type:
                      - string
                      - 'null'
                    description: The customer's full name.
                  phone:
                    type:
                      - string
                      - 'null'
                    description: The customer's phone number.
                  radar:
                    type: object
                    properties:
                      message:
                        type:
                          - string
                          - 'null'
                        description: >-
                          A human-readable message describing the radar
                          assessment of the customer.
                      reason:
                        type:
                          - string
                          - 'null'
                        description: >-
                          A machine-readable reason for the radar assessment of
                          the customer.
                      risk_level:
                        type: string
                        description: The risk level assigned to the customer by radar.
                    required:
                      - message
                      - reason
                      - risk_level
                    description: Radar's risk assessment of the customer.
                required:
                  - id
                  - created
                  - object
                  - address
                  - default_payment_method
                  - delinquent
                  - description
                  - email
                  - invoice_prefix
                  - invoicing
                  - legal
                  - name
                  - phone
                  - radar
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API Key authentication. Use "Bearer YOUR_API_KEY".

````