AI Evy
11/27/2025, 2:50 PMAI Evy
11/27/2025, 2:50 PM/v1/agent/message endpoint you're trying to use in your code. The available sources show endpoints for retrieving, updating, listing, and publishing agents [(1) ]() [(2) ]() [(3) ]() [(4) ]() [(5) ]() , but none of them document an agent message endpoint with that structure.
The documented endpoints use patterns like:
- GET /get-agent/{agent_id} [(1) ]()
- PATCH /update-agent/{agent_id} [(2) ]()
- GET /list-agents [(4) ]()
- POST /publish-agent/{agent_id} [(5) ]()
Your code also appears to be PHP (not JavaScript as mentioned) , using WordPress functions like wp_remote_post and add_action.
Without documentation for the /v1/agent/message endpoint, I can't verify if your request structure is correct. I'd recommend checking if you need a different endpoint or if there's updated API documentation for the messaging functionality you're trying to implement.
Would you like me to provide a general answer based on common API integration patterns, or do you have more specific information about what error you're encountering?AI Evy
11/27/2025, 2:50 PMAI Evy
11/27/2025, 2:50 PMShahzaib
11/27/2025, 3:10 PMShahzaib
11/27/2025, 3:13 PMAI Evy
11/27/2025, 3:13 PMAI Evy
11/27/2025, 3:13 PMpublicKey, agentId, and version . The widget requires a Public Key (not an API key) for authorization, which is designed specifically for frontend use [(2) ]() .
To set up:
1. **Get a Public Key**: Navigate to Dashboard → Keys → Public Keys
2. **Embed the widget**: Copy the embed code and add it to your HTML [(1) ]()
3. **No backend work required**: The widget handles the chat interaction directly
Important note about your current code:
The /v1/agent/message endpoint you're trying to use in your PHP code is not documented in the available sources. The Chat Widget approach is the officially documented method for web chat integration .
If you need backend control, you would typically:
- Use the Chat Widget on the frontend with your Public Key
- Handle any custom business logic in your PHP backend separately
- Use documented API endpoints for agent management if needed
The Chat Widget provides a "modern, lightweight text UI" that enables users to interact with your AI agents without requiring custom backend API integration .
Would you like guidance on setting up the Chat Widget, or do you have specific backend requirements that the widget doesn't address?
---
**AI Evy
11/27/2025, 3:13 PMAI Evy
11/27/2025, 3:13 PMShahzaib
11/27/2025, 3:15 PMAI Evy
11/27/2025, 3:15 PMAI Evy
11/27/2025, 3:15 PMAI Evy
11/27/2025, 3:15 PMhtml
<script
id="retell-widget"
src="<https://dashboard.retellai.com/retell-widget.js%22>
type="module"
data-public-key="YOUR_RETELL_PUBLIC_KEY"
data-agent-id="YOUR_CHAT_AGENT_ID"
data-title="YOUR_CUSTOM_TITLE"
data-logo-url="YOUR_LOGO_URL"
data-color="YOUR_CUSTOM_COLOR"
data-bot-name="YOUR_BOT_NAME"
></script>
This allows you to customize the title, logo URL, and color (hex code) for the widget theme .
Option 2: Use ChatDash for White-Label Solution
Retell has an app partner called ChatDash that provides white-label client dashboard capabilities [(2) ]() . ChatDash is specifically designed for agencies wanting to offer custom-branded dashboards with personalized logos, domains, and themes . It integrates seamlessly with Retell AI and offers custom branding with your logo, domain, and color scheme .
Important Note:
I don't have documentation for a direct backend API endpoint (like /v1/agent/message) that would allow you to build a completely custom chat interface from scratch. The documented approach uses the embeddable widget with Public Keys for frontend authorization [(1) ]() [(3) ]() .
If you need complete control over the UI and backend, you might need to contact Retell support directly about custom integration options beyond what the widget provides.
---
**AI Evy
11/27/2025, 3:15 PMShahzaib
11/27/2025, 3:21 PMShahzaib
11/27/2025, 3:21 PMAI Evy
11/27/2025, 3:21 PMAI Evy
11/27/2025, 3:22 PM<script> tag and uses the Retell public key system, allowing direct API calls from the frontend—no backend proxy required [(1) ]() . The widget supports customization through attributes like data-title, data-logo-url, data-color, and data-bot-name .
For full white-label control:
Based on community discussions, the launcher button icon is inside a closed Shadow DOM, which means there isn't a simple way to override it with your own custom UI [(3) ]() . The only documented way to replace it is to build your own custom launcher and connect it to the Retell Chat Widget via the API .
Your options:
1. Use the Chat Widget with maximum customization (logo, colors, title, bot name) [(1) ]()
2. Use CSS overrides where possible (though Shadow DOM limits this) [(3) ]()
3. Contact Retell support about custom integration options beyond the widget
I don't have documentation for a /v1/agent/message endpoint or other backend APIs that would allow you to build a fully custom chat interface from scratch. The widget-based approach is what's currently documented.
Would you like me to provide general guidance on custom chat implementaAI Evy
11/27/2025, 3:22 PMAI Evy
11/27/2025, 3:22 PMAI Evy
11/27/2025, 3:22 PMShahzaib
11/27/2025, 3:39 PMShahzaib
11/27/2025, 3:40 PMShahzaib
11/27/2025, 3:59 PMShahzaib
11/27/2025, 3:59 PMShahzaib
11/27/2025, 4:16 PMShahzaib
11/27/2025, 4:20 PM