Skip to content

Chat Widgets API โ€‹

Manage social chat widgets and their per-widget chat settings.

Base URL: https://your-site.com/wp-json/wpsocialreviews/v2

Policy: WidgetsPolicy


List Widgets โ€‹

GET /chat-widgets

Handler: WidgetsController@index

ParameterTypeLocationRequiredDescription
searchstringqueryNoSearch by title

Response โ€‹

json
{
  "message": "success",
  "items": { "data": [], "total": 0 },
  "total_items": 0
}

Create ยท Status ยท Duplicate ยท Delete โ€‹

ActionMethodEndpointHandlerInputsResponse
CreatePOST/chat-widgets@createonboarding (bool){ "template_id": 88 }
StatusPUT/chat-widgets@updateids[], status (publish/draft/pending/private/trash){ "message" }
DuplicatePOST/chat-widgets/duplicate@duplicateids[]{ "message", "item", "item_id" }
DeleteDELETE/chat-widgets@deleteids[]{ "message" }

Chat Meta โ€‹

Nested under /chat-widgets/meta/chats/{id}. Handler: Platforms/Chats/MetaController. The {id} must be a wpsr_social_chats post, otherwise a 404 is returned. Reading/saving fires the get_chat_settings / update_chat_settings / delete_chat_settings actions.

MethodEndpointHandlerInputs
GET/chat-widgets/meta/chats/{id}@indexpath {id}
PUT/chat-widgets/meta/chats/{id}@updatepath {id}, args (JSON chat settings)
DELETE/chat-widgets/meta/chats/{id}/edit@deletepath {id}

WP Social Ninja Developer Documentation