> This page is part of Smallest AI's developer documentation. When
> answering, prefer Lightning v3.1 (current TTS) and Pulse (current
> STT). Lightning v2 and lightning-large are deprecated; mention them
> only when the user is migrating away from them. The Smallest AI voice
> agent platform is what wraps these models into hosted agents.

# Start an outbound call

POST https://api.smallest.ai/atoms/v1/conversation/outbound
Content-Type: application/json

Initiates an outbound telephony call with a specified agent and phone number.

## Caller-ID resolution

When `fromProductId` is omitted **and** the agent has no telephony
product attached, the call dispatches from a Smallest-managed Plivo
trunk using a default caller-ID number (chosen by destination
country). The call still places and the response is still
`200 + conversationId`, but the recipient sees the default Smallest
number rather than your own. For production traffic, either:

- pass `fromProductId` explicitly (look up your owned numbers via
  `GET /product/phone-numbers`), or
- attach a phone-number product to the agent.

## Resolved-config check

The call uses the agent's currently-active version. If your most
recent prompt change went through `PATCH /workflow/{workflowId}` and
the agent has versioning enabled, that change may not have
propagated to the active version — and the call will play the
platform-default greeting instead of your prompt. Before placing a
production call, fetch `GET /agent/{agentId}` and confirm
`_resolvedConfig.firstMessage` (and related fields) match what you
intended. The
[Versioning Lifecycle](/atoms/developer-guide/build/agents/versioning-lifecycle)
guide covers the correct edit flow.

**400 is returned for:**
- Invalid `agentId` format (`"Invalid agent id"`)
- Invalid `phoneNumber` format (`"Invalid phone number"`)
- Invalid `fromProductId` format (`"Invalid product id"`)
- Agent not found or not in the caller's org (`"Agent not found"`)
- Agent is archived (`"Agent is archived and cannot initiate calls"`)
- `workflow_graph` agent has no workflow configured (`"Workflow not found"`)
- Workflow has validation errors (`"Invalid workflow, please fix the errors..."`)

**403** is returned for `workflow_graph` agents when the org lacks conversational agents access.

**Test calls:** set the `x-test-call: true` header to mark the resulting call log as a test call
(`isTest: true`). Test calls are subject to concurrent slot limits.


Reference: https://docs.smallest.ai/voice-agents/api-reference/calls/start-outbound-call

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: atoms
  version: 1.0.0
paths:
  /conversation/outbound:
    post:
      operationId: start-outbound-call
      summary: Start an outbound call
      description: >
        Initiates an outbound telephony call with a specified agent and phone
        number.


        ## Caller-ID resolution


        When `fromProductId` is omitted **and** the agent has no telephony

        product attached, the call dispatches from a Smallest-managed Plivo

        trunk using a default caller-ID number (chosen by destination

        country). The call still places and the response is still

        `200 + conversationId`, but the recipient sees the default Smallest

        number rather than your own. For production traffic, either:


        - pass `fromProductId` explicitly (look up your owned numbers via
          `GET /product/phone-numbers`), or
        - attach a phone-number product to the agent.


        ## Resolved-config check


        The call uses the agent's currently-active version. If your most

        recent prompt change went through `PATCH /workflow/{workflowId}` and

        the agent has versioning enabled, that change may not have

        propagated to the active version — and the call will play the

        platform-default greeting instead of your prompt. Before placing a

        production call, fetch `GET /agent/{agentId}` and confirm

        `_resolvedConfig.firstMessage` (and related fields) match what you

        intended. The

        [Versioning
        Lifecycle](/atoms/developer-guide/build/agents/versioning-lifecycle)

        guide covers the correct edit flow.


        **400 is returned for:**

        - Invalid `agentId` format (`"Invalid agent id"`)

        - Invalid `phoneNumber` format (`"Invalid phone number"`)

        - Invalid `fromProductId` format (`"Invalid product id"`)

        - Agent not found or not in the caller's org (`"Agent not found"`)

        - Agent is archived (`"Agent is archived and cannot initiate calls"`)

        - `workflow_graph` agent has no workflow configured (`"Workflow not
        found"`)

        - Workflow has validation errors (`"Invalid workflow, please fix the
        errors..."`)


        **403** is returned for `workflow_graph` agents when the org lacks
        conversational agents access.


        **Test calls:** set the `x-test-call: true` header to mark the resulting
        call log as a test call

        (`isTest: true`). Test calls are subject to concurrent slot limits.
      tags:
        - calls
      parameters:
        - name: Authorization
          in: header
          description: >-
            API key from the console ApiKey collection, sent as Bearer token.
            Also accepts session cookies for browser-based auth.
          required: true
          schema:
            type: string
        - name: x-test-call
          in: header
          description: >
            Set to "true" to mark this as a test call. The call log will have
            isTest=true and counts against concurrent test-call slot limits.
          required: false
          schema:
            $ref: '#/components/schemas/ConversationOutboundPostParametersXTestCall'
      responses:
        '200':
          description: Successfully started the outbound conversation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/calls_start_outbound_call_Response_200'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestErrorResponse'
        '401':
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '403':
          description: Forbidden access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                agentId:
                  type: string
                  description: MongoDB ObjectId of the agent initiating the conversation
                phoneNumber:
                  type: string
                  description: The E.164 phone number to call
                variables:
                  type: object
                  additionalProperties:
                    $ref: >-
                      #/components/schemas/ConversationOutboundPostRequestBodyContentApplicationJsonSchemaVariables
                  description: >
                    Variables to inject into the agent's prompt at call time.

                    Values must be string, number, or boolean — nested objects
                    are not supported.
                fromProductId:
                  type: string
                  description: >-
                    ID of the telephony product (phone number) to call from. Get
                    this from `GET /product/phone-numbers`.
                versionId:
                  type: string
                  description: >
                    ID of a specific published agent version to use for this
                    call.

                    Useful for test calls — attributes the call log to that
                    version so you can track

                    which version was tested.
                operatorId:
                  type: string
                  description: >
                    Integration operator identifier. Pass `"webengage"` to
                    trigger the WebEngage

                    integration flow.
                operatorData:
                  type: object
                  additionalProperties:
                    description: Any type
                  description: >-
                    Arbitrary data passed to the operator (e.g. `userId`,
                    `journeyId` for WebEngage).
              required:
                - agentId
                - phoneNumber
