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

# Update a site

> Update mutable fields on a site for the partner the API key belongs to. The public `site` contract maps onto the internal Address-backed update flow. Only the fields you include in the request body are modified; omitted fields are left as-is. `platformSlaId` cannot be updated while an address subscription is associated. `customProperties` accepts the custom properties defined for your partner, keyed by property id; send `null` to clear one. Requires the `site:write` scope. Supports `include=clients` to expand the updated site.



## OpenAPI

````yaml /openapi.yaml patch /v1/site/{id}
openapi: 3.1.0
info:
  title: ProVision Public API
  version: 1.0.0
  description: >-
    Use the ProVision Public API to integrate with ProVision conversations,
    clients, users, and addresses. All endpoints accept and return JSON, are
    authenticated with an `x-api-key` header, and are scoped to a single partner
    tenant.
  contact:
    email: support@onevisionresources.com
    name: OneVision Resources Support
  license:
    name: Proprietary
servers:
  - url: https://connect.provisionapp.io
    description: Production
security: []
paths:
  /v1/site/{id}:
    patch:
      tags:
        - site
      summary: Update a site
      description: >-
        Update mutable fields on a site for the partner the API key belongs to.
        The public `site` contract maps onto the internal Address-backed update
        flow. Only the fields you include in the request body are modified;
        omitted fields are left as-is. `platformSlaId` cannot be updated while
        an address subscription is associated. `customProperties` accepts the
        custom properties defined for your partner, keyed by property id; send
        `null` to clear one. Requires the `site:write` scope. Supports
        `include=clients` to expand the updated site.
      operationId: patchSite
      parameters:
        - schema:
            $ref: '#/components/schemas/SiteId'
          required: true
          name: id
          in: path
        - schema:
            type: string
            description: Comma-separated relations to expand on the response
            example: clients,projects
          required: false
          description: Comma-separated relations to expand on the response
          name: include
          in: query
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSitePayload'
      responses:
        '200':
          description: Updated site
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Site'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - OpenApiKeyAuth: []
components:
  schemas:
    SiteId:
      type: string
      pattern: ^ovaid-.*$
      example: ovaid-22222222-2222-4222-8222-222222222222
    UpdateSitePayload:
      type: object
      properties:
        businessName:
          type: string
          minLength: 1
        address1:
          type: string
          minLength: 1
        address2:
          type: string
        city:
          type: string
          minLength: 1
        state:
          type: string
          minLength: 1
        zip:
          type: string
        isMonitored:
          type: boolean
        siteNotes:
          type: string
        clientSegmentId:
          type: string
          minLength: 1
        primaryClientId:
          $ref: '#/components/schemas/ClientId'
        tosAccepted:
          type: boolean
        platformSlaId:
          $ref: '#/components/schemas/PlatformSlaId'
        ownerId:
          $ref: '#/components/schemas/UserId'
        customProperties:
          $ref: '#/components/schemas/CustomPropertiesWrite'
      additionalProperties: false
    Site:
      type: object
      properties:
        id:
          type: string
        address1:
          type:
            - string
            - 'null'
        address2:
          type:
            - string
            - 'null'
        city:
          type:
            - string
            - 'null'
        state:
          type:
            - string
            - 'null'
        zip:
          type:
            - string
            - 'null'
        tosAccepted:
          type: string
        serviceLevel:
          $ref: '#/components/schemas/ServiceLevel'
        clientSegment:
          type: string
        cppExpDate:
          type: string
          format: date-time
        businessName:
          type: string
        brandId:
          type: string
        primaryClientId:
          type: string
        primaryProjectId:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        sla:
          type: number
        isMonitored:
          type: boolean
        accountManager:
          $ref: '#/components/schemas/AccountManager'
        membershipRegistered:
          type: boolean
        clients:
          type: array
          items:
            $ref: '#/components/schemas/AddressClient'
        projects:
          type: array
          items:
            $ref: '#/components/schemas/AddressProject'
        customProperties:
          $ref: '#/components/schemas/CustomProperties'
      required:
        - id
        - address1
        - address2
        - city
        - state
        - zip
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - error
    ClientId:
      type: string
      pattern: ^ovcid-.*$
    PlatformSlaId:
      type: string
      enum:
        - essentials_plus
        - priority
        - security_only
        - proactive
        - signature
    UserId:
      type: string
      minLength: 1
      description: >-
        Platform user id. Newer ids are `ovuid-<uuid>`; legacy users may have
        bare (e.g. numeric) ids.
      example: ovuid-2b6d4d8e-9f1a-4b2c-8d4e-5f6011223344
    CustomPropertiesWrite:
      type: object
      additionalProperties: {}
      description: >-
        Custom property values, keyed by property id. Ids and value types come
        from the properties defined for your partner, so this object cannot be
        described field by field here: an unknown id or a value that does not
        match the property type is rejected with 400. Only the ids you send are
        modified — omit a property to leave it untouched. To clear one, send
        `null`; a blank string and an empty array count as empty too, for every
        property type alike.
      example:
        warranty_count: 5
        region: east
        onsite_required: true
    ServiceLevel:
      type: string
      enum:
        - Inactive
        - Non-Member
        - Warranty Essentials
        - CPP Essentials Plus
        - Essentials Plus
        - CPP Priority
        - Priority
        - CPP Proactive
        - Proactive
        - CPP Signature
        - Signature
        - Secure
        - OV - Internal
        - Legacy
    AccountManager:
      type: object
      properties:
        id:
          type: string
          format: uuid
        firstName:
          type: string
        lastName:
          type: string
      required:
        - id
        - firstName
        - lastName
      additionalProperties: false
    AddressClient:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/ClientId'
        partnerName:
          type: string
        name:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        marketingOptOut:
          type: boolean
        emails:
          type: array
          items:
            $ref: '#/components/schemas/ClientEmail'
        phoneNumbers:
          type: array
          items:
            $ref: '#/components/schemas/ClientPhoneNumber'
        isPrimary:
          type: boolean
      required:
        - id
        - name
        - firstName
        - lastName
      additionalProperties: false
    AddressProject:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        isPrimary:
          type: boolean
        stage:
          type: string
        estimatedDay1:
          type: string
          format: date
        day1StartDate:
          type: string
          format: date
        warrantyExpiration:
          type: string
          format: date
        signingDate:
          type: string
          format: date
      required:
        - id
        - name
      additionalProperties: false
    CustomProperties:
      type: object
      additionalProperties:
        anyOf:
          - type: string
          - type: number
          - type: boolean
          - type: array
            items:
              type: string
      description: >-
        Custom property values, keyed by property id. Ids and value types come
        from the properties defined for your partner, so this object cannot be
        described field by field here — call the custom-property list endpoint
        to resolve an id to its name and type. A property never given a value
        takes the default configured for it, and is left out rather than
        returned as `null` when there is no default either. A value stored
        before its property was changed — an option renamed or removed, the type
        switched — is returned as stored, so it may not match the type the
        property has today; an absent key is the only reliable sign that nothing
        is set.
      example:
        warranty_count: 5
        region: east
        onsite_required: true
    ApiError:
      type: object
      properties:
        code:
          type: string
          description: Machine-readable error code
          example: NOT_FOUND
        message:
          type: string
          description: Human-readable error description
      required:
        - code
        - message
    ClientEmail:
      type: object
      properties:
        id:
          type: string
          format: uuid
        value:
          type: string
          format: email
        label:
          type: string
        isPrimary:
          type: boolean
      required:
        - id
        - value
      additionalProperties: false
    ClientPhoneNumber:
      type: object
      properties:
        id:
          type: string
          format: uuid
        value:
          type: string
        ext:
          type: number
        label:
          type: string
        isPrimary:
          type: boolean
      required:
        - id
        - value
      additionalProperties: false
  securitySchemes:
    OpenApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Send the API key in the x-api-key header.

````