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

# Custom Integrations

> Send calls from any platform using our API and SDKs

## Overview

Not using one of our pre-built integrations? No problem. Send call data from any voice AI platform or custom application — just provide an audio file and Roark handles the rest: transcription, speech analysis, sentiment detection, and metric collection.

***

## Send a Call

<Tabs>
  <Tab title="Node.js">
    Install the [Node.js SDK](/documentation/sdks/node-sdk):

    ```bash theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
    npm install @roarkanalytics/sdk
    ```

    ```typescript theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
    import Roark from '@roarkanalytics/sdk'

    const client = new Roark({
      bearerToken: process.env.ROARK_API_BEARER_TOKEN,
    })

    const call = await client.call.create({
      recordingUrl: 'https://your-storage.com/call-recording.mp3',
      startedAt: '2024-01-15T10:00:00Z',
      interfaceType: 'PHONE',
      callDirection: 'INBOUND',
      agent: {
        name: 'Support Agent',
        customId: 'custom-agent-1',
      },
      customer: {
        phoneNumberE164: '+1234567890',
      },
      properties: {
        department: 'sales',
        region: 'us-east',
      },
    })
    ```
  </Tab>

  <Tab title="Python">
    Install the [Python SDK](/documentation/sdks/python-sdk):

    ```bash theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
    pip install roark-analytics
    ```

    ```python theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
    import os
    from roark_analytics import Roark

    client = Roark(
        bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"),
    )

    call = client.call.create(
        recording_url="https://your-storage.com/call-recording.mp3",
        started_at="2024-01-15T10:00:00Z",
        interface_type="PHONE",
        call_direction="INBOUND",
        agent={
            "name": "Support Agent",
            "customId": "custom-agent-1",
        },
        customer={
            "phoneNumberE164": "+1234567890",
        },
        properties={
            "department": "sales",
            "region": "us-east",
        },
    )
    ```
  </Tab>

  <Tab title="cURL">
    Use the [REST API](/api-reference/introduction) directly:

    ```bash theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
    curl --request POST \
      --url https://api.roark.ai/v1/call \
      --header 'Authorization: Bearer YOUR_API_KEY' \
      --header 'Content-Type: application/json' \
      --data '{
        "recordingUrl": "https://your-storage.com/call-recording.mp3",
        "startedAt": "2024-01-15T10:00:00Z",
        "interfaceType": "PHONE",
        "callDirection": "INBOUND",
        "agent": {
          "name": "Support Agent",
          "customId": "custom-agent-1"
        },
        "customer": {
          "phoneNumberE164": "+1234567890"
        },
        "properties": {
          "department": "sales",
          "region": "us-east"
        }
      }'
    ```
  </Tab>
</Tabs>

Once a call is created, it appears in [Call History](/documentation/observability/live-monitoring) and is automatically transcribed and analyzed.

***

## What You Can Send

| Data                     | Description                                                  |
| :----------------------- | :----------------------------------------------------------- |
| **Audio file**           | MP3, WAV, M4A, or FLAC — via public URL or base64            |
| **Metadata**             | Agent info, customer details, call direction, interface type |
| **Custom properties**    | Arbitrary key-value pairs for filtering and segmentation     |
| **Tool calls**           | Function/tool invocations made during the conversation       |
| **Pre-transcribed text** | If you already have a transcript, send it along              |

### Audio Requirements

| Spec            | Requirement                               |
| :-------------- | :---------------------------------------- |
| **Format**      | MP3, WAV, M4A, or FLAC                    |
| **Sample Rate** | 8kHz or higher                            |
| **Channels**    | Mono or stereo                            |
| **Duration**    | Up to 2 hours                             |
| **File Size**   | Max 500MB                                 |
| **Access**      | Publicly accessible URL or base64 encoded |

***

## What Happens Next

Once a call is ingested, Roark automatically:

1. **Transcribes and analyzes** the conversation — speech patterns, sentiment, 64+ emotions, interruptions, and more
2. **Runs metric collectors** — any active [metric collectors](/documentation/metrics/metric-collectors) collect metrics automatically (LLM evaluations, compliance checks, custom KPIs)
3. **Makes it searchable** — the call appears in [Call History](/documentation/observability/live-monitoring) with full filtering by properties, agent, duration, and more

***

## Use With Simulations

Agents created via the API can also be used in [simulations](/documentation/simulation-testing/overview). When you send calls with an `agent.customId`, Roark creates or matches an agent record that you can then target in simulation run plans — useful for testing custom-built voice agents that aren't on a pre-built platform.

***

## MCP Server

If you use an AI-powered development environment, the [Roark MCP Server](/documentation/sdks/mcp-server) gives your AI assistant direct access to the Roark API — including creating calls, querying metrics, and managing agents — without writing integration code manually.

***

## Getting Started

<Steps>
  <Step title="Generate an API Key">
    Create an API key in your [Roark dashboard](/documentation/getting-started/api-keys)
  </Step>

  <Step title="Send Your First Call">
    Upload an audio file using the SDK or REST API above
  </Step>

  <Step title="Configure Collectors">
    Set up [metric collectors](/documentation/metrics/metric-collectors) to automatically collect metrics on every call
  </Step>

  <Step title="Explore Your Data">
    Browse calls in [Call History](/documentation/observability/live-monitoring), build [reports](/documentation/observability/reports), and create [dashboards](/documentation/observability/dashboards)
  </Step>
</Steps>

***

## Resources

<CardGroup cols={2}>
  <Card title="Enable Tracing" icon="git-branch" href="/documentation/observability/traces?tab=custom-integration">
    Send OpenTelemetry traces from any platform
  </Card>

  <Card title="Node.js SDK" icon="braces" href="/documentation/sdks/node-sdk">
    Full SDK guide and reference
  </Card>

  <Card title="Python SDK" icon="braces" href="/documentation/sdks/python-sdk">
    Full SDK guide and reference
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Complete REST API documentation
  </Card>
</CardGroup>
