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

# Update a business

> Partially updates the business profile. Only the fields present in the request body are changed. The business is taken from the `business-id` header rather than the URL; the path-scoped form of this operation is deprecated.



## OpenAPI

````yaml /api-reference/openapi.json patch /api/v1/businesses/current
openapi: 3.1.0
info:
  contact:
    email: suporte@izap.ai
    name: iZap API Support
  description: Public REST API for the iZap WhatsApp business messaging platform.
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  title: iZap API
  version: v1
servers:
  - description: Production
    url: https://api.izap.ai
  - description: Staging
    url: https://api-staging.izap.ai
security: []
tags:
  - description: >-
      Personal access tokens for calling this API, plus introspection of the
      token presented on a request.
    name: api-tokens
  - description: >-
      Create a business, read and update its profile, and manage its opening
      hours.
    name: businesses
  - description: >-
      Reusable images belonging to the caller's business, referenced when
      composing messages.
    name: business-library
  - description: Product catalog menus a business publishes to its customers.
    name: menus
  - description: >-
      Provision and inspect the WhatsApp Cloud API numbers attached to a
      business: registration, WABA details, per-number assistant binding and
      catalog sends.
    name: whatsapp-cloud
  - description: >-
      Conversation lifecycle — list, create and delete chats, and control read,
      snooze, status and AI pause state.
    name: chats
  - description: >-
      Read a conversation's messages, send free-form or template replies, and
      upload attachments.
    name: messages
  - description: >-
      Manage WhatsApp message templates: draft them locally, submit them to Meta
      for review and sync approval status back.
    name: whatsapp-templates
  - description: >-
      Bulk template sends. A transmission is previewed into a draft, then
      confirmed or cancelled — confirming dispatches to real recipients.
    name: transmissions
  - description: >-
      Register URLs that receive signed event deliveries when something happens
      in a business, rotate their signing secrets, and replay an individual
      delivery.
    name: webhooks
  - description: >-
      Server-rendered order visualisation page for a business slug, behind HTTP
      Basic auth.
    name: orders
paths:
  /api/v1/businesses/current:
    patch:
      tags:
        - businesses
      summary: Update a business
      description: >-
        Partially updates the business profile. Only the fields present in the
        request body are changed. The business is taken from the `business-id`
        header rather than the URL; the path-scoped form of this operation is
        deprecated.
      operationId: updateCurrentBusiness
      parameters:
        - description: >-
            UUID of the business the request is scoped to. Required on this
            route; the deprecated /businesses/{business_id}/... form takes it
            from the path instead.
          in: header
          name: business-id
          required: true
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              UUID of the business the request is scoped to. Required on this
              route; the deprecated /businesses/{business_id}/... form takes it
              from the path instead.
            title: Business-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BusinessUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessOut'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Missing or invalid credentials.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: The credential is valid but not authorized for this action.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: The resource, or the business named in the request, does not exist.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Unexpected error.
      security:
        - bearerAuth: []
