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

# Transcripts

export const MethodTag = ({method = "GET", path, label, colors = {}}) => {
  const presets = {
    get: {
      label: "GET",
      light: {
        bg: "#DCFCE7",
        text: "#15803D"
      },
      dark: {
        bg: "rgba(34,197,94,0.16)",
        text: "#4ADE80"
      }
    },
    post: {
      label: "POST",
      light: {
        bg: "#DBEAFE",
        text: "#1D4ED8"
      },
      dark: {
        bg: "rgba(59,130,246,0.16)",
        text: "#60A5FA"
      }
    },
    put: {
      label: "PUT",
      light: {
        bg: "#FEF3C7",
        text: "#B45309"
      },
      dark: {
        bg: "rgba(245,158,11,0.16)",
        text: "#FBBF24"
      }
    },
    patch: {
      label: "PATCH",
      light: {
        bg: "#F3E8FF",
        text: "#7E22CE"
      },
      dark: {
        bg: "rgba(168,85,247,0.16)",
        text: "#C084FC"
      }
    },
    delete: {
      label: "DEL",
      light: {
        bg: "#FEE2E2",
        text: "#B91C1C"
      },
      dark: {
        bg: "rgba(239,68,68,0.16)",
        text: "#F87171"
      }
    }
  };
  const fallback = {
    label: String(method).toUpperCase(),
    light: {
      bg: "#F3F4F6",
      text: "#374151"
    },
    dark: {
      bg: "rgba(156,163,175,0.16)",
      text: "#D1D5DB"
    }
  };
  const preset = presets[String(method).toLowerCase()] || fallback;
  const light = {
    ...preset.light,
    ...colors.light || ({})
  };
  const dark = {
    ...preset.dark,
    ...colors.dark || ({})
  };
  const css = `
    .invoca-method-tag {
      display: inline-block;
      padding: 1px 8px;
      margin-right: 8px;
      border-radius: 8px;
      font-size: 10px;
      line-height: 18px;
      font-weight: 700;
      letter-spacing: 0.4px;
      text-transform: uppercase;
      vertical-align: middle;
      background: var(--imt-bg);
      color: var(--imt-fg);
    }
    .invoca-method-path {
      font-size: 13px;
    }
    [data-component-part="accordion-icon"]:has(.invoca-method-tag) {
      width: auto;
      height: auto;
      flex-shrink: 0;
    }
    [data-component-part="accordion-icon"] .invoca-method-tag {
      margin-right: 0;
    }
    [data-component-part="accordion-button"]:has(.invoca-method-tag) {
      flex-wrap: wrap;
      row-gap: 6px;
    }
    [data-component-part="accordion-button"]:has(.invoca-method-tag) [data-component-part="accordion-icon"] {
      flex: 1 1 0;
      min-width: 0;
      overflow-wrap: anywhere;
    }
    [data-component-part="accordion-button"]:has(.invoca-method-tag) [data-component-part="accordion-title-container"] {
      flex: 0 0 calc(100% - 8px);
      padding-left: 20px;
    }
    [data-component-part="accordion-button"]:has(.invoca-method-tag) [data-component-part="accordion-title"] {
      font-size: 12px;
    }
    .dark .invoca-method-tag,
    [data-theme="dark"] .invoca-method-tag {
      background: var(--imt-bg-dark);
      color: var(--imt-fg-dark);
    }
  `;
  const vars = {
    "--imt-bg": light.bg,
    "--imt-fg": light.text,
    "--imt-bg-dark": dark.bg,
    "--imt-fg-dark": dark.text
  };
  return <span>
      <style>{css}</style>
      <span className="invoca-method-tag" style={vars}>
        {label || preset.label}
      </span>
      {path ? <code className="invoca-method-path">{path}</code> : null}
    </span>;
};

## URL

The API follows REST conventions. Perform an HTTPS GET to the URL with the format in which you’d like to receive data. The following response formats are supported, where CUID-33 is the call record id.

