Skip to main content
POST
/
websocket-servers
/
{websocketServer}
/
applications
Create WebSocket application
curl --request POST \
  --url https://cloud.laravel.com/api/websocket-servers/{websocketServer}/applications \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "ping_interval": 30,
  "activity_timeout": 30,
  "allowed_origins": [
    "<string>"
  ]
}
'
{
  "data": {
    "id": "<string>",
    "type": "websocketApplications",
    "relationships": {}
  },
  "included": [
    {
      "id": "<string>",
      "type": "websocketServers",
      "relationships": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

The Bearer Token generated on the Cloud UI.

Path Parameters

websocketServer
string
required

The websocket server identifier

Body

application/json
name
string
required
Required string length: 3 - 40
Pattern: ^[a-z0-9_-]+$
ping_interval
integer
Required range: 1 <= x <= 60
activity_timeout
integer
Required range: 1 <= x <= 60
allowed_origins
string[] | null
Maximum string length: 255

Response

WebsocketApplicationResource

data
WebsocketApplicationResource · object
required
included
WebsocketServerResource · object[]