> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api.logicdialog.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.logicdialog.ai/_mcp/server.

# Schedule a call or SMS, or attempt an immediate callback

POST https://app.logicdialog.ai/outbound/contacts
Content-Type: application/json

Authenticate with a deployed API client whose outboundSchedules explicitly contains flowId/nodeId. Uses the existing applied outbound schedule for channel (voice or Twilio SMS), assistant, sender, contact hours and concurrency. Omit scheduledAt to become due at the next eligible workflow check, or provide a future ISO timestamp including timezone within one year. Automatic checks require an enabled schedule and only select queued contacts when the recipient workflow returns an empty recipients list; a dedicated contact-list workflow is recommended. Set runNow=true instead of scheduledAt to attempt this contact immediately without running the recipient workflow, including with a paused timer. Contact hours, capacity, expiry and sender validation still apply. A deferred attempt remains queued and returns deferredReason; retry the same id with runNow, or let an enabled contact-list workflow pick it up. IDs are scoped to client/workspace/environment/flow/node. Retries do not replace the original recipient or variables, reschedule an existing contact, or redial an already submitted contact. Always reuse the identical payload after an uncertain response. Pending contact retention is 30 days after due time; delivery receipts/deduplication last 30 days. Never reuse an old ID for a new intended contact. No transcripts are returned.

Reference: https://api.logicdialog.ai/api-reference/outbound/schedule-api-outbound-contact

## Authentication

- `Authorization` header (bearer token, required) — Token for one deployed API client, configured in Project → Channels.

## Request

### Query parameters

- `workspaceId` (string, required) — Workspace containing the deployed API client.
- `environment` (string, optional, default: live) — Environment containing both the applied outbound schedule and API client, for example development or live.
- `integrationId` (string, required) — API client identifier from Channels.

### Body (application/json)

This endpoint expects an object.

- `id` (string, required) — Stable ID for one intended contact. Reuse on retries.
- `flowId` (string, required)
- `nodeId` (string, required)
- `userId` (string, required) — Destination phone number in international format.
- `variables` (map from string to OutboundContactsPostRequestBodyContentApplicationJsonSchemaVariables, optional) — Initial assistant variables. Must include those required by the opening message; ld_ variables are reserved.
- `scheduledAt` (datetime, optional)
- `runNow` (boolean, optional, default: false)

## Response

### 200

Existing contact; not inserted again. The returned status describes the existing request.

- `id` (string, required)
- `status` (string, required) — Current queue state, for example pending, invalid, ready, claimed, dialing, active, accepted, complete, rejected or uncertain. This is delivery state, not call outcome.
- `created` (boolean, optional)
- `scheduledAt` (datetime, optional) — Stored not-before time when the contact is still pending.
- `kind` (enum, optional)
  - Allowed values: `upload`, `job`
- `deferredReason` (string, optional) — Why an immediate attempt could not claim the contact. The contact remains stored. Retry the same id with runNow to attempt it again; a paused schedule does not automatically retry.

### 201

Contact stored. Consult status and deferredReason; storage does not guarantee a call was placed.

- `id` (string, required)
- `status` (string, required) — Current queue state, for example pending, invalid, ready, claimed, dialing, active, accepted, complete, rejected or uncertain. This is delivery state, not call outcome.
- `created` (boolean, optional)
- `scheduledAt` (datetime, optional) — Stored not-before time when the contact is still pending.
- `kind` (enum, optional)
  - Allowed values: `upload`, `job`
- `deferredReason` (string, optional) — Why an immediate attempt could not claim the contact. The contact remains stored. Retry the same id with runNow to attempt it again; a paused schedule does not automatically retry.

## Errors

### 400 Bad Request Error

Invalid contact, phone number, variables or timestamp.

- `any`

### 401 Unauthorized Error

Missing, disabled or invalid API client credentials.

- `any`

### 403 Forbidden Error

API client is not allowed to use this schedule.

- `any`

### 409 Conflict Error

Schedule is unavailable or disabled for automatic scheduling.

- `any`

### 503 Service Unavailable Error

Outbound worker or queue storage is unavailable.

- `any`

