https://retellai.com/?utm_source=discord&utm_medium=seo logo
Hi @Alexandre Yes, there are ways to access detail...
# ❓・ai-evy-support
v
@AI Evy Hi @Alexandre Yes, there are ways to access detailed logs via the API. Here's what you can do: Use the Get Call API: This API allows you to retrieve detailed information about a call, including: Transcript Recording Latency tracking Other call-related data Set up webhooks: You can configure webhooks to receive real-time updates about calls. Webhooks will notify you when a call is: Initiated Ended Analyzed Post-call analysis: You can retrieve analysis results programmatically using the Get Call API. This will provide you with detailed information about the call after it has concluded. how to set this up for one agent?
a
Thanks for tagging me @Vyyy. I'll look through relevant sources and get back to you shortly.
### Answer To set up detailed logging for a specific agent, you have two main options: ## Option 1: Agent-Level Webhook When creating or updating your agent, you can set a
webhook_url
specific to that agent. [(1) ]() This webhook will receive call events (
call_started
,
call_ended
,
call_analyzed
) for calls handled by that agent. [(2) ]() The
webhook_url
field binds webhook events for this agent to the specified URL and will ignore the account-level webhook for this agent. [(1) ]() ## Option 2: Get Call API You can retrieve call details programmatically using the Get Call API: [(3) ]()
Copy code
javascript
import Retell from 'retell-sdk';

const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;

const callResponse = await client.call.retrieve('119c3f8e47135a29e65947eeb34cf12d') ;
console.log(callResponse) ;
This returns transcript, recording URL, latency metrics, and call analysis data. [(4) ]() , [(3) ]() ## Webhook Events The webhook will POST payloads containing the event type and call object: [(2) ]() -
call_started
– when a call begins -
call_ended
– when a call completes (includes transcript, recording) -
call_analyzed
– when post-call analysis is complete For post-call analysis results, you can also access them via the dashboard, webhook (
call_analyzed
event) , or the Get Call API. [(5) ]()
​ To learn more, see the sources I considered: [[1] Create Voice Agent](https://docs.retellai.com/api-references/create-agent) [[2] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[3] Get Call](https://docs.retellai.com/api-references/get-call) [[4] Receive calls](https://docs.retellai.com/deploy/inbound-call) [[5] Consume the analysis data](https://docs.retellai.com/features/post-call-analysis-consumption) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.