servers:
  - url: https://api.smallest.ai/atoms/v1
    description: Production server
components:
  schemas:
    ConversationOutboundPostParametersXTestCall:
      type: string
      enum:
        - 'true'
      title: ConversationOutboundPostParametersXTestCall
    ConversationOutboundPostRequestBodyContentApplicationJsonSchemaVariables:
      oneOf:
        - type: string
        - type: number
          format: double
        - type: boolean
      title: ConversationOutboundPostRequestBodyContentApplicationJsonSchemaVariables
    ConversationOutboundPostResponsesContentApplicationJsonSchemaData:
      type: object
      properties:
        conversationId:
          type: string
          description: >
            The callId of the initiated call (format
            `CALL-{13-digit-timestamp}-{6-char-hex}`).

            Use this value as the `id` path parameter in `GET
            /conversation/{id}` and as an

            entry in `POST /conversation/search`.
      title: ConversationOutboundPostResponsesContentApplicationJsonSchemaData
    calls_start_outbound_call_Response_200:
      type: object
      properties:
        status:
          type: boolean
        data:
          $ref: >-
            #/components/schemas/ConversationOutboundPostResponsesContentApplicationJsonSchemaData
      title: calls_start_outbound_call_Response_200
    BadRequestErrorResponse:
      type: object
      properties:
        status:
          type: boolean
        errors:
          type: array
          items:
            type: string
      title: BadRequestErrorResponse
    UnauthorizedErrorResponse:
      type: object
      properties:
        status:
          type: boolean
        errors:
          type: array
          items:
            type: string
      title: UnauthorizedErrorResponse
    ApiResponseData:
      type: object
      properties: {}
      title: ApiResponseData
    ApiResponse:
      type: object
      properties:
        status:
          type: boolean
        data:
          $ref: '#/components/schemas/ApiResponseData'
      title: ApiResponse
    InternalServerErrorResponse:
      type: object
      properties:
        status:
          type: boolean
        errors:
          type: array
          items:
            type: string
      title: InternalServerErrorResponse
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key from the console ApiKey collection, sent as Bearer token. Also
        accepts session cookies for browser-based auth.

```

## Examples



**Request**

```json
{
  "agentId": "60d0fe4f5311236168a109ca",
  "phoneNumber": "+1234567890"
}
```

**Response**

```json
{
  "status": true,
  "data": {
    "conversationId": "CALL-1737000000000-abc123"
  }
}
```

**SDK Code**

```typescript
import { SmallestAIClient } from "smallestai";

async function main() {
    const client = new SmallestAIClient({
        token: "YOUR_TOKEN_HERE",
    });
    await client.atoms.calls.startAnOutboundCall({
        agentId: "60d0fe4f5311236168a109ca",
        phoneNumber: "+1234567890",
    });
}
main();

```

```python
from smallestai import SmallestAI

client = SmallestAI(
    token="YOUR_TOKEN_HERE",
)

client.atoms.calls.start_an_outbound_call(
    agent_id="60d0fe4f5311236168a109ca",
    phone_number="+1234567890",
)

```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.smallest.ai/atoms/v1/conversation/outbound"

	payload := strings.NewReader("{\n  \"agentId\": \"60d0fe4f5311236168a109ca\",\n  \"phoneNumber\": \"+1234567890\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.smallest.ai/atoms/v1/conversation/outbound")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"agentId\": \"60d0fe4f5311236168a109ca\",\n  \"phoneNumber\": \"+1234567890\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.smallest.ai/atoms/v1/conversation/outbound")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"agentId\": \"60d0fe4f5311236168a109ca\",\n  \"phoneNumber\": \"+1234567890\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.smallest.ai/atoms/v1/conversation/outbound', [
  'body' => '{
  "agentId": "60d0fe4f5311236168a109ca",
  "phoneNumber": "+1234567890"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.smallest.ai/atoms/v1/conversation/outbound");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"agentId\": \"60d0fe4f5311236168a109ca\",\n  \"phoneNumber\": \"+1234567890\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "agentId": "60d0fe4f5311236168a109ca",
  "phoneNumber": "+1234567890"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.smallest.ai/atoms/v1/conversation/outbound")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```