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

# List call records

> Lists call detail records, newest first. Filter by project, number, direction, connection, outcome and start time. The other party appears only as `peerRef`, a team-specific pseudonym; phone numbers are never returned. Pass `page.nextCursor` as `cursor` with the same filters to read the next page.

Requires `sessions:read`. Project tokens only access resources in their own project.



## OpenAPI

````yaml api-reference/features/communicate.json GET /platform/calls
openapi: 3.0.3
info:
  title: Communicate API methods
  version: 1.0.0
  description: >-
    Task-focused communicate methods across supported Polymorfa connection
    types.
servers: []
security: []
paths:
  /platform/calls:
    get:
      tags:
        - Calls
      summary: List call records
      description: >-
        Lists call detail records, newest first. Filter by project, number,
        direction, connection, outcome and start time. The other party appears
        only as `peerRef`, a team-specific pseudonym; phone numbers are never
        returned. Pass `page.nextCursor` as `cursor` with the same filters to
        read the next page.


        Requires `sessions:read`. Project tokens only access resources in their
        own project.
      operationId: managementListCallRecords
      parameters:
        - name: projectId
          in: query
          required: false
          description: Project to read. Omit to total every project in the organization.
          schema:
            type: string
        - name: sessionId
          in: query
          required: false
          schema:
            type: string
            minLength: 1
            maxLength: 128
            description: Session name of one number.
          description: |-
            Identifier of the connected Polymorfa session.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | String length | `1` through `128` characters |
        - schema:
            type: string
            enum:
              - inbound
              - outbound
          required: false
          name: direction
          in: query
          description: |-
            Specifies direction for this query parameter.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `inbound` | Inbound. |
            | `outbound` | Outbound. |
        - name: upstream
          in: query
          required: false
          schema:
            type: string
            enum:
              - linked_device
              - cloud_api
            description: How the number connects to WhatsApp.
          description: |-
            Specifies upstream for this query parameter.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `linked_device` | Linked device. |
            | `cloud_api` | Cloud api. |
        - name: outcome
          in: query
          required: false
          schema:
            type: string
            enum:
              - answered
              - missed
              - declined
              - failed
              - in_progress
            description: >-
              How the call went. `answered`: media connected, including answered
              calls still in progress. `declined`: declined by a participant or
              the other party, or the line was busy. `missed`: nobody answered
              before ringing stopped or the caller hung up. `failed`: ended
              before it connected for any other reason, such as a connection or
              capacity failure. `in_progress`: still ringing.
          description: |-
            Specifies outcome for this query parameter.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `answered` | Answered. |
            | `missed` | Missed. |
            | `declined` | Declined. |
            | `failed` | Failed. |
            | `in_progress` | In progress. |
        - name: since
          in: query
          required: false
          schema:
            type: string
            format: date-time
            description: Include calls that started at or after this time.
          description: |-
            Specifies since for this query parameter.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `date-time` |
        - name: until
          in: query
          required: false
          schema:
            type: string
            format: date-time
            description: Include calls that started before this time.
          description: |-
            Specifies until for this query parameter.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `date-time` |
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
          description: |-
            Specifies limit for this query parameter.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Numeric value | `1` through `100` (inclusive) |
        - name: cursor
          in: query
          required: false
          schema:
            type: string
            minLength: 1
            maxLength: 256
          description: |-
            Specifies cursor for this query parameter.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | String length | `1` through `256` characters |
      responses:
        '200':
          description: Success
          headers:
            X-Request-Id:
              schema:
                type: string
              description: Stable request correlation identifier.
            Polymorfa-Version:
              schema:
                type: string
              description: API version applied to this response.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  data:
                    type: array
                    maxItems: 100
                    items:
                      $ref: '#/components/schemas/management__CallRecord'
                    description: |-
                      Structured data carried by this object.

                      <!-- polymorfa-input-table -->
                      **Value constraints**
                      | Constraint | Accepted input |
                      | --- | --- |
                      | Array size | At most `100` items |
                  page:
                    allOf:
                      - $ref: '#/components/schemas/management__CursorPageMetadata'
                    description: Specifies page for this schema.
                required:
                  - data
                  - page
        '400':
          $ref: '#/components/responses/management__BadRequest'
        '401':
          $ref: '#/components/responses/management__Unauthorized'
        '403':
          $ref: '#/components/responses/management__Forbidden'
      security:
        - management__ApiKeyAuth: []
      servers:
        - url: https://api.polymorfa.com
