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

# Update a serverhost

> Update an existing serverhost



## OpenAPI

````yaml https://controller.simplecloud.app/swagger/doc.json put /v0/serverhosts
openapi: 3.1.0
info:
  contact:
    email: support@swagger.io
    name: API Support
    url: http://www.swagger.io/support
  description: API for SimpleCloud Controller
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: http://swagger.io/terms/
  title: SimpleCloud Controller API
  version: '1.0'
servers:
  - url: https://controller.platform.simplecloud.app/
security: []
externalDocs:
  description: ''
  url: ''
paths:
  /v0/serverhosts:
    put:
      tags:
        - serverhosts
      summary: Update a serverhost
      description: Update an existing serverhost
      parameters:
        - description: Network ID
          in: header
          name: X-Network-ID
          required: true
          schema:
            type: string
        - description: Network Secret
          in: header
          name: X-Network-Secret
          required: true
          schema:
            type: string
        - description: Serverhost ID
          in: query
          name: serverhost_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/models.UpdateServerhostRequest'
        description: Serverhost details
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.UpdateServerhostResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ErrorResponse'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ErrorResponse'
          description: Internal Server Error
components:
  schemas:
    models.UpdateServerhostRequest:
      description: Request to update a serverhost
      properties:
        host_name:
          example: ServerHost-1
          type: string
        maximum_memory:
          example: 8192
          type: integer
        serverhost_access_mode:
          example: MANAGED_GATEWAY
          type: string
        serverhost_custom_url:
          example: https://files.example.com
          type: string
      type: object
    models.UpdateServerhostResponse:
      description: Response for updating a serverhost
      properties:
        auto_update_targeted_version:
          example: true
          type: boolean
        created_at:
          example: '2023-01-01T12:00:00Z'
          type: string
        deactivated:
          example: false
          type: boolean
        deactivated_at:
          example: '2023-01-01T12:00:00Z'
          type: string
        host_name:
          example: ServerHost-1
          type: string
        installed_java_versions:
          example:
            - 8
            - 17
            - 21
          items:
            type: integer
          type: array
          uniqueItems: false
        last_keep_alive:
          example: '2023-01-01T12:00:00Z'
          type: string
        maximum_memory:
          example: 8192
          type: integer
        message:
          example: Serverhost updated successfully
          type: string
        network_id:
          example: 123e4567-e89b-12d3-a456-426614174000
          type: string
        serverhost_access_mode:
          example: MANAGED_GATEWAY
          type: string
        serverhost_custom_url:
          example: https://files.example.com
          type: string
        serverhost_gateway_last_connected_at:
          example: '2023-01-01T12:00:00Z'
          type: string
        serverhost_gateway_slug:
          example: 9f1f7f2c9a224bb29f9e0f7e5b2a070a
          type: string
        serverhost_id:
          example: 123e4567-e89b-12d3-a456-426614174000
          type: string
        started_at:
          example: '2023-01-01T12:00:00Z'
          type: string
        targeted_version:
          example: 1.2.3
          type: string
        updated_at:
          example: '2023-01-01T12:00:00Z'
          type: string
      type: object
    models.ErrorResponse:
      description: Generic error response
      properties:
        error:
          type: string
      type: object

````