## Types

### OutboundContactsPostRequestBodyContentApplicationJsonSchemaVariables

- string
- double
- boolean

## Examples

### Outbound_scheduleApiOutboundContact_example

**Request**

```json
{
  "id": "callback-123",
  "flowId": "callback-flow",
  "nodeId": "outbound-trigger",
  "userId": "+447700900123",
  "variables": {
    "name": "Alex"
  },
  "runNow": true
}
```

**Response**

```json
{
  "id": "string",
  "status": "string",
  "created": true,
  "scheduledAt": "2024-01-15T09:30:00Z",
  "kind": "upload",
  "deferredReason": "string"
}
```

**SDK Code**

```python Outbound_scheduleApiOutboundContact_example
import requests

url = "https://app.logicdialog.ai/outbound/contacts"

querystring = {"integrationId":"integrationId","workspaceId":"workspaceId"}

payload = {
    "id": "callback-123",
    "flowId": "callback-flow",
    "nodeId": "outbound-trigger",
    "userId": "+447700900123",
    "variables": { "name": "Alex" },
    "runNow": True
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, params=querystring)

print(response.json())
```

```javascript Outbound_scheduleApiOutboundContact_example
const url = 'https://app.logicdialog.ai/outbound/contacts?integrationId=integrationId&workspaceId=workspaceId';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"id":"callback-123","flowId":"callback-flow","nodeId":"outbound-trigger","userId":"+447700900123","variables":{"name":"Alex"},"runNow":true}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Outbound_scheduleApiOutboundContact_example
package main

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

func main() {

	url := "https://app.logicdialog.ai/outbound/contacts?integrationId=integrationId&workspaceId=workspaceId"

	payload := strings.NewReader("{\n  \"id\": \"callback-123\",\n  \"flowId\": \"callback-flow\",\n  \"nodeId\": \"outbound-trigger\",\n  \"userId\": \"+447700900123\",\n  \"variables\": {\n    \"name\": \"Alex\"\n  },\n  \"runNow\": true\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 Outbound_scheduleApiOutboundContact_example
require 'uri'
require 'net/http'

url = URI("https://app.logicdialog.ai/outbound/contacts?integrationId=integrationId&workspaceId=workspaceId")

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  \"id\": \"callback-123\",\n  \"flowId\": \"callback-flow\",\n  \"nodeId\": \"outbound-trigger\",\n  \"userId\": \"+447700900123\",\n  \"variables\": {\n    \"name\": \"Alex\"\n  },\n  \"runNow\": true\n}"

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

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

HttpResponse<String> response = Unirest.post("https://app.logicdialog.ai/outbound/contacts?integrationId=integrationId&workspaceId=workspaceId")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"id\": \"callback-123\",\n  \"flowId\": \"callback-flow\",\n  \"nodeId\": \"outbound-trigger\",\n  \"userId\": \"+447700900123\",\n  \"variables\": {\n    \"name\": \"Alex\"\n  },\n  \"runNow\": true\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.logicdialog.ai/outbound/contacts?integrationId=integrationId&workspaceId=workspaceId', [
  'body' => '{
  "id": "callback-123",
  "flowId": "callback-flow",
  "nodeId": "outbound-trigger",
  "userId": "+447700900123",
  "variables": {
    "name": "Alex"
  },
  "runNow": true
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Outbound_scheduleApiOutboundContact_example
using RestSharp;

var client = new RestClient("https://app.logicdialog.ai/outbound/contacts?integrationId=integrationId&workspaceId=workspaceId");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"id\": \"callback-123\",\n  \"flowId\": \"callback-flow\",\n  \"nodeId\": \"outbound-trigger\",\n  \"userId\": \"+447700900123\",\n  \"variables\": {\n    \"name\": \"Alex\"\n  },\n  \"runNow\": true\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Outbound_scheduleApiOutboundContact_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "id": "callback-123",
  "flowId": "callback-flow",
  "nodeId": "outbound-trigger",
  "userId": "+447700900123",
  "variables": ["name": "Alex"],
  "runNow": true
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://app.logicdialog.ai/outbound/contacts?integrationId=integrationId&workspaceId=workspaceId")! 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()
```

