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

# Update WebSocket application

> Update a WebSocket application.



## OpenAPI

````yaml https://cloud.laravel.com/api-docs/api.json patch /websocket-applications/{websocketApplication}
openapi: 3.1.0
info:
  title: Laravel Cloud
  version: 0.0.1
servers:
  - url: https://cloud.laravel.com/api
security:
  - http: []
tags:
  - name: Applications
  - name: Environments
  - name: Domains
  - name: Commands
  - name: Deployments
  - name: Instances
  - name: Background Processes
  - name: Database Clusters
  - name: Databases
  - name: Database Snapshots
  - name: Database Restores
  - name: Object Storage Buckets
  - name: Bucket Keys
  - name: Caches
  - name: WebSocket Clusters
  - name: WebSocket Applications
  - name: Dedicated Clusters
  - name: Usage
  - name: Meta
  - name: Databases (Legacy)
paths:
  /websocket-applications/{websocketApplication}:
    patch:
      tags:
        - WebSocket Applications
      summary: Update WebSocket application
      description: Update a WebSocket application.
      operationId: public.websocket-applications.update
      parameters:
        - name: websocketApplication
          in: path
          required: true
          description: The websocket application identifier
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWebsocketApplicationRequest'
      responses:
        '200':
          description: '`WebsocketApplicationResource`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/WebsocketApplicationResource'
                  included:
                    type: array
                    items:
                      $ref: '#/components/schemas/WebsocketServerResource'
                required:
                  - data
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    UpdateWebsocketApplicationRequest:
      type: object
      properties:
        name:
          type: string
          pattern: ^[a-z0-9_-]+$
          minLength: 3
          maxLength: 40
        ping_interval:
          type: integer
          minimum: 1
          maximum: 60
        activity_timeout:
          type: integer
          minimum: 1
          maximum: 60
        allowed_origins:
          type: array
          items:
            type: string
            maxLength: 255
      title: UpdateWebsocketApplicationRequest
    WebsocketApplicationResource:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - websocketApplications
        attributes:
          type: object
          properties:
            name:
              type: string
            app_id:
              type: string
            allowed_origins:
              type: array
              items: {}
            ping_interval:
              type: integer
            activity_timeout:
              type: integer
            max_message_size:
              type: integer
            max_connections:
              type: integer
            key:
              type: string
            secret:
              type: string
            created_at:
              type:
                - string
                - 'null'
              format: date-time
          required:
            - name
            - app_id
            - allowed_origins
            - ping_interval
            - activity_timeout
            - max_message_size
            - max_connections
            - key
            - secret
            - created_at
        relationships:
          type: object
          properties:
            server:
              type: object
              properties:
                data:
                  anyOf:
                    - $ref: '#/components/schemas/WebsocketServerResourceIdentifier'
                    - type: 'null'
              required:
                - data
      required:
        - id
        - type
      title: WebsocketApplicationResource
    WebsocketServerResource:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - websocketServers
        attributes:
          type: object
          properties:
            name:
              type: string
            type:
              $ref: '#/components/schemas/WebsocketServerType'
            region:
              $ref: '#/components/schemas/CloudRegion'
            status:
              $ref: '#/components/schemas/WebsocketServerStatus'
            max_connections:
              $ref: '#/components/schemas/WebsocketServerMaxConnection'
            connection_distribution_strategy:
              $ref: >-
                #/components/schemas/WebsocketServerConnectionDistributionStrategy
            hostname:
              type: string
            created_at:
              type:
                - string
                - 'null'
              format: date-time
          required:
            - name
            - type
            - region
            - status
            - max_connections
            - connection_distribution_strategy
            - hostname
            - created_at
        relationships:
          type: object
          properties:
            applications:
              type: object
              properties:
                data:
                  type: array
                  items:
                    $ref: >-
                      #/components/schemas/WebsocketApplicationResourceIdentifier
              required:
                - data
      required:
        - id
        - type
      title: WebsocketServerResource
    WebsocketServerResourceIdentifier:
      type: object
      properties:
        type:
          type: string
          enum:
            - websocketServers
        id:
          type: string
      required:
        - type
        - id
      title: WebsocketServerResourceIdentifier
    WebsocketServerType:
      type: string
      enum:
        - reverb
      title: WebsocketServerType
    CloudRegion:
      type: string
      enum:
        - us-east-2
        - us-east-1
        - ca-central-1
        - eu-central-1
        - eu-west-1
        - eu-west-2
        - me-central-1
        - ap-southeast-1
        - ap-southeast-2
        - ap-northeast-1
      title: CloudRegion
    WebsocketServerStatus:
      type: string
      enum:
        - creating
        - updating
        - available
        - stopped
        - deleting
        - deleted
        - unknown
      title: WebsocketServerStatus
    WebsocketServerMaxConnection:
      type: integer
      enum:
        - 100
        - 200
        - 500
        - 2000
        - 5000
        - 10000
      title: WebsocketServerMaxConnection
    WebsocketServerConnectionDistributionStrategy:
      type: string
      enum:
        - evenly
        - custom
      title: WebsocketServerConnectionDistributionStrategy
    WebsocketApplicationResourceIdentifier:
      type: object
      properties:
        type:
          type: string
          enum:
            - websocketApplications
        id:
          type: string
      required:
        - type
        - id
      title: WebsocketApplicationResourceIdentifier
  responses:
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      description: The Bearer Token generated on the Cloud UI.
      scheme: bearer
      bearerFormat: bearer

````