PixelDrift42
08/28/2025, 11:57 PMAI Evy
08/28/2025, 11:57 PMAI Evy
08/28/2025, 11:57 PMclient.call.retrieve() method to get the call details and check its status [(1) ]() .
python
from retell import Retell
client = Retell(
api_key="YOUR_RETELL_API_KEY",
)
# Retrieve call details by call_id
call_response = client.call.retrieve(call_id)
print(call_response)
[(2) ]() , [(1) ]()
The retrieve method returns a CallResponse object that contains the call's status and other details . You can examine the response to determine if the call was successful based on the call's status information.
Additionally, you can use webhooks to receive real-time notifications about call events. You can verify webhook authenticity using the provided verification method [(3) ]() :
python
from retell import Retell
import express
from express import Request, Response
app = express()
app.use(express.json() )
app.post("/webhook", (req: Request, res: Response) => {
if (
!Retell.verify(
JSON.stringify(req.body) ,
process.env.RETELL_API_KEY,
req.headers["x-retell-signature"] as string,
)
) :
console.error("Invalid signature")
return
const {event, call} = req.body
# process the webhook
# Acknowledge the receipt of the event
res.status(204) .send()
})AI Evy
08/28/2025, 11:57 PMAI Evy
08/28/2025, 11:57 PM