Skip to main content
POST
/
v1
/
livestate
/
broadcast
Broadcast Event
curl --request POST \
  --url https://api.velt.dev/v1/livestate/broadcast \
  --header 'Content-Type: application/json' \
  --header 'x-velt-api-key: <x-velt-api-key>' \
  --header 'x-velt-auth-token: <x-velt-auth-token>' \
  --data '
{
  "data": {
    "organizationId": "<string>",
    "documentId": "<string>",
    "liveStateDataId": "<string>",
    "data": {},
    "merge": true
  }
}
'
{
  "result": {
    "status": "success",
    "message": "Event broadcasted successfully.",
    "data": {
      "success": true
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.velt.dev/llms.txt

Use this file to discover all available pages before exploring further.

Use this API to broadcast live state events to any document. Use it with the Live State feature.

Endpoint

POST https://api.velt.dev/v1/livestate/broadcast

Headers

x-velt-api-key
string
required
Your API key.
x-velt-auth-token
string
required

Body Parameters

data
object
required

Example Request

{
  "organizationId": "YOUR_ORGANIZATION_ID",
  "documentId": "YOUR_DOCUMENT_ID",
  "liveStateDataId": "sample_live_state_data_id",
  "data": {
    "status": "active",
    "message": "Hello World",
    "customField": "custom value"
  },
  "merge": true
}

Response

Success Response

{
  "result": {
    "status": "success",
    "message": "Event broadcasted successfully.",
    "data": {
      "success": true
    }
  }
}

Error Response

{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "ERROR_CODE"
  }
}
{
  "result": {
    "status": "success",
    "message": "Event broadcasted successfully.",
    "data": {
      "success": true
    }
  }
}