> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phonely.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Call

> Fetch one call record and related details through the frontend API.

Retrieves detailed information about a specific call made to an agent.

### Request

**Method:** `POST`\
**Endpoint:** `/api/get-call`\
**Headers:**

* `X-Authorization`: Your API key (required)
* `Content-Type`: `application/json`

**Request Body:**

```json theme={null}
{
  "uid": "string",
  "agentId": "string",
  "callId": "string"
}
```

**Parameters:**

* `uid` (string, required): Your user ID
* `agentId` (string, required): The ID of the agent that received the call
* `callId` (string, required): The ID of the call to retrieve

### Response

**Success Response (200):**

```json theme={null}
{
  "callId": "string",
  "agentName": "string",
  "businessPhoneNumber": "string",
  "callerPhoneNumber": "string",
  "startTime": "string",
  "endTime": "string",
  "duration": number,
  "status": "string",
  "transcript": "string",
  "recordingUrl": "string"
}
```

**Error Responses:**

* `400 Bad Request`: Invalid request body
* `401 Unauthorized`: Invalid or missing API key, or insufficient permissions
* `404 Not Found`: Call not found or invalid call ID
* `500 Internal Server Error`: Server error

### Example

```bash theme={null}
curl -X POST https://app.phonely.ai/api/get-call \
  -H "X-Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "uid": "user123",
    "agentId": "agent456",
    "callId": "call789"
  }'
```


## OpenAPI

````yaml POST /get-call
openapi: 3.0.1
info:
  title: Phonely API
  description: API for Phonely services including agent management and call summaries
  version: 1.0.0
servers:
  - url: https://app.phonely.ai/api
security: []
paths:
  /get-call:
    post:
      summary: Get call information
      description: Retrieve information for a specific call
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetCallRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CallSummaryResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    GetCallRequest:
      type: object
      required:
        - uid
        - agentId
        - callId
      properties:
        uid:
          type: string
          description: User ID (can be retrieved from the user settings page)
        agentId:
          type: string
          description: Agent ID (can be retrieved from the agent settings page)
        callId:
          type: string
          description: Call ID (can be retrieved from the call history page)
    CallSummaryResponse:
      type: object
      properties:
        agentName:
          type: string
          description: Name of the agent handling the call
        mentionedEmail:
          type: string
          nullable: true
          description: Email address mentioned during the call
        unansweredQuestions:
          type: array
          items:
            type: string
          description: List of questions that were not answered during the call
        actionItems:
          type: array
          items:
            type: string
          description: List of action items identified during the call
        followUpReason:
          type: string
          description: Reason for any required follow-up
        followUp:
          type: string
          description: Indicator if follow-up is required
        recordingUrl:
          type: string
          description: URL to access the call recording
        dashboardUrl:
          type: string
          description: URL to access the call dashboard
        purpose:
          type: string
          description: Main purpose or topic of the call
        sentiment:
          type: string
          description: Overall sentiment of the call
        transcriptText:
          type: string
          description: Full text transcript of the call
        transcript:
          type: array
          items:
            $ref: '#/components/schemas/TranscriptEntry'
          description: Structured transcript of the call
        mentionedDate:
          type: string
          nullable: true
          description: Any specific date mentioned during the call
        businessPhoneNumber:
          type: string
          description: Phone number of the agent
        keyPoints:
          type: array
          items:
            type: string
          description: Key points or highlights from the call
        topic:
          type: string
          description: Main topic or category of the call
        longSummary:
          type: string
          nullable: true
          description: Detailed summary of the call
        callId:
          type: string
          description: Unique identifier for the call
        ai_success:
          type: string
          description: Indicator of AI's success in handling the call
        customerPhoneNumber:
          type: string
          description: Phone number of the customer
        callStarted:
          type: string
          format: date-time
          description: Date string when the call started
        callEnded:
          type: string
          format: date-time
          description: Date string when the call ended
        duration:
          type: number
          description: Duration of the call in seconds
        callerName:
          type: string
          description: Name of the caller
        callDirection:
          type: string
          description: Direction of the call (inbound/outbound)
        mentionedTime:
          type: string
          nullable: true
          description: Any specific time mentioned during the call
        summary:
          type: string
          description: Brief summary of the call
        endedReason:
          type: string
          description: Reason for the call ending
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error code or identifier
        message:
          type: string
          description: Detailed error message
    TranscriptEntry:
      type: object
      properties:
        content:
          type: string
          description: Content of the transcript entry
        role:
          type: string
          description: Role of the speaker (e.g., assistant, user)
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Authorization

````