POST
/
v1
/
retell
/
call
curl --request POST \
  --url https://api.roark.ai/v1/retell/call \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "retellCallEndedPayload": {
    "event": "call_ended",
    "call": {
      "call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
      "from_number": "+1234567890",
      "call_type": "web_call",
      "start_timestamp": "1703302407333",
      "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
      "to_number": "+0987654321",
      "direction": "inbound",
      "recording_url": "https://retell.ai/recordings/call-123456.mp3",
      "disconnection_reason": "agent_hangup",
      "end_timestamp": "1703302407333",
      "duration_ms": 120000,
      "transcript_object": [
        {
          "role": "agent",
          "content": "Hello, thank you for calling!",
          "words": [
            {
              "word": "hi",
              "start": 0.7,
              "end": 1.3
            }
          ]
        },
        {
          "role": "customer",
          "content": "Hi, I have a question about my account.",
          "words": [
            {
              "word": "hi",
              "start": 0.7,
              "end": 1.3
            }
          ]
        }
      ],
      "transcript_with_tool_calls": [
        {
          "role": "tool_call_result",
          "tool_call_id": "call-id-123",
          "name": "function_name",
          "arguments": "{ key: \"value\" }"
        }
      ]
    }
  },
  "properties": {
    "business_name": "customer-business-name",
    "business_id": "customer-business-id"
  }
}'
{
  "data": {
    "callId": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Retell call upload payload

Response

200
application/json

Created Retell call upload job

The response is of type object.