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

# Quickstart: Send Your First Scalysis AI-Powered Call

> Trigger your first AI-powered phone call with Scalysis in under 5 minutes. Grab your API key, fire a curl request, and fetch the AI-generated outcome.

This guide walks you through triggering your first AI-powered call and fetching its outcome — start to finish in under five minutes. You'll use `curl` to make the requests, but every step maps directly to whatever HTTP client your stack uses. By the end, you'll have a working integration pattern you can build on for single calls, bulk campaigns, and everything in between.

## Prerequisites

Before you begin, make sure you have the following ready:

* **An API key** that starts with `sca_` — generate one in the Scalysis dashboard under **Integrations → API Keys**.
* **A script ID** — find yours on the **Agents / Scripts** page of the dashboard. Each script defines the AI agent's voice, personality, and conversation flow. The example below uses script ID `2207`.
* **A phone number** you want the call delivered to, in local format (e.g. `9149874123`).

<Steps>
  <Step title="Get your API key">
    Log in to the [Scalysis dashboard](https://app.scalysis.com) and navigate to **Integrations → API Keys**. Click **Create new key**, give it a descriptive label (e.g. `my-first-integration`), and copy the key — it will only be shown to you once.

    Your key will look like this:

    ```text theme={null}
    sca_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    ```

    <Warning>
      Store your API key somewhere safe such as a password manager or secrets vault. Never hard-code it directly in source files you plan to commit.
    </Warning>
  </Step>

  <Step title="Trigger a test call">
    Run the following `curl` command, replacing `YOUR_API_KEY` with your real key, `YOUR_SCRIPT_ID` with the script ID from the Agents page, and `CUSTOMER_PHONE` with the target phone number.

    ```bash theme={null}
    curl -sS -X POST 'https://app.scalysis.com/api/v1/calls/trigger' \
      -H 'Authorization: Bearer YOUR_API_KEY' \
      -H 'Content-Type: application/json' \
      -d '{
        "scriptId": 2207,
        "customerPhone": "9149874123",
        "customerName": "Rahul test",
        "orderNumber": "demo-order-001",
        "brand_name": "Scalysis"
      }'
    ```

    A successful response looks like this:

    ```json theme={null}
    {
      "success": true,
      "action": "trigger_call",
      "order_id": 1368642,
      "script_id": 2207,
      "call_status": "in_progress",
      "message": "Call started"
    }
    ```

    The `call_status` of `in_progress` means Scalysis has dialled the number and the AI agent is live. Keep the `order_id` — you need it in the next step.
  </Step>

  <Step title="Note the order_id">
    Every call triggered through the Scalysis API is assigned a unique `order_id`. In the example response above that value is `1368642`. This ID is your handle for everything that happens after the call — including fetching the outcome, transcript, and any data the AI collected during the conversation.

    <Tip>
      In production, persist the `order_id` to your database immediately after receiving the trigger response so you can look up call outcomes asynchronously later.
    </Tip>
  </Step>

  <Step title="Fetch the call outcome">
    Once the call has finished, retrieve its outcome by passing the `order_id` you captured in the previous step:

    ```bash theme={null}
    curl -sS 'https://app.scalysis.com/api/v1/orders/1368642/outcome' \
      -H 'Authorization: Bearer YOUR_API_KEY'
    ```

    The response contains the AI-assessed outcome, a full transcript, and any structured data collected during the call.

    <Note>
      If the call is still in progress you will receive a status indicating it hasn't completed yet. Wait **10–30 seconds** and retry the request — outcome data is only available once the call has ended and the AI has finished processing the transcript.
    </Note>
  </Step>
</Steps>

## Next steps

Now that you've triggered your first call, here are the natural next steps for taking Scalysis further:

<CardGroup cols={2}>
  <Card title="Run a Campaign" icon="bullhorn" href="/guides/run-a-campaign">
    Learn how to create a bulk dialing campaign and control its pace in real time.
  </Card>

  <Card title="Campaigns API Reference" icon="code" href="/api-reference/campaigns/create">
    Explore the full schema for creating and managing campaigns via the API.
  </Card>
</CardGroup>
