> ## 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.

# Create WebSocket cluster

> Create a new WebSocket cluster with a default application.



## OpenAPI

````yaml https://cloud.laravel.com/api-docs/api.json post /websocket-servers
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-servers:
    post:
      tags:
        - WebSocket Clusters
      summary: Create WebSocket cluster
      description: Create a new WebSocket cluster with a default application.
      operationId: public.websocket-servers.store
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreWebsocketServerRequest'
      responses:
        '201':
          description: '`WebsocketServerResource`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/WebsocketServerResource'
                  included:
                    type: array
                    items:
                      $ref: '#/components/schemas/WebsocketApplicationResource'
                required:
                  - data
        '401':
          description: An error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error overview.
                    example: ''
                required:
                  - message
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    StoreWebsocketServerRequest:
      type: object
      properties:
        name:
          type: string
          pattern: ^[a-z0-9_-]+$
          minLength: 3
          maxLength: 40
        type:
          $ref: '#/components/schemas/WebsocketServerType'
        region:
          $ref: '#/components/schemas/CloudRegion'
        max_connections:
          type: integer
      required:
        - name
        - type
        - region
        - max_connections
      title: StoreWebsocketServerRequest
    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
    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
    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
    WebsocketServerResourceIdentifier:
      type: object
      properties:
        type:
          type: string
          enum:
            - websocketServers
        id:
          type: string
      required:
        - type
        - id
      title: WebsocketServerResourceIdentifier
  responses:
    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

````