# Update an existing site

Endpoint: PUT /site/{siteId}
Version: 1.0
Security: bearer

## Security:

  - `bearer` (unknown)
    http bearer JWT

## Path parameters:

  - `siteId` (number, required)

## Request fields (application/json):

  - `name` (string, required)
    The name of the site
    Example: Downtown Clinic

  - `address` (object, required)
    The address of the site
    Example: {"street":"123 Main St","city":"New York","zipCode":"10001"}

  - `googlePlaceId` (string, required)
    The Google Place ID of the site
    Example: ChIJN1t_tDeuEmsRUsoyG83frY4

  - `clientAccountId` (number, required)
    The ID of the client Account the site belongs to
    Example: 1

  - `organizationId` (number, required)
    The ID of the organization the site belongs to
    Example: 1

  - `brandId` (number, required)
    The ID of the brand the site belongs to
    Example: 2

  - `phoneNumber` (string)
    The phone number of the site
    Example: +1-555-555-5555

  - `website` (string)
    The website of the site
    Example: https://www.downtownclinic.com

  - `anyDeskIp` (string)
    The AnyDesk IP of the site for remote access
    Example: 192.168.1.1

  - `practiceManagementSystemId` (number, required)
    The practice management system ID for the site
    Example: 123

  - `integrationType` (string, required)
    Integration type for the site
    Enum: "PMS", "CUSTOM"

  - `seedAhdsStore` (boolean)
    If true, AHDS store will be provisioned with seed data included. If false or omitted (default), AHDS store will have empty schema only. Only applies when outputDataStoreType is AHDS_V1.
    Example: false

  - `customIntegrationType` (string, required)
    Custom Integration type for the site
    Enum: "FILE_UPLOAD"

  - `siteManagerUserId` (number)
    The ID of the decision-maker user
    Example: 45

  - `cloudUserName` (string)
    The cloud based username for the site
    Example: cloud-user

  - `cloudUserPassword` (string)
    The cloud based user password for the site
    Example: cloud-user-password

  - `cloudOrganizationName` (string)
    The cloud based organization name for the site
    Example: cloud-organization-name

  - `cloudLoginUrl` (string)
    The cloud based login url for the site
    Example: https://cloud-login-url.com

## Response 200:

  - `200` (unknown)
    Site updated successfully.

## Response 200 fields (application/json):

  - `name` (string, required)
    The name of the site
    Example: Downtown Clinic

  - `address` (object, required)
    The address of the site
    Example: {"street":"123 Main St","city":"New York","zipCode":"10001"}

  - `googlePlaceId` (string, required)
    The Google Place ID of the site
    Example: ChIJN1t_tDeuEmsRUsoyG83frY4

  - `clientAccountId` (number, required)
    The ID of the client Account the site belongs to
    Example: 1

  - `organizationId` (number, required)
    The ID of the organization the site belongs to
    Example: 1

  - `brandId` (number, required)
    The ID of the brand the site belongs to
    Example: 2

  - `phoneNumber` (string)
    The phone number of the site
    Example: +1-555-555-5555

  - `website` (string)
    The website of the site
    Example: https://www.downtownclinic.com

  - `anyDeskIp` (string)
    The AnyDesk IP of the site for remote access
    Example: 192.168.1.1

  - `practiceManagementSystemId` (number, required)
    The practice management system ID for the site
    Example: 123

  - `integrationType` (string, required)
    Integration type for the site
    Enum: "PMS", "CUSTOM"

  - `seedAhdsStore` (boolean)
    If true, AHDS store will be provisioned with seed data included. If false or omitted (default), AHDS store will have empty schema only. Only applies when outputDataStoreType is AHDS_V1.
    Example: false

  - `customIntegrationType` (string, required)
    Custom Integration type for the site
    Enum: "FILE_UPLOAD"

  - `siteManagerUserId` (number)
    The ID of the decision-maker user
    Example: 45

  - `cloudUserName` (string)
    The cloud based username for the site
    Example: cloud-user

  - `cloudUserPassword` (string)
    The cloud based user password for the site
    Example: cloud-user-password

  - `cloudOrganizationName` (string)
    The cloud based organization name for the site
    Example: cloud-organization-name

  - `cloudLoginUrl` (string)
    The cloud based login url for the site
    Example: https://cloud-login-url.com

## Response 400:

  - `400` (unknown)
    Bad request.

## Response 401:

  - `401` (unknown)
    Unauthorized: Invalid or missing token.

## Response 401 fields (application/json):

  - `message` (string, required)
    Error message indicating unauthorized access.
    Example: Unauthorized

  - `statusCode` (number, required)
    HTTP status code for unauthorized access.
    Example: 401

## Response 403:

  - `403` (unknown)
    Forbidden: Access denied due to unaccepted Terms or insufficient permissions.

## Response 403 fields (application/json):

  - `statusCode` (number, required)
    HTTP status code indicating forbidden access due to unaccepted Terms of Service.
    Example: 403

  - `message` (string, required)
    Human-readable explanation of the error.
    Example: User must accept Terms of Service before continuing

  - `reason` (string, required)
    Machine-readable reason code for the error.
    Example: tos_required

  - `termsOfServicesLink` (string, required)
    URL to the Terms of Service the user must accept.
    Example: https://heydonto.com/terms-of-use/

  - `timestamp` (string, required)
    Timestamp when the error occurred (ISO 8601).
    Example: 2025-01-01T00:00:00.000Z

  - `statusCode` (number, required)
    HTTP status code indicating forbidden access.
    Example: 403

## Response 404:

  - `404` (unknown)
    Site not found.