<table className="parameters docutils align-default"><thead><tr className="row-odd"><th className="head"><p>Format</p></th><th className="head"><p>Description and URL</p></th></tr></thead><tbody><tr className="row-even"><td><p>json (default)</p></td><td><p>Returns a JSON array of the transcript. <code>[https://mynetwork.invoca.net/call/transcript/CUID-33?transcript\_format=agent](https://mynetwork.invoca.net/call/transcript/CUID-33?transcript_format=agent)</code></p></td></tr></tbody></table>

## Authentication

The API uses OAuth to validate access. The OAuth Token can be passed in two ways. The first way is to pass the OAuth Token in the header of the request. The second is to pass the OAuth Token like any other query parameter. Please note that the OAuth Token is a required parameter. OAuth Tokens may be generated from the Manage API Credentials page.

## Query Parameters

The API takes the following optional query parameters:

<table className="parameters docutils align-default"><thead><tr className="row-odd"><th className="head"><p>Parameter</p></th><th className="head"><p>Description</p></th></tr></thead><tbody><tr className="row-even"><td><p>transcript\_format= (required)</p></td><td><p>Determines what format the transcripts are returned as, see response parameters below for information on each format.</p></td></tr></tbody></table>

## Response

<AccordionGroup>
  <Accordion title="Get a transcript of the call for just the caller" icon={<MethodTag method="get" path="/call/transcript/<call_record_id>?transcript_format=caller;"/>}>
    #### Examples

    Get transcript for the given call record `CUID-33` with just the caller included

    Endpoint:

    `https://mynetwork.invoca.net/call/transcript/CUID-33?transcript_format=caller`

    Format: application/json

    Response Code: 200

    Response Body:

    ```json theme={null}
    [
      {
        "caller": "Orange, Awesome thank you, Have a good one"
      }
    ]
    ```
  </Accordion>

  <Accordion title="Get a transcript of the call for just the agent" icon={<MethodTag method="get" path="/call/transcript/<call_record_id>?transcript_format=agent;"/>}>
    #### Examples

    Get transcript for the given call record `CUID-33` with just the agent included

    Endpoint:

    `https://mynetwork.invoca.net/call/transcript/CUID-33?transcript_format=agent`

    Format: application/json

    Response Code: 200

    Response Body:

    ```json theme={null}
    [
      {
        "agent": "Which Color?, Okay I will look into that, Goodbye!"
      }
    ]
    ```
  </Accordion>

  <Accordion title="Get a transcript of the call as a block" icon={<MethodTag method="get" path="/call/transcript/<call_record_id>?transcript_format=caller_agent_block;"/>}>
    #### Examples

    Get transcript for the given call record `CUID-33` with both agent and caller included in a single block for each.

    Endpoint:

    `https://mynetwork.invoca.net/call/transcript/CUID-33?transcript_format=caller_agent_block`

    Format: application/json

    Response Code: 200

    Response Body:

    ```json theme={null}
    [
      { "agent": "Which Color?, Okay I will look into that, Goodbye!" },
      { "caller": "Orange, Awesome thank you, Have a good one" }
    ]
    ```
  </Accordion>

  <Accordion title="Get a transcript of the call as a conversation" icon={<MethodTag method="get" path="/call/transcript/<call_record_id>?transcript_format=caller_agent_conversation;"/>}>
    #### Examples

    Get transcript for the given call record `CUID-33` with both agent and caller included in the corresponding conversation order.

    Endpoint:

    `https://mynetwork.invoca.net/call/transcript/CUID-33?transcript_format=caller_agent_conversation`

    Format: application/json

    Response Code: 200

    Response Body:

    ```json theme={null}
    [
      { "agent": "Which Color?" },
      { "caller": "Orange" },
      { "agent": "Okay I will look into that" },
      { "caller": "Awesome thank you" },
      { "agent": "Goodbye!" },
      { "caller": "Have a good one" }
    ]
    ```
  </Accordion>
</AccordionGroup>

Endpoint:

`https://mynetwork.invoca.net/call/transcript/<call_record_id>?transcript_format=<format>`