components:
  schemas:
    management__CallRecord:
      type: object
      additionalProperties: false
      description: One call detail record.
      properties:
        callId:
          type: string
          description: Call identifier.
        projectId:
          type: string
          format: uuid
          nullable: true
          description: |-
            Project of the number, or null when the number has been deleted.

            <!-- polymorfa-input-table -->
            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `string`; Format: `uuid` |
            | Alternative 2 | `null` |

            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
        sessionId:
          type: string
          description: Session name of the number that placed or received the call.
        direction:
          type: string
          enum:
            - inbound
            - outbound
          description: |-
            Specifies direction for this management call record.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `inbound` | Inbound. |
            | `outbound` | Outbound. |
        upstream:
          type: string
          enum:
            - linked_device
            - cloud_api
          description: |-
            How the number connects to WhatsApp.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `linked_device` | Linked device. |
            | `cloud_api` | Cloud api. |
        outcome:
          type: string
          enum:
            - answered
            - missed
            - declined
            - failed
            - in_progress
          description: >-
            How the call went. `answered`: media connected, including answered
            calls still in progress. `declined`: declined by a participant or
            the other party, or the line was busy. `missed`: nobody answered
            before ringing stopped or the caller hung up. `failed`: ended before
            it connected for any other reason, such as a connection or capacity
            failure. `in_progress`: still ringing.


            <!-- polymorfa-input-table -->

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `answered` | Answered. |

            | `missed` | Missed. |

            | `declined` | Declined. |

            | `failed` | Failed. |

            | `in_progress` | In progress. |
        state:
          type: string
          enum:
            - offered
            - accepted
            - rejected
            - missed
            - ended
          description: >-
            Call outcome. `offered` and `accepted` calls may still be live.
            `rejected` is an incoming call a participant declined. `missed` is
            an incoming call that rang without an answer. Both keep that state
            after the call ends. `ended` covers every other finished call:
            answered calls, outgoing calls, and incoming calls the service could
            not host. `endReason` gives the cause.


            <!-- polymorfa-input-table -->

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `offered` | Offered. |

            | `accepted` | Accepted. |

            | `rejected` | Rejected. |

            | `missed` | Missed. |

            | `ended` | Ended. |
        hasVideo:
          type: boolean
          description: Whether video.
        peerRef:
          type: string
          nullable: true
          description: >-
            Team-specific pseudonym of the other party: the same party has the
            same value across your team's calls. Null when unknown.


            <!-- polymorfa-input-table -->

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `string` |

            | Alternative 2 | `null` |
        startedAt:
          type: string
          format: date-time
          description: |-
            Timestamp for started at.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `date-time` |
        connectedAt:
          type: string
          format: date-time
          nullable: true
          description: |-
            Timestamp for connected at.

            <!-- polymorfa-input-table -->
            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `string`; Format: `date-time` |
            | Alternative 2 | `null` |

            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `date-time` |
        endedAt:
          type: string
          format: date-time
          nullable: true
          description: |-
            Timestamp for ended at.

            <!-- polymorfa-input-table -->
            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `string`; Format: `date-time` |
            | Alternative 2 | `null` |

            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `date-time` |
        durationSeconds:
          type: integer
          minimum: 0
          nullable: true
          description: >-
            Connected seconds; 0 for a call that never connected and null until
            the call ends.


            <!-- polymorfa-input-table -->

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `integer`; Numeric value: `0` or greater |

            | Alternative 2 | `null` |


            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Numeric value | `0` or greater |
        endReason:
          type: string
          pattern: ^[a-z][a-z0-9_]{0,63}$
          nullable: true
          example: user_hangup
          description: >-
            Why the call ended, such as `user_hangup`, `ring_timeout`,
            `rejected` or `lost_connection`. `other` for an unrecognized reason;
            null until the call ends.


            <!-- polymorfa-input-table -->

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `string`; Pattern: `^[a-z][a-z0-9_]{0,63}$`
            |

            | Alternative 2 | `null` |


            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Pattern | `^[a-z][a-z0-9_]{0,63}$` |
      required:
        - callId
        - projectId
        - sessionId
        - direction
        - upstream
        - outcome
        - state
        - hasVideo
        - peerRef
        - startedAt
        - connectedAt
        - endedAt
        - durationSeconds
        - endReason
    management__CursorPageMetadata:
      type: object
      additionalProperties: false
      properties:
        nextCursor:
          type: string
          nullable: true
          description: |-
            Specifies next cursor for this management cursor page metadata.

            <!-- polymorfa-input-table -->
            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `string` |
            | Alternative 2 | `null` |
        hasMore:
          type: boolean
          description: Whether more.
      required:
        - nextCursor
        - hasMore
    management__ErrorEnvelope:
      type: object
      required:
        - error
        - data
        - docs
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
            - param
            - request_id
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - conflict_error
                - rate_limit_error
                - api_error
                - upstream_error
              description: |-
                Type discriminator for this object.

                <!-- polymorfa-input-table -->
                **Allowed values**
                | Value | Meaning |
                | --- | --- |
                | `invalid_request_error` | Invalid request error. |
                | `authentication_error` | Authentication error. |
                | `permission_error` | Permission error. |
                | `conflict_error` | Conflict error. |
                | `rate_limit_error` | Rate limit error. |
                | `api_error` | Api error. |
                | `upstream_error` | Upstream error. |
            code:
              type: string
              description: Stable failure code. Use this value for programmatic handling.
            message:
              type: string
              description: Safe explanation of the failure.
            param:
              type: string
              nullable: true
              description: |-
                Invalid request field, or null when no field applies.

                <!-- polymorfa-input-table -->
                **Accepted alternatives**
                | Alternative | Accepted input |
                | --- | --- |
                | Alternative 1 | Type: `string` |
                | Alternative 2 | `null` |
            request_id:
              type: string
              description: >-
                Matches the X-Request-Id response header. Include it when you
                contact support.
            request_log_url:
              type: string
              format: uri
              description: >-
                Console page that shows this request. Returned only to
                organization and project credentials whose request was logged.


                <!-- polymorfa-input-table -->

                **Value constraints**

                | Constraint | Accepted input |

                | --- | --- |

                | Format | `uri` |
          description: Error details returned when the operation fails.
        data:
          type: string
          nullable: true
          enum:
            - null
          description: |-
            Always null for a failed request.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `null` | Null. |

            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `string` |
            | Alternative 2 | `null` |
        docs:
          type: string
          format: uri
          description: |-
            Documentation link to this failure code.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uri` |
  responses:
    management__BadRequest:
      description: A path, query, or request-body value did not pass validation.
      headers:
        X-Request-Id:
          schema:
            type: string
          description: Stable request correlation identifier.
        Polymorfa-Version:
          schema:
            type: string
          description: API version applied to this response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/management__ErrorEnvelope'
    management__Unauthorized:
      description: Missing/invalid credential for this audience.
      headers:
        X-Request-Id:
          schema:
            type: string
          description: Stable request correlation identifier.
        Polymorfa-Version:
          schema:
            type: string
          description: API version applied to this response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/management__ErrorEnvelope'
    management__Forbidden:
      description: Authenticated but lacks the required scope/role/audience.
      headers:
        X-Request-Id:
          schema:
            type: string
          description: Stable request correlation identifier.
        Polymorfa-Version:
          schema:
            type: string
          description: API version applied to this response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/management__ErrorEnvelope'
  securitySchemes:
    management__ApiKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Send your team API key or project token as `Authorization: Bearer
        <token>`. The credential must have the required permissions. Project
        tokens can access only their own project.

````