### Outbound_scheduleApiOutboundContact_example

**Request**

```json
{
  "id": "callback-123",
  "flowId": "callback-flow",
  "nodeId": "outbound-trigger",
  "userId": "+447700900123",
  "variables": {
    "name": "Alex"
  },
  "runNow": true
}
```

**Response**

```json
{
  "id": "string",
  "status": "string",
  "created": true,
  "scheduledAt": "2024-01-15T09:30:00Z",
  "kind": "upload",
  "deferredReason": "string"
}
```

**SDK Code**

```python Outbound_scheduleApiOutboundContact_example
import requests

url = "https://app.logicdialog.ai/outbound/contacts"

querystring = {"integrationId":"integrationId","workspaceId":"workspaceId"}

payload = {
    "id": "callback-123",
    "flowId": "callback-flow",
    "nodeId": "outbound-trigger",
    "userId": "+447700900123",
    "variables": { "name": "Alex" },
    "runNow": True
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, params=querystring)

print(response.json())
```

```javascript Outbound_scheduleApiOutboundContact_example
const url = 'https://app.logicdialog.ai/outbound/contacts?integrationId=integrationId&workspaceId=workspaceId';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"id":"callback-123","flowId":"callback-flow","nodeId":"outbound-trigger","userId":"+447700900123","variables":{"name":"Alex"},"runNow":true}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Outbound_scheduleApiOutboundContact_example
package main

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

func main() {

	url := "https://app.logicdialog.ai/outbound/contacts?integrationId=integrationId&workspaceId=workspaceId"

	payload := strings.NewReader("{\n  \"id\": \"callback-123\",\n  \"flowId\": \"callback-flow\",\n  \"nodeId\": \"outbound-trigger\",\n  \"userId\": \"+447700900123\",\n  \"variables\": {\n    \"name\": \"Alex\"\n  },\n  \"runNow\": true\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 Outbound_scheduleApiOutboundContact_example
require 'uri'
require 'net/http'

url = URI("https://app.logicdialog.ai/outbound/contacts?integrationId=integrationId&workspaceId=workspaceId")

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  \"id\": \"callback-123\",\n  \"flowId\": \"callback-flow\",\n  \"nodeId\": \"outbound-trigger\",\n  \"userId\": \"+447700900123\",\n  \"variables\": {\n    \"name\": \"Alex\"\n  },\n  \"runNow\": true\n}"

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

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

HttpResponse<String> response = Unirest.post("https://app.logicdialog.ai/outbound/contacts?integrationId=integrationId&workspaceId=workspaceId")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"id\": \"callback-123\",\n  \"flowId\": \"callback-flow\",\n  \"nodeId\": \"outbound-trigger\",\n  \"userId\": \"+447700900123\",\n  \"variables\": {\n    \"name\": \"Alex\"\n  },\n  \"runNow\": true\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.logicdialog.ai/outbound/contacts?integrationId=integrationId&workspaceId=workspaceId', [
  'body' => '{
  "id": "callback-123",
  "flowId": "callback-flow",
  "nodeId": "outbound-trigger",
  "userId": "+447700900123",
  "variables": {
    "name": "Alex"
  },
  "runNow": true
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Outbound_scheduleApiOutboundContact_example
using RestSharp;

var client = new RestClient("https://app.logicdialog.ai/outbound/contacts?integrationId=integrationId&workspaceId=workspaceId");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"id\": \"callback-123\",\n  \"flowId\": \"callback-flow\",\n  \"nodeId\": \"outbound-trigger\",\n  \"userId\": \"+447700900123\",\n  \"variables\": {\n    \"name\": \"Alex\"\n  },\n  \"runNow\": true\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Outbound_scheduleApiOutboundContact_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "id": "callback-123",
  "flowId": "callback-flow",
  "nodeId": "outbound-trigger",
  "userId": "+447700900123",
  "variables": ["name": "Alex"],
  "runNow": true
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://app.logicdialog.ai/outbound/contacts?integrationId=integrationId&workspaceId=workspaceId")! 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()
```