Saltar al contenido principal
GET
/
v1
/
calls
/
{callId}
curl -X GET "https://api.contactship.ai/v1/calls/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
  -H "x-api-key: your-api-key"
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "direction": "outbound",
  "from": "+12025551234",
  "call_record": "https://api.contactship.ai/recordings/a1b2c3d4.mp3",
  "call_status": "completed",
  "call_result": "answered",
  "disconnection_reason": "agent_hangup",
  "finished_at": "2026-03-15T14:35:22Z",
  "start_at": "2026-03-15T14:30:05Z",
  "duration": 317,
  "call_analysis": {
    "summary": "Customer expressed interest in the premium plan and requested a demo.",
    "sentiment": "positive"
  },
  "type": "ai_call",
  "created_at": "2026-03-15T14:30:00Z",
  "agent_id": "f1e2d3c4-b5a6-7890-1234-567890abcdef",
  "contact": {
    "id": "c1d2e3f4-a5b6-7890-cdef-123456789012",
    "full_name": "Jane Smith",
    "phone_number": "+14155552678",
    "email": "jane.smith@example.com",
    "country": "US"
  },
  "chat_history": [
    {
      "role": "agent",
      "content": "Hello, this is an AI assistant calling from ContactShip. Am I speaking with Jane?"
    },
    {
      "role": "user",
      "content": "Yes, this is Jane."
    },
    {
      "role": "agent",
      "content": "Great! I'm reaching out about our premium plan. Do you have a moment to chat?"
    }
  ],
  "transcript_format": "json"
}
Returns the full details of a single call. The transcript (chat_history) is included by default — pass include_transcript=false to omit it. Use include_words=true for per-word timing data, or transcript_format=toon for a token-efficient encoding.

Path Parameters

callId
string
requerido
The UUID of the call to retrieve.

Headers

x-api-key
string
requerido
Your API key for authentication. Found in your dashboard under API settings.

Query Parameters

include_transcript
boolean
predeterminado:"true"
Include chat_history (transcript) in the response. Defaults to true.
include_words
boolean
predeterminado:"false"
Include per-word timing data in transcript entries. Only applies when include_transcript=true.
include_tools
boolean
predeterminado:"false"
Include chat_history_with_tools in the response.
transcript_format
string
predeterminado:"json"
Format for transcript output. Possible values: json (raw array), toon (token-efficient TOON encoding).

Response

id
string
Unique identifier of the call (UUID).
direction
string
Call direction: inbound or outbound.
from
string
The phone number that initiated the call (E.164 format).
call_record
string
URL to the call recording, if available.
call_status
string
Status of the call. Possible values: in-progress, completed, no-answer, failed, in-queue, incomplete, busy, answering-machine, scheduled, voice_mail.
call_result
string
Outcome of the call. Possible values: answered, voicemail, no_answer, busy, failed.
disconnection_reason
string
Reason the call was disconnected, if applicable.
finished_at
string
Timestamp when the call ended (ISO 8601).
start_at
string
Timestamp when the call started (ISO 8601).
duration
number
Call duration in seconds.
call_analysis
object
AI-generated analysis of the call (summary, sentiment, etc.).
type
string
Call type identifier.
created_at
string
Timestamp when the call record was created (ISO 8601).
agent_id
string
UUID of the AI agent that handled the call.
contact
object
Contact associated with the call.
chat_history
array or string
Transcript of the call. Present when include_transcript=true (default). Returns an array of transcript entries (JSON format) or a TOON-encoded string when transcript_format=toon.
chat_history_with_tools
array or string
Full transcript including tool/function calls. Present when include_tools=true.
transcript_format
string
Format used for transcript fields. Present when transcript is included.

Error Codes

  • 401 Unauthorized — Invalid or missing API key
  • 404 Not Found — Call not found or does not belong to your organization
  • 500 Internal Server Error — Server-side error

Code Examples

curl -X GET "https://api.contactship.ai/v1/calls/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
  -H "x-api-key: your-api-key"
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "direction": "outbound",
  "from": "+12025551234",
  "call_record": "https://api.contactship.ai/recordings/a1b2c3d4.mp3",
  "call_status": "completed",
  "call_result": "answered",
  "disconnection_reason": "agent_hangup",
  "finished_at": "2026-03-15T14:35:22Z",
  "start_at": "2026-03-15T14:30:05Z",
  "duration": 317,
  "call_analysis": {
    "summary": "Customer expressed interest in the premium plan and requested a demo.",
    "sentiment": "positive"
  },
  "type": "ai_call",
  "created_at": "2026-03-15T14:30:00Z",
  "agent_id": "f1e2d3c4-b5a6-7890-1234-567890abcdef",
  "contact": {
    "id": "c1d2e3f4-a5b6-7890-cdef-123456789012",
    "full_name": "Jane Smith",
    "phone_number": "+14155552678",
    "email": "jane.smith@example.com",
    "country": "US"
  },
  "chat_history": [
    {
      "role": "agent",
      "content": "Hello, this is an AI assistant calling from ContactShip. Am I speaking with Jane?"
    },
    {
      "role": "user",
      "content": "Yes, this is Jane."
    },
    {
      "role": "agent",
      "content": "Great! I'm reaching out about our premium plan. Do you have a moment to chat?"
    }
  ],
  "transcript_format": "json"
}