components:
  schemas:
    BusinessUpdateRequest:
      description: >-
        Partial update for a business's profile. Optional fields only; unset
        ones are left alone.


        Kept intentionally narrow (name + timezone) so GOG-3129 (business hours)
        can extend this

        same endpoint with an `hours` field later instead of introducing a
        second PATCH route.
      properties:
        business_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Business Name
        industry:
          anyOf:
            - type: string
            - type: 'null'
          title: Industry
        timezone:
          anyOf:
            - type: string
            - type: 'null'
          title: Timezone
      title: BusinessUpdateRequest
      type: object
    BusinessOut:
      properties:
        business_name:
          title: Business Name
          type: string
        chatbot:
          anyOf:
            - $ref: '#/components/schemas/ChatbotOut'
            - type: 'null'
        chatbots:
          default: []
          items:
            $ref: '#/components/schemas/ChatbotOut'
          title: Chatbots
          type: array
        hours:
          items:
            $ref: '#/components/schemas/HoursOut'
          title: Hours
          type: array
        id:
          format: uuid
          title: Id
          type: string
        industry:
          anyOf:
            - type: string
            - type: 'null'
          title: Industry
        menus:
          items:
            $ref: '#/components/schemas/MenusOut'
          title: Menus
          type: array
        timezone:
          anyOf:
            - type: string
            - type: 'null'
          title: Timezone
      required:
        - id
        - business_name
        - hours
        - menus
      title: BusinessOut
      type: object
    ApiError:
      description: >-
        The response body of a handled API error.


        ``detail`` is either a plain string (FastAPI's default for an

        ``HTTPException`` raised with a string, and for the ``default``
        fastapi-users

        messages like ``"Not authenticated"``) or the structured

        :class:`ApiErrorDetail` object described above. ``code`` is present only
        on

        the top-level shape ``aizap.core.exceptions.AppException`` produces for
        its

        own 5xx responses (``"INTERNAL_ERROR"`` / ``"DB_ERROR"``); it does not

        duplicate the ``code`` nested inside a structured ``detail``.
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Code
        detail:
          anyOf:
            - type: string
            - $ref: '#/components/schemas/ApiErrorDetail'
          title: Detail
      required:
        - detail
      title: ApiError
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ChatbotOut:
      properties:
        ai_model_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Ai Model Name
        ai_pause_minutes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Ai Pause Minutes
        ai_pause_minutes_default:
          default: 60
          title: Ai Pause Minutes Default
          type: integer
        avatar:
          anyOf:
            - type: string
            - type: 'null'
          title: Avatar
        custom_instructions:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Custom Instructions
        detect_client_language:
          default: false
          title: Detect Client Language
          type: boolean
        effective_locale:
          title: Effective Locale
          type: string
        id:
          format: uuid
          title: Id
          type: string
        is_active:
          default: false
          title: Is Active
          type: boolean
        locale:
          anyOf:
            - type: string
            - type: 'null'
          title: Locale
        locale_source:
          default: default
          enum:
            - configured
            - inferred
            - default
          title: Locale Source
          type: string
        messaging_backend:
          default: izap
          enum:
            - external
            - izap
          title: Messaging Backend
          type: string
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        objective:
          anyOf:
            - type: string
            - type: 'null'
          title: Objective
        phone_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone Number
        platform:
          anyOf:
            - const: whatsapp
              type: string
            - type: 'null'
          title: Platform
        whatsapp_numbers:
          default: []
          items:
            $ref: '#/components/schemas/ChatbotWhatsAppNumberOut'
          title: Whatsapp Numbers
          type: array
      required:
        - id
        - effective_locale
      title: ChatbotOut
      type: object
    HoursOut:
      properties:
        end_hour:
          title: End Hour
          type: string
        operating_days:
          items: {}
          title: Operating Days
          type: array
        start_hour:
          title: Start Hour
          type: string
      required:
        - start_hour
        - end_hour
        - operating_days
      title: HoursOut
      type: object
    MenusOut:
      properties:
        ai_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Ai Model
        ai_model_reasoning:
          anyOf:
            - $ref: '#/components/schemas/ReasoningChoices'
            - type: 'null'
        id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Id
        menu_json:
          title: Menu Json
      required:
        - menu_json
      title: MenusOut
      type: object
    ApiErrorDetail:
      additionalProperties: true
      description: |-
        The structured ``detail`` object some error responses carry.

        Several handlers (the REST API plan gate, the free-tier limits, the
        webhooks entitlement gate, the closed customer-service window) raise
        ``HTTPException(detail={"code": ..., "message": ..., ...})`` — a fixed
        ``code``/``message`` pair plus extra fields specific to that error.
        ``extra="allow"`` keeps those fields in the documented shape instead of
        dropping them.
      properties:
        code:
          title: Code
          type: string
        message:
          title: Message
          type: string
      required:
        - code
        - message
      title: ApiErrorDetail
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    ChatbotWhatsAppNumberOut:
      description: >-
        The WhatsApp number a chatbot answers on, as shown in the dash assistant
        card.
      properties:
        display_phone_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Phone Number
        phone_number:
          title: Phone Number
          type: string
        phone_number_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone Number Id
        quality_rating:
          anyOf:
            - type: string
            - type: 'null'
          title: Quality Rating
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        verified_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Verified Name
      required:
        - phone_number
      title: ChatbotWhatsAppNumberOut
      type: object
    ReasoningChoices:
      enum:
        - none
        - minimal
        - low
        - medium
        - high
        - xhigh
      title: ReasoningChoices
      type: string
  securitySchemes:
    bearerAuth:
      description: >-
        Personal access token (izap_pat_…) sent as Authorization: Bearer
        <token>; dashboard session JWTs are also accepted.
      scheme: bearer
      type: http

````