> ## 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 a call's transcript

> A call's transcript: the conversation and everything the agent did, in order.

Entries are the turns the agent and the customer spoke, the flows it entered and the blocks it chose, the
variables it stored, the knowledge it retrieved, the actions the flow ran, and events on the line such as
transfers. Each entry sets the one object its `type` names. A call in progress has a partial transcript.

Actions include recorded details for API requests, code, transfers, texts, emails, and more. Request details
may contain template placeholders. Credentials Phonely recognizes are replaced with `***`: by their name (such
as `api_key` or `password`) or their format (such as a Stripe or OpenAI key). This is best effort: a secret under
a name and in a format that don't say so can show, so keep credentials in a block's headers: every header value
except plain ones such as `Content-Type` is always masked.



## OpenAPI

````yaml /api-reference/v1/openapi.json get /v1/calls/{id}/transcript
openapi: 3.1.0
info:
  description: >-
    Authenticate every request with an org API key: `Authorization: Bearer
    phk_…`.
  title: Phonely API
  version: '1'
servers:
  - description: US
    url: https://api.us.phonely.ai
  - description: AU
    url: https://api.au.phonely.ai
security: []
paths:
  /v1/calls/{id}/transcript:
    get:
      tags:
        - Calls
      summary: Get a call's transcript
      description: >-
        A call's transcript: the conversation and everything the agent did, in
        order.


        Entries are the turns the agent and the customer spoke, the flows it
        entered and the blocks it chose, the

        variables it stored, the knowledge it retrieved, the actions the flow
        ran, and events on the line such as

        transfers. Each entry sets the one object its `type` names. A call in
        progress has a partial transcript.


        Actions include recorded details for API requests, code, transfers,
        texts, emails, and more. Request details

        may contain template placeholders. Credentials Phonely recognizes are
        replaced with `***`: by their name (such

        as `api_key` or `password`) or their format (such as a Stripe or OpenAI
        key). This is best effort: a secret under

        a name and in a format that don't say so can show, so keep credentials
        in a block's headers: every header value

        except plain ones such as `Content-Type` is always masked.
      operationId: get_call_transcript
      parameters:
        - description: The call's ID.
          in: path
          name: id
          required: true
          schema:
            description: The call's ID.
            title: Id
            type: string
        - description: Optional. Must be the key's org.
          in: header
          name: Phonely-Organization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Optional. Must be the key's org.
            title: Phonely-Organization
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallTranscript'
          description: Successful Response
          headers:
            Phonely-Organization:
              description: The authorized organization for this request.
              schema:
                type: string
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: >-
            The request is invalid: a malformed body, a bad or unknown field, or
            an unknown query parameter.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The API key is missing, invalid or revoked.
          headers:
            WWW-Authenticate:
              description: Always `Bearer`.
              schema:
                type: string
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: '`Phonely-Organization` must name the key''s organization.'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The resource doesn't exist, or belongs to another organization.
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Rate limited. Retry after the number of seconds in `Retry-After`.
          headers:
            Retry-After:
              description: Seconds until the request can be retried.
              schema:
                type: integer
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: An unexpected error. Contact support with the request ID.
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: >-
            Authentication, authorization or another required service is
            temporarily unavailable; or, as `query_timeout`, a read matched too
            much to finish in time: narrow its filters rather than retrying it
            as sent.
      security:
        - HTTPBearer: []
