REST APIs
- Organizations
- Folders
- Documents
- Users
- User Groups
- Comments Feature
- Notifications
- Live State
- Workspace
SDK
- APIs
- Models
Live State
Broadcast Event
POST
/
v1
/
livestate
/
broadcast
Copy
Ask AI
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
}
}'
Copy
Ask AI
{
"result": {
"status": "success",
"message": "Event broadcasted successfully.",
"data": {
"success": true
}
}
}
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
Your API key.
Your Auth Token.
Body Parameters
Organization ID where the document belongs
Document ID to broadcast the event to
Unique identifier for the live state data
The data to broadcast. Can be any valid serializable JSON object.
If true, merges the new data with existing data instead of replacing it
Example Request
Copy
Ask AI
{
"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
Copy
Ask AI
{
"result": {
"status": "success",
"message": "Event broadcasted successfully.",
"data": {
"success": true
}
}
}
Error Response
Copy
Ask AI
{
"error": {
"message": "ERROR_MESSAGE",
"status": "ERROR_CODE"
}
}
Copy
Ask AI
{
"result": {
"status": "success",
"message": "Event broadcasted successfully.",
"data": {
"success": true
}
}
}
Was this page helpful?
Copy
Ask AI
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
}
}'
Copy
Ask AI
{
"result": {
"status": "success",
"message": "Event broadcasted successfully.",
"data": {
"success": true
}
}
}
Assistant
Responses are generated using AI and may contain mistakes.