medivoice_63089
09/06/2025, 4:48 PMAI Evy
09/06/2025, 4:48 PMAI Evy
09/06/2025, 4:48 PMGET /get-chat/{chat_id} [(1) ]()
- For creating a chat session, use the create chat endpoint [(2) ]()
Verify your authentication:
- Ensure you're using the correct API key format: "Bearer YOUR_API_KEY" in the Authorization header [(1) ]()
Common issues that cause 404s:
- Invalid chat_id format - it should look like: "16b980523634a6dc504898cda492e939"
- Incorrect agent configuration during creation [(3) ]()
For chat agent setup:
- Make sure you've properly created a chat agent first [(4) ]()
- You can create a new chat agent or convert an existing voice agent to a chat agent
Here's the correct JavaScript implementation for retrieving a chat:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatResponse = await client.chat.retrieve('16b980523634a6dc504898cda492e939') ;
console.log(chatResponse.agent_id) ;
[(1) ]()
If you're still getting 404s, verify that:
1. Your chat agent is properly created [(4) ]()
2. You're using the correct chat_id format [(1) ]()
3. Your API key has proper permissionsAI Evy
09/06/2025, 4:48 PMAI Evy
09/06/2025, 4:48 PM