components:
  schemas:
    CallTranscript:
      additionalProperties: false
      description: >-
        A call's transcript: the conversation and everything the agent did, in
        order.
      properties:
        call_id:
          description: The call this transcript belongs to.
          title: Call Id
          type: string
        entries:
          description: >-
            Every step of the call, in order. May be empty or partial while the
            call is in progress.
          items:
            $ref: '#/components/schemas/TranscriptEntry'
          title: Entries
          type: array
        object:
          const: call_transcript
          default: call_transcript
          description: The type of this object, always `call_transcript`.
          title: Object
          type: string
        text:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The conversation as plain text, one `Agent: …` or `Customer: …` line
            per turn. `null` when nobody spoke.
          title: Text
      required:
        - object
        - call_id
        - entries
        - text
      title: CallTranscript
      type: object
    ErrorResponse:
      additionalProperties: false
      description: The body of every `/v1` error.
      properties:
        error:
          $ref: '#/components/schemas/Error'
          description: What went wrong.
      required:
        - error
      title: ErrorResponse
      type: object
    TranscriptEntry:
      additionalProperties: false
      description: >-
        One step of the call. `type` names the one object that is set; the
        others are `null`.
      properties:
        action:
          anyOf:
            - $ref: '#/components/schemas/TranscriptAction'
            - type: 'null'
          description: 'Set when `type` is `action`: an action of the flow ran.'
        agent:
          anyOf:
            - $ref: '#/components/schemas/TranscriptAgent'
            - type: 'null'
          description: 'Set when `type` is `agent`: a turn the agent spoke.'
        block:
          anyOf:
            - $ref: '#/components/schemas/TranscriptBlock'
            - type: 'null'
          description: >-
            Set when `type` is `block`: the agent chose which block to continue
            in, a new one or the one it was in.
        customer:
          anyOf:
            - $ref: '#/components/schemas/TranscriptCustomer'
            - type: 'null'
          description: 'Set when `type` is `customer`: a turn the customer spoke.'
        event:
          anyOf:
            - $ref: '#/components/schemas/TranscriptEvent'
            - type: 'null'
          description: 'Set when `type` is `event`: something happened on the line.'
        flow:
          anyOf:
            - $ref: '#/components/schemas/TranscriptFlow'
            - type: 'null'
          description: 'Set when `type` is `flow`: the call entered a flow.'
        knowledge:
          anyOf:
            - $ref: '#/components/schemas/TranscriptKnowledge'
            - type: 'null'
          description: >-
            Set when `type` is `knowledge`: knowledge the agent used for the
            next turn.
        started_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: When this step started. `null` when not recorded.
          title: Started At
        type:
          description: >-
            Which object holds this entry. Known values: `agent`, `customer`,
            `flow`, `block`, `variables`, `knowledge`, `action`, `event`. More
            can be added, so handle values you don't recognize.
          title: Type
          type: string
          x-extensible-enum:
            - agent
            - customer
            - flow
            - block
            - variables
            - knowledge
            - action
            - event
        variables:
          anyOf:
            - $ref: '#/components/schemas/TranscriptVariables'
            - type: 'null'
          description: 'Set when `type` is `variables`: the agent stored variable values.'
      required:
        - type
        - started_at
        - agent
        - customer
        - flow
        - block
        - variables
        - knowledge
        - action
        - event
      title: TranscriptEntry
      type: object
    Error:
      additionalProperties: false
      properties:
        code:
          description: >-
            What went wrong, stable and machine-readable. Known values:
            `validation_failed`, `invalid_cursor`, `invalid_api_key`,
            `insufficient_access`, `organization_mismatch`, `forbidden`,
            `not_found`, `method_not_allowed`, `conflict`,
            `agent_limit_reached`, `agent_too_large`, `sms_setup_required`,
            `opportunity_analysis_not_set_up`, `precondition_failed`,
            `payload_too_large`, `unsupported_media_type`,
            `precondition_required`, `rate_limited`, `internal_error`,
            `knowledge_processing_failed`, `bad_gateway`, `service_unavailable`,
            `gateway_timeout`, `query_timeout`. More can be added, so handle
            values you don't recognize.
          title: Code
          type: string
          x-extensible-enum:
            - validation_failed
            - invalid_cursor
            - invalid_api_key
            - insufficient_access
            - organization_mismatch
            - forbidden
            - not_found
            - method_not_allowed
            - conflict
            - agent_limit_reached
            - agent_too_large
            - sms_setup_required
            - opportunity_analysis_not_set_up
            - precondition_failed
            - payload_too_large
            - unsupported_media_type
            - precondition_required
            - rate_limited
            - internal_error
            - knowledge_processing_failed
            - bad_gateway
            - service_unavailable
            - gateway_timeout
            - query_timeout
        details:
          description: One entry per problem field. Empty when the error has none.
          items:
            $ref: '#/components/schemas/ErrorDetail'
          title: Details
          type: array
        message:
          description: For people. Wording can change; branch on `code`.
          title: Message
          type: string
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Also in the `X-Request-Id` header. Quote it to support.
          title: Request Id
      required:
        - code
        - message
        - details
        - request_id
      title: Error
      type: object
    TranscriptAction:
      additionalProperties: false
      description: >-
        One action. The object for its family is set, when it recorded any of
        that family's fields; every other

        family's object is `null`.
      properties:
        code:
          anyOf:
            - $ref: '#/components/schemas/TranscriptCode'
            - type: 'null'
          description: >-
            Set for a code action (`code`): what it ran with, returned and
            printed.
        duration_seconds:
          anyOf:
            - type: number
            - type: 'null'
          description: How long it took, in seconds. `null` when not recorded.
          title: Duration Seconds
        email:
          anyOf:
            - $ref: '#/components/schemas/TranscriptEmail'
            - type: 'null'
          description: >-
            Set for an email (`send_email`, `gmail`, `outlook`,
            `send_email_v2`).
        filter:
          anyOf:
            - $ref: '#/components/schemas/TranscriptFilter'
            - type: 'null'
          description: 'Set for a filter (`filter`, `filter_v2`): which case held.'
        flow_transfer:
          anyOf:
            - $ref: '#/components/schemas/TranscriptFlowTransfer'
            - type: 'null'
          description: Set when the call moved to another flow (`transfer_workflow`).
        http:
          anyOf:
            - $ref: '#/components/schemas/TranscriptHttp'
            - type: 'null'
          description: >-
            Set for an API request (`api_request`): recorded request and
            response details.
        name:
          anyOf:
            - type: string
            - type: 'null'
          description: The action's name, as the flow labels it.
          title: Name
        notification:
          anyOf:
            - $ref: '#/components/schemas/TranscriptNotification'
            - type: 'null'
          description: Set for a notification about the call (`notification`).
        redial:
          anyOf:
            - $ref: '#/components/schemas/TranscriptRedial'
            - type: 'null'
          description: 'Set for a redial (`redial`): when the customer will be called again.'
        sms:
          anyOf:
            - $ref: '#/components/schemas/TranscriptSms'
            - type: 'null'
          description: Set for a text message (`send_sms`).
        stage:
          description: >-
            When it ran: before the call, during it, or after it ended. Known
            values: `pre_call`, `in_call`, `post_call`. More can be added, so
            handle values you don't recognize.
          title: Stage
          type: string
          x-extensible-enum:
            - pre_call
            - in_call
            - post_call
        status:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Whether it succeeded. An API request succeeded on a 2xx answer and
            failed on any other or on a timeout; a webhook by whether its data
            arrived; a redial when one was scheduled; any other action as it
            recorded. `null` when it recorded no outcome. Known values:
            `succeeded`, `failed`. More can be added, so handle values you don't
            recognize.
          title: Status
          x-extensible-enum:
            - succeeded
            - failed
        transfer:
          anyOf:
            - $ref: '#/components/schemas/TranscriptTransfer'
            - type: 'null'
          description: >-
            Set for a call transfer (`transfer_call`): where it went, or how a
            warm transfer ended.
        type:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            What kind of action ran, as recorded: usually the type of the block
            that ran it, such as `api_request`, `send_sms` or `transfer_call`,
            or a step the agent runs itself, such as `outbound_variables` before
            an outbound call. `null` when not recorded.
          title: Type
        variables:
          anyOf:
            - items:
                $ref: '#/components/schemas/TranscriptVariable'
              type: array
            - type: 'null'
          description: >-
            Set for `outbound_variables`: the values the outbound call started
            with. Credentials Phonely recognizes are replaced with `***` (best
            effort).
          title: Variables
        webhook:
          anyOf:
            - $ref: '#/components/schemas/TranscriptWebhook'
            - type: 'null'
          description: Set for a webhook that delivers data before the call (`webhook`).
      required:
        - type
        - name
        - stage
        - status
        - duration_seconds
        - http
        - code
        - transfer
        - flow_transfer
        - sms
        - email
        - filter
        - webhook
        - redial
        - notification
        - variables
      title: TranscriptAction
      type: object
    TranscriptAgent:
      additionalProperties: false
      properties:
        instructions:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The prompt of the block the agent was answering from, as written in
            the flow, including its `[[…]]` placeholders.
          title: Instructions
        possible_blocks:
          anyOf:
            - items:
                $ref: '#/components/schemas/TranscriptBlockOption'
              type: array
            - type: 'null'
          description: The blocks the agent could move to on this turn.
          title: Possible Blocks
        response_type:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            What kind of message this is, when it is not a plain reply. `null`
            for a plain reply. Known values: `interim_message`, `silence_check`,
            `greeting`, `on_hold_music_reminder_message`,
            `on_hold_reminder_message`, `reminder_message`,
            `warm_transfer_chat`. More can be added, so handle values you don't
            recognize.
          title: Response Type
          x-extensible-enum:
            - interim_message
            - silence_check
            - greeting
            - on_hold_music_reminder_message
            - on_hold_reminder_message
            - reminder_message
            - warm_transfer_chat
        text:
          description: What the agent said, with speech markup removed.
          title: Text
          type: string
      required:
        - text
        - response_type
        - instructions
        - possible_blocks
      title: TranscriptAgent
      type: object
    TranscriptBlock:
      additionalProperties: false
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          description: The block's ID in the flow.
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          description: The block's name, as shown in the flow editor.
          title: Name
        reason:
          anyOf:
            - type: string
            - type: 'null'
          description: Why the agent chose this block, as the agent explained it.
          title: Reason
        type:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            What kind of block it is, as the flow stores it: `prompt` for a Talk
            block, `transfer_call`, `api_request`, and so on. `primary` is the
            agent's main conversation, outside any flow block.
          title: Type
        variables_used:
          anyOf:
            - items:
                $ref: '#/components/schemas/TranscriptVariable'
              type: array
            - type: 'null'
          description: The variables the agent used to make this choice, with their values.
          title: Variables Used
      required:
        - id
        - name
        - type
        - reason
        - variables_used
      title: TranscriptBlock
      type: object
    TranscriptCustomer:
      additionalProperties: false
      properties:
        is_endpoint_detected:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the agent detected that the customer had finished speaking.
            `false` means it waited for the silence timeout. `null` when not
            recorded.
          title: Is Endpoint Detected
        is_interruption:
          description: Whether the customer started this turn by cutting the agent off.
          title: Is Interruption
          type: boolean
        text:
          description: What the customer said, as transcribed.
          title: Text
          type: string
      required:
        - text
        - is_interruption
        - is_endpoint_detected
      title: TranscriptCustomer
      type: object
    TranscriptEvent:
      additionalProperties: false
      properties:
        recording_offset_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            When it happened, in whole seconds from the start of the call's
            recording. `null` when not recorded.
          title: Recording Offset Seconds
        type:
          description: >-
            What happened. Known values: `agent_disconnected`,
            `inbound_leg_transfer_initiated`, `inbound_leg_transferred`,
            `inbound_leg_ended_transfer`, `outbound_leg_entered`,
            `outbound_left_mid_transfer`, `human_detection_initiated`,
            `voice_failed_over`, `transcriber_failed_over`,
            `transcriber_failover_failed`, `call_ended_no_working_transcriber`.
            More can be added, so handle values you don't recognize.
          title: Type
          type: string
          x-extensible-enum:
            - agent_disconnected
            - inbound_leg_transfer_initiated
            - inbound_leg_transferred
            - inbound_leg_ended_transfer
            - outbound_leg_entered
            - outbound_left_mid_transfer
            - human_detection_initiated
            - voice_failed_over
            - transcriber_failed_over
            - transcriber_failover_failed
            - call_ended_no_working_transcriber
      required:
        - type
        - recording_offset_seconds
      title: TranscriptEvent
      type: object
    TranscriptFlow:
      additionalProperties: false
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          description: The flow's ID.
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          description: The flow's name.
          title: Name
        type:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Whether it is an inbound or an outbound flow. `null` when not
            recorded. Known values: `inbound`, `outbound`. More can be added, so
            handle values you don't recognize.
          title: Type
          x-extensible-enum:
            - inbound
            - outbound
        version_id:
          anyOf:
            - type: string
            - type: 'null'
          description: The ID of the flow version that ran. `null` when not recorded.
          title: Version Id
        version_name:
          anyOf:
            - type: string
            - type: 'null'
          description: That version's name. `null` when not recorded.
          title: Version Name
        version_number:
          anyOf:
            - type: integer
            - type: 'null'
          description: That version's number. `null` when not recorded.
          title: Version Number
      required:
        - id
        - name
        - type
        - version_id
        - version_number
        - version_name
      title: TranscriptFlow
      type: object
    TranscriptKnowledge:
      additionalProperties: false
      properties:
        context:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The knowledge text the agent had for this turn: the agent's fixed
            knowledge plus what it retrieved.
          title: Context
        sources:
          anyOf:
            - items:
                $ref: '#/components/schemas/TranscriptKnowledgeSource'
              type: array
            - type: 'null'
          description: >-
            The knowledge sources the agent retrieved content from for this
            turn.
          title: Sources
      required:
        - sources
        - context
      title: TranscriptKnowledge
      type: object
    TranscriptVariables:
      additionalProperties: false
      properties:
        captured:
          description: >-
            Variables whose value the agent stored at this point: each value
            appears once, where it was first stored or changed.
          items:
            $ref: '#/components/schemas/TranscriptVariable'
          title: Captured
          type: array
      required:
        - captured
      title: TranscriptVariables
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        field:
          description: >-
            The field the issue is about, as sent: `agent_id`, `limit`. Empty
            when none.
          title: Field
          type: string
        issue:
          description: >-
            What is wrong with the field. Known values: `required`,
            `unknown_field`, `invalid_json`, `invalid_type`, `invalid_value`,
            `out_of_range`, `invalid_cursor`, `read_only_field`. More can be
            added, so handle values you don't recognize.
          title: Issue
          type: string
          x-extensible-enum:
            - required
            - unknown_field
            - invalid_json
            - invalid_type
            - invalid_value
            - out_of_range
            - invalid_cursor
            - read_only_field
        message:
          description: 'For people: what is wrong with this field.'
          title: Message
          type: string
      required:
        - field
        - issue
        - message
      title: ErrorDetail
      type: object
    TranscriptCode:
      additionalProperties: false
      properties:
        error:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The error the code raised. `null` when it raised none. Credentials
            Phonely recognizes are replaced with `***` (best effort).
          title: Error
        input:
          $ref: '#/components/schemas/JsonValue'
          description: >-
            What the code ran with. As recorded: an object or array, or a string
            when it wasn't JSON or was too long to keep whole (it then ends with
            a note saying it was truncated). Credentials Phonely recognizes are
            replaced with `***` (best effort).
        logs:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            What the code printed. `null` when it printed nothing. Credentials
            Phonely recognizes are replaced with `***` (best effort).
          title: Logs
        output:
          $ref: '#/components/schemas/JsonValue'
          description: >-
            What the code returned. As recorded: an object or array, or a string
            when it wasn't JSON or was too long to keep whole (it then ends with
            a note saying it was truncated). Credentials Phonely recognizes are
            replaced with `***` (best effort).
      required:
        - input
        - output
        - logs
        - error
      title: TranscriptCode
      type: object
    TranscriptEmail:
      additionalProperties: false
      properties:
        bcc:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: The addresses blind-copied. `null` when none.
          title: Bcc
        body:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The email's body, as sent. Credentials Phonely recognizes are
            replaced with `***` (best effort).
          title: Body
        body_format:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Whether `body` is plain text or HTML. Known values: `text`, `html`.
            More can be added, so handle values you don't recognize.
          title: Body Format
          x-extensible-enum:
            - text
            - html
        cc:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: The addresses copied. `null` when none, or the block has no copies.
          title: Cc
        from_email:
          anyOf:
            - type: string
            - type: 'null'
          description: The address it was sent from. `null` when the block sets none.
          title: From Email
        from_name:
          anyOf:
            - type: string
            - type: 'null'
          description: The sender name the email showed.
          title: From Name
        reply_to:
          anyOf:
            - type: string
            - type: 'null'
          description: The address replies go to. `null` when the block sets none.
          title: Reply To
        subject:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The email's subject. Credentials Phonely recognizes are replaced
            with `***` (best effort).
          title: Subject
        to:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: The addresses the email was sent to.
          title: To
      required:
        - to
        - cc
        - bcc
        - from_name
        - from_email
        - reply_to
        - subject
        - body
        - body_format
      title: TranscriptEmail
      type: object
    TranscriptFilter:
      additionalProperties: false
      properties:
        cases:
          anyOf:
            - items:
                $ref: '#/components/schemas/TranscriptFilterCase'
              type: array
            - type: 'null'
          description: >-
            The cases evaluated, in order, up to the one that held. `null` when
            not recorded.
          title: Cases
        is_matched:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether a case held. `false` means the call took the else branch.
            `null` when not recorded.
          title: Is Matched
        matched_case:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            The number of the case that held. `null` when none did, or when only
            `is_matched` was recorded.
          title: Matched Case
      required:
        - is_matched
        - matched_case
        - cases
      title: TranscriptFilter
      type: object
    TranscriptFlowTransfer:
      additionalProperties: false
      properties:
        flow_id:
          anyOf:
            - type: string
            - type: 'null'
          description: The ID of the flow the call moved to.
          title: Flow Id
        flow_name:
          anyOf:
            - type: string
            - type: 'null'
          description: That flow's name. `null` when not recorded.
          title: Flow Name
      required:
        - flow_id
        - flow_name
      title: TranscriptFlowTransfer
      type: object
    TranscriptHttp:
      additionalProperties: false
      properties:
        is_timed_out:
          default: false
          description: Whether the request ran out of time before an answer came back.
          title: Is Timed Out
          type: boolean
        method:
          anyOf:
            - type: string
            - type: 'null'
          description: The HTTP method, such as `POST`. `null` when not recorded.
          title: Method
        request_body:
          $ref: '#/components/schemas/JsonValue'
          description: >-
            The recorded request body, which may contain template placeholders.
            As recorded: an object or array, or a string when it wasn't JSON or
            was too long to keep whole (it then ends with a note saying it was
            truncated). Credentials Phonely recognizes are replaced with `***`
            (best effort).
        request_headers:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          description: >-
            The recorded request headers, which may contain template
            placeholders. Only `Content-Type`, `Accept`, `Accept-Language`,
            `User-Agent` and `Content-Length` show their value; every other
            value is `***`.
          title: Request Headers
        response_body:
          $ref: '#/components/schemas/JsonValue'
          description: >-
            The body that came back. As recorded: an object or array, or a
            string when it wasn't JSON or was too long to keep whole (it then
            ends with a note saying it was truncated). Credentials Phonely
            recognizes are replaced with `***` (best effort).
        status_code:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            The HTTP status code of the answer. `null` when none came back, or
            when the request was blocked before it was sent (`response_body`
            then says so).
          title: Status Code
        url:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The recorded request URL, including query parameters. It may contain
            template placeholders. A webhook URL's path, its password and
            credential-named query values are replaced with `***`. Credentials
            Phonely recognizes are replaced with `***` (best effort).
          title: Url
      required:
        - method
        - url
        - status_code
        - is_timed_out
        - request_headers
        - request_body
        - response_body
      title: TranscriptHttp
      type: object
    TranscriptNotification:
      additionalProperties: false
      properties:
        email_to:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: The addresses an email about the call went to.
          title: Email To
        emails_sent:
          anyOf:
            - type: integer
            - type: 'null'
          description: How many of the emails were sent.
          title: Emails Sent
        sms_sent:
          anyOf:
            - type: integer
            - type: 'null'
          description: How many of the texts were sent.
          title: Sms Sent
        sms_to:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: The numbers a text about the call went to.
          title: Sms To
      required:
        - sms_to
        - email_to
        - sms_sent
        - emails_sent
      title: TranscriptNotification
      type: object
    TranscriptRedial:
      additionalProperties: false
      properties:
        delay_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          description: How long after this call the redial happens.
          title: Delay Seconds
        reason:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Why no redial was scheduled, as recorded, such as the redial limit
            being reached.
          title: Reason
        type:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            How the customer will be called again: `retry_after` a delay in the
            same campaign, or `move_to_campaign`. `null` when no redial was
            scheduled. Known values: `retry_after`, `move_to_campaign`. More can
            be added, so handle values you don't recognize.
          title: Type
          x-extensible-enum:
            - retry_after
            - move_to_campaign
      required:
        - type
        - delay_seconds
        - reason
      title: TranscriptRedial
      type: object
    TranscriptSms:
      additionalProperties: false
      properties:
        from:
          anyOf:
            - type: string
            - type: 'null'
          description: The number it was sent from.
          title: From
        message:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The text that was sent. Credentials Phonely recognizes are replaced
            with `***` (best effort).
          title: Message
        message_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Twilio's ID for the message (its SID). `null` when none was sent.
          title: Message Id
        to:
          anyOf:
            - type: string
            - type: 'null'
          description: The number the text was sent to.
          title: To
      required:
        - to
        - from
        - message
        - message_id
      title: TranscriptSms
      type: object
    TranscriptTransfer:
      additionalProperties: false
      properties:
        destination:
          anyOf:
            - type: string
            - type: 'null'
          description: The number or SIP address the call was transferred to.
          title: Destination
        mode:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            `cold` hands the call over; `warm` connects a person first. Set on
            the transfer itself. Known values: `cold`, `warm`. More can be
            added, so handle values you don't recognize.
          title: Mode
          x-extensible-enum:
            - cold
            - warm
        result:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            A warm transfer's result, recorded as a second action after the
            transfer. `human_detected` means a person answered; every other
            result means the transfer did not connect. Known values:
            `human_detected`, `voicemail_detected`, `ivr_detected`, `sms_route`,
            `transfer_failed`, `dialout_stopped`. More can be added, so handle
            values you don't recognize.
          title: Result
          x-extensible-enum:
            - human_detected
            - voicemail_detected
            - ivr_detected
            - sms_route
            - transfer_failed
            - dialout_stopped
      required:
        - destination
        - mode
        - result
      title: TranscriptTransfer
      type: object
    TranscriptVariable:
      additionalProperties: false
      properties:
        name:
          description: The variable's name, as the agent's flow defines it.
          title: Name
          type: string
        value:
          description: Its value, as recorded.
          title: Value
      required:
        - name
        - value
      title: TranscriptVariable
      type: object
    TranscriptWebhook:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/JsonValue'
          description: >-
            The data the webhook delivered. As recorded: an object or array, or
            a string when it wasn't JSON or was too long to keep whole (it then
            ends with a note saying it was truncated). Credentials Phonely
            recognizes are replaced with `***` (best effort).
        is_received:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Whether the webhook's data had arrived when the call needed it.
          title: Is Received
      required:
        - is_received
        - data
      title: TranscriptWebhook
      type: object
    TranscriptBlockOption:
      additionalProperties: false
      properties:
        name:
          description: The block's name, as shown in the flow editor.
          title: Name
          type: string
      required:
        - name
      title: TranscriptBlockOption
      type: object
    TranscriptKnowledgeSource:
      additionalProperties: false
      properties:
        id:
          description: The knowledge source's ID.
          title: Id
          type: string
        name:
          anyOf:
            - type: string
            - type: 'null'
          description: The knowledge source's name.
          title: Name
      required:
        - id
        - name
      title: TranscriptKnowledgeSource
      type: object
    JsonValue: {}
    TranscriptFilterCase:
      additionalProperties: false
      properties:
        conditions:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            Each condition as it was evaluated, values filled in, such as `94107
            equals 94107 = True`. Credentials Phonely recognizes are replaced
            with `***` (best effort).
          title: Conditions
        is_matched:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Whether the case held.
          title: Is Matched
        logic_operator:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Whether every condition had to hold (`and`) or any one (`or`). Known
            values: `and`, `or`. More can be added, so handle values you don't
            recognize.
          title: Logic Operator
          x-extensible-enum:
            - and
            - or
        number:
          description: 'The case''s number, as the flow labels it: `Case 1` is 1.'
          title: Number
          type: integer
      required:
        - number
        - logic_operator
        - conditions
        - is_matched
      title: TranscriptFilterCase
      type: object
  securitySchemes:
    HTTPBearer:
      description: 'An org API key: `Authorization: Bearer phk_…`'
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.