Is it possible to send typing indicators or read receipts via the Web Messaging Guest API? I am iterating through POST /api/v2/conversations/messaging/participants/{participantId}/send with payload {"type": "typing"}, but the GC UI ignores it entirely. The standard SDK handles this client-side, but my Django backend needs to simulate agent activity for load testing. What is the correct endpoint or payload structure for server-side indicators?
What’s happening here is that the Guest API does not support server-side typing indicators. These are strictly client-side WebSocket events handled by the Embedded Messaging SDK, not REST payloads. You cannot simulate them via POST /api/v2/conversations/messaging/participants/{participantId}/send because the endpoint ignores non-text/non-media types for load testing purposes.
make sure you stop trying to force typing indicators through the rest api. as As noted above, the guest api ignores non-text payloads for this specific use case. if you are building a load test in django, you need to simulate actual message traffic, not ui events. the embedded messaging sdk handles typing via websocket frames, which are not exposed via rest. to stress test your queues, just blast valid text messages. here is a minimal python snippet using requests to send a rapid sequence of messages to simulate high volume. this will actually trigger analytics and queue metrics.
import requests
import time
headers = {"Authorization": "Bearer YOUR_TOKEN", "Content-Type": "application/json"}
endpoint = "https://api.mypurecloud.com/api/v2/conversations/messaging/participants/{participantId}/send"
for i in range(100):
# simulate rapid typing by sending short bursts
payload = {"content": f"test msg {i}"}
requests.post(endpoint, headers=headers, json=payload)
time.sleep(0.1) # adjust for desired rps
this gives you real data in the analytics api for dashboarding.
You are hitting a hard architectural boundary here. The /send endpoint is strictly for content delivery (text, media, quick replies), not UI state synchronization. Forcing {"type": "typing"} through REST is like trying to send a heartbeat via a file transfer protocol-it gets dropped by the message router because it lacks the WebSocket context required for real-time presence updates.
If your goal is load testing the backend infrastructure (queues, analytics, database writes), simulate actual message volume. If your goal is testing the frontend agent UI responsiveness, you cannot do this via the Guest API. You must use the Embedded Messaging SDK or the WebSocket protocol directly.
Here is how to handle this correctly based on your actual objective:
- For Backend Load Testing: Ignore UI indicators. Generate high-volume text messages to stress the
conversations/messagingservice. Use the Pythonrequestslibrary with a thread pool to simulate concurrent agents. - For Frontend/UI Load Testing: You cannot use the Guest API. You must instantiate the Embedded Messaging SDK in a headless browser (like Puppeteer or Playwright) to generate the actual WebSocket
typingframes that the Genesys Cloud UI listens to.
import requests
import threading
def simulate_message_load(user_id, token):
url = f"https://api.mypurecloud.com/api/v2/conversations/messaging/participants/{user_id}/send"
headers = {
"Authorization": f"Bearer {token}",
"Content-Type": "application/json"
}
# Only text payloads are processed for load metrics
payload = {"type": "text", "text": "Load test message"}
requests.post(url, headers=headers, json=payload)
# Run in threads to simulate concurrency
threads = [threading.Thread(target=simulate_message_load, args=("agent-id-123", "your-token")) for _ in range(50)]
for t in threads:
t.start()
Do not waste cycles trying to hack the typing type into the REST payload. It will always return 200 OK but produce zero UI effect. Stick to text payloads for backend load and SDK automation for frontend load.