> ## 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.

# Report call diagnostics

> **Required scope:** `sessions:manage`

Records quality figures or an error that your app measured for one of its connections. The Console shows the latest quality report and the reported errors of each connection on the call. Reports are optional and are accepted while the call is live and for 10 minutes after it ends. Each connection can send one quality report every 5 seconds and 20 error reports per minute. At most 200 reports are kept per call: at that limit a quality report replaces the same connection's oldest quality report. A quality report from a connection with no stored quality report, and every error report, is accepted but not stored.



## OpenAPI

````yaml api-reference/features/communicate.json POST /messaging/voip/calls/{id}/reports
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:
  /messaging/voip/calls/{id}/reports:
    post:
      tags:
        - Calls
      summary: Report call diagnostics
      description: >-
        **Required scope:** `sessions:manage`


        Records quality figures or an error that your app measured for one of
        its connections. The Console shows the latest quality report and the
        reported errors of each connection on the call. Reports are optional and
        are accepted while the call is live and for 10 minutes after it ends.
        Each connection can send one quality report every 5 seconds and 20 error
        reports per minute. At most 200 reports are kept per call: at that limit
        a quality report replaces the same connection's oldest quality report. A
        quality report from a connection with no stored quality report, and
        every error report, is accepted but not stored.
      operationId: nativeVoipReportCallDiagnostics
      parameters:
        - schema:
            type: string
            minLength: 1
            example: call-123
          required: true
          name: id
          in: path
          description: |-
            Identifier for this resource.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | String length | At least `1` characters |
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/native__VoipCallReportRequest'
      responses:
        '202':
          description: Report accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__SuccessResponse'
        '400':
          description: Bad request — request body or params failed validation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: invalid_request_error
                  code: invalid_parameter
                  message: Correct the invalid request field.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#invalid-parameter
        '401':
          description: Missing or invalid authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: authentication_error
                  code: invalid_credential
                  message: Supply a valid credential.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#invalid-credential
        '403':
          description: Authenticated but not permitted (missing scope or rule violation)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: permission_error
                  code: permission_denied
                  message: The credential does not have access to this resource.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#permission-denied
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: invalid_request_error
                  code: resource_not_found
                  message: The resource is unavailable to this caller.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#resource-not-found
        '409':
          description: >-
            `state_conflict` when the call is not live, ended more than 10
            minutes ago, or is outside the credential's boundary
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: conflict_error
                  code: state_conflict
                  message: The request conflicts with the resource state.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#state-conflict
        '410':
          description: Call ended — the pod that owned its media is gone (pod_lost)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: invalid_request_error
                  code: resource_gone
                  message: The requested retained resource has expired or was removed.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#resource-gone
        '429':
          description: >-
            The connection exceeded its report limit: one quality report every 5
            seconds or 20 error reports per minute
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: rate_limit_error
                  code: rate_limit_exceeded
                  message: >-
                    The request limit was reached. Follow Retry-After when
                    supplied.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#rate-limit-exceeded
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: api_error
                  code: internal_error
                  message: >-
                    An unexpected service failure occurred. Keep the request ID
                    for support.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#internal-error
        '503':
          description: Call authority or report storage is unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: api_error
                  code: service_unavailable
                  message: >-
                    A required service is unavailable. Check completion before
                    repeating a write.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#service-unavailable
      security:
        - native__BearerAuth: []
      servers:
        - url: https://api.polymorfa.com
components:
  schemas:
    native__VoipCallReportRequest:
      oneOf:
        - $ref: '#/components/schemas/native__VoipCallQualityReport'
        - $ref: '#/components/schemas/native__VoipCallErrorReport'
      discriminator:
        propertyName: kind
        mapping:
          quality:
            $ref: '#/components/schemas/native__VoipCallQualityReport'
          error:
            $ref: '#/components/schemas/native__VoipCallErrorReport'
    native__SuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Whether the request succeeded.
        message:
          type: string
          description: Human-readable message associated with this result.
      required:
        - success
    native__PublicError:
      type: object
      properties:
        error:
          type: object
          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
              enum:
                - invalid_parameter
                - invalid_credential
                - entitlement_required
                - method_not_allowed
                - permission_denied
                - missing_scope
                - resource_not_found
                - media_fetch_failed
                - resource_gone
                - feature_unavailable
                - stream_cursor_invalid
                - stream_cursor_expired
                - stream_connection_limit_reached
                - state_conflict
                - idempotency_conflict
                - idempotency_in_progress
                - idempotency_completed
                - idempotency_outcome_unknown
                - call_claimed
                - call_not_ringing
                - connection_limit
                - unsupported_for_connection
                - call_permission_required
                - invalid_sip_trunk
                - calls_disabled
                - sip_trunk_in_use
                - sip_trunk_revision_conflict
                - sip_trunk_limit
                - sip_unavailable
                - rate_limit_exceeded
                - internal_error
                - operation_not_supported
                - upstream_failure
                - service_unavailable
                - credential_verification_unavailable
                - session_not_ready
                - command_dispatch_failed
                - result_unknown
                - recipient_not_on_whatsapp
                - conversation_window_closed
                - template_not_approved
                - media_too_large
                - whatsapp_rate_limited
                - new_chat_limit_reached
                - whatsapp_account_restricted
                - bansafe_suspended
                - bansafe_org_suspended
                - bansafe_cold_blocked
                - bansafe_cold_held
                - bansafe_throttled
                - bansafe_daily_allowance_reached
                - bansafe_accounting_unavailable
                - bansafe_send_outcome_unknown
                - campaigns_not_entitled
              description: >-
                Stable machine-readable code for this result.


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

                **Allowed values**

                | Value | Meaning |

                | --- | --- |

                | `invalid_parameter` | Invalid parameter. |

                | `invalid_credential` | Invalid credential. |

                | `entitlement_required` | Entitlement required. |

                | `method_not_allowed` | Method not allowed. |

                | `permission_denied` | Permission denied. |

                | `missing_scope` | Missing scope. |

                | `resource_not_found` | Resource not found. |

                | `media_fetch_failed` | Media fetch failed. |

                | `resource_gone` | Resource gone. |

                | `feature_unavailable` | Feature unavailable. |

                | `stream_cursor_invalid` | Stream cursor invalid. |

                | `stream_cursor_expired` | Stream cursor expired. |

                | `stream_connection_limit_reached` | Stream connection limit
                reached. |

                | `state_conflict` | State conflict. |

                | `idempotency_conflict` | Idempotency conflict. |

                | `idempotency_in_progress` | Idempotency in progress. |

                | `idempotency_completed` | Idempotency completed. |

                | `idempotency_outcome_unknown` | Idempotency outcome unknown. |

                | `call_claimed` | Call claimed. |

                | `call_not_ringing` | Call not ringing. |

                | `connection_limit` | Connection limit. |

                | `unsupported_for_connection` | Unsupported for connection. |

                | `call_permission_required` | Call permission required. |

                | `invalid_sip_trunk` | Invalid sip trunk. |

                | `calls_disabled` | Calls disabled. |

                | `sip_trunk_in_use` | Sip trunk in use. |

                | `sip_trunk_revision_conflict` | Sip trunk revision conflict. |

                | `sip_trunk_limit` | Sip trunk limit. |

                | `sip_unavailable` | Sip unavailable. |

                | `rate_limit_exceeded` | Rate limit exceeded. |

                | `internal_error` | Internal error. |

                | `operation_not_supported` | Operation not supported. |

                | `upstream_failure` | Upstream failure. |

                | `service_unavailable` | Service unavailable. |

                | `credential_verification_unavailable` | Credential
                verification unavailable. |

                | `session_not_ready` | Session not ready. |

                | `command_dispatch_failed` | Command dispatch failed. |

                | `result_unknown` | Result unknown. |

                | `recipient_not_on_whatsapp` | Recipient not on whatsapp. |

                | `conversation_window_closed` | Conversation window closed. |

                | `template_not_approved` | Template not approved. |

                | `media_too_large` | Media too large. |

                | `whatsapp_rate_limited` | Whatsapp rate limited. |

                | `new_chat_limit_reached` | New chat limit reached. |

                | `whatsapp_account_restricted` | Whatsapp account restricted. |

                | `bansafe_suspended` | Bansafe suspended. |

                | `bansafe_org_suspended` | Bansafe org suspended. |

                | `bansafe_cold_blocked` | Bansafe cold blocked. |

                | `bansafe_cold_held` | Bansafe cold held. |

                | `bansafe_throttled` | Bansafe throttled. |

                | `bansafe_daily_allowance_reached` | Bansafe daily allowance
                reached. |

                | `bansafe_accounting_unavailable` | Bansafe accounting
                unavailable. |

                | `bansafe_send_outcome_unknown` | Bansafe send outcome unknown.
                |

                | `campaigns_not_entitled` | Campaigns not entitled. |
            message:
              type: string
              description: Human-readable message associated with this result.
            param:
              type: string
              nullable: true
              description: |-
                Specifies param for this error.

                <!-- 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` |
          required:
            - type
            - code
            - message
            - param
            - request_id
          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: |-
            Specifies docs for this native public error.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uri` |
      required:
        - error
        - data
        - docs
    native__VoipCallQualityReport:
      type: object
      properties:
        kind:
          type: string
          enum:
            - quality
          description: |-
            Kind discriminator for this object.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `quality` | Quality. |
        connectionId:
          type: string
          pattern: ^[A-Za-z0-9_-]{8,64}$
          description: >-
            Client-chosen identifier of one media connection. Reusing it
            replaces that connection.


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

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Pattern | `^[A-Za-z0-9_-]{8,64}$` |
          example: conn_0123456789
        participant:
          type: string
          pattern: ^[A-Za-z0-9._:@-]{1,128}$
          description: >-
            Server credentials only: the participant acting in the call.
            Defaults to `default`. Client tokens act as their own participant
            and must omit this field.


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

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Pattern | `^[A-Za-z0-9._:@-]{1,128}$` |
          example: agent-7
        client:
          allOf:
            - $ref: '#/components/schemas/native__VoipCallReportClient'
          description: Specifies client for this native voip call quality report.
        quality:
          allOf:
            - $ref: '#/components/schemas/native__VoipCallQuality'
          description: |-
            Specifies quality for this native voip call quality report.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Object size | At least `1` properties |
      required:
        - kind
        - connectionId
        - quality
      additionalProperties: false
    native__VoipCallErrorReport:
      type: object
      properties:
        kind:
          type: string
          enum:
            - error
          description: |-
            Kind discriminator for this object.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `error` | Error. |
        connectionId:
          type: string
          pattern: ^[A-Za-z0-9_-]{8,64}$
          description: >-
            Client-chosen identifier of one media connection. Reusing it
            replaces that connection.


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

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Pattern | `^[A-Za-z0-9_-]{8,64}$` |
          example: conn_0123456789
        participant:
          type: string
          pattern: ^[A-Za-z0-9._:@-]{1,128}$
          description: >-
            Server credentials only: the participant acting in the call.
            Defaults to `default`. Client tokens act as their own participant
            and must omit this field.


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

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Pattern | `^[A-Za-z0-9._:@-]{1,128}$` |
          example: agent-7
        client:
          allOf:
            - $ref: '#/components/schemas/native__VoipCallReportClient'
          description: Specifies client for this native voip call error report.
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - media_permission_denied
                - device_not_found
                - device_in_use
                - ice_failed
                - negotiation_failed
                - media_timeout
                - reconnect_exhausted
                - token_refresh_failed
                - unsupported_browser
                - other
              description: |-
                Stable machine-readable code for this result.

                <!-- polymorfa-input-table -->
                **Allowed values**
                | Value | Meaning |
                | --- | --- |
                | `media_permission_denied` | Media permission denied. |
                | `device_not_found` | Device not found. |
                | `device_in_use` | Device in use. |
                | `ice_failed` | Ice failed. |
                | `negotiation_failed` | Negotiation failed. |
                | `media_timeout` | Media timeout. |
                | `reconnect_exhausted` | Reconnect exhausted. |
                | `token_refresh_failed` | Token refresh failed. |
                | `unsupported_browser` | Unsupported browser. |
                | `other` | Other. |
          required:
            - code
          additionalProperties: false
          description: Error details returned when the operation fails.
      required:
        - kind
        - connectionId
        - error
      additionalProperties: false
    native__VoipCallReportClient:
      type: object
      properties:
        sdk:
          type: string
          pattern: ^[a-z0-9@/._-]{1,32}$
          description: |-
            Package name of the SDK that sends the report.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Pattern | `^[a-z0-9@/._-]{1,32}$` |
          example: '@polymorfa/browser'
        version:
          type: string
          maxLength: 32
          pattern: ^[0-9]{1,6}\.[0-9]{1,6}\.[0-9]{1,6}(?:[-+][0-9A-Za-z.+-]{1,24})?$
          description: >-
            SDK version: `MAJOR.MINOR.PATCH` with an optional suffix.


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

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | String length | At most `32` characters |

            | Pattern |
            `^[0-9]{1,6}\.[0-9]{1,6}\.[0-9]{1,6}(?:[-+][0-9A-Za-z.+-]{1,24})?$`
            |
          example: 1.4.0
        platform:
          type: string
          enum:
            - browser
            - node
            - other
          description: |-
            Specifies platform for this native voip call report client.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `browser` | Browser. |
            | `node` | Node. |
            | `other` | Other. |
      required:
        - sdk
        - version
        - platform
      additionalProperties: false
    native__VoipCallQuality:
      type: object
      properties:
        rttMs:
          type: integer
          minimum: 0
          maximum: 60000
          description: |-
            Round-trip time in milliseconds.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Numeric value | `0` through `60000` (inclusive) |
          example: 84
        jitterMs:
          type: integer
          minimum: 0
          maximum: 60000
          description: |-
            Receive jitter in milliseconds.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Numeric value | `0` through `60000` (inclusive) |
          example: 6
        packetsLost:
          type: integer
          minimum: 0
          maximum: 2147483647
          description: |-
            Packets lost since the connection started.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Numeric value | `0` through `2147483647` (inclusive) |
          example: 12
        packetsReceived:
          type: integer
          minimum: 0
          maximum: 2147483647
          description: |-
            Packets received since the connection started.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Numeric value | `0` through `2147483647` (inclusive) |
          example: 4810
        audioCodec:
          type: string
          pattern: ^[A-Za-z0-9/.-]{1,32}$
          description: |-
            Negotiated audio codec.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Pattern | `^[A-Za-z0-9/.-]{1,32}$` |
          example: audio/opus
        videoCodec:
          type: string
          pattern: ^[A-Za-z0-9/.-]{1,32}$
          description: |-
            Negotiated video codec.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Pattern | `^[A-Za-z0-9/.-]{1,32}$` |
          example: video/VP8
        candidateType:
          type: string
          enum:
            - host
            - srflx
            - prflx
            - relay
          description: >-
            Type of the local ICE candidate in use. `relay` means media flows
            through a TURN relay.


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

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `host` | Host. |

            | `srflx` | Srflx. |

            | `prflx` | Prflx. |

            | `relay` | Relay. |
        reconnects:
          type: integer
          minimum: 0
          maximum: 1000
          description: |-
            Times this connection reconnected so far.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Numeric value | `0` through `1000` (inclusive) |
          example: 0
      additionalProperties: false
      description: Omit figures you did not measure. Send at least one.
      minProperties: 1
  securitySchemes:
    native__BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Polymorfa organization key (pmfa_ prefix), project token (pmfa_pt_
        prefix) where supported, or short-lived client token (pmfa_ct_ prefix).
        Organization and project keys may be personal or service-account owned
        and enforce selected action scopes. Organization keys cover the team and
        its projects; project tokens stay inside one project. Client tokens stay
        inside their live project and session and enforce their client rules.

````