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

# 배치 발신(캠페인) 생성

POST https://api.claw-ops.com/v1/accounts/{accountId}/call-batches
Content-Type: application/json

명단에 자동으로 전화를 거는 배치를 만듭니다. 생성 즉시 반환되며, 실제 발신은
동시 통화 한도·분당 발신 속도·발신 가능 시간대를 지켜가며 순차적으로 진행됩니다.

**대상은 `CallFlowId` · `AgentId` · `Url` 중 정확히 하나**를 지정합니다 (발신 API와 동일).

수신자별로 다른 값을 쓰려면 `Tasks[].Variables`에 넣습니다. 콜 플로우에서
`{{변수명}}`으로 참조합니다. 변수 **이름**은 영문/숫자/밑줄만 가능합니다(값은 한글 가능).

**발신 차수(`Rounds`)**: 몇 번 걸지, 얼마 간격으로 걸지, **각 차수를 언제 걸지**를
한 배열로 정합니다. 배열 인덱스가 곧 차수라 `Rounds[0]`이 1차 발신이고 그 뒤가 재시도입니다.
차수마다 시간대를 따로 줄 수 있어 "1차는 낮에, 안 받으면 2·3차는 저녁에" 같은 진행이 됩니다.

**발신 가능 시간대**: 광고성 전화는 21시\~익일 8시 발신이 법으로 금지되어 있어
이 시간에는 `Rounds[].Windows` 설정과 무관하게 발신되지 않습니다. `Windows`는 그보다
**더 좁게** 제한할 때 사용합니다.

배치 발신은 계정별로 활성화가 필요합니다.

Reference: https://docs.claw-ops.com/api-레퍼런스/claw-ops-api/call-batches/create-call-batch

## Authentication

- `Authorization` header (bearer token, required) — API Key를 Bearer 토큰으로 전달

## Request

### Path parameters

- `accountId` (string, required)

### Body (application/json)

- `Name` (string, required)
- `From` (string, required) — 발신 번호 (계정에 등록된 번호)
- `Tasks` (list of object, required) — 수신자 목록. 건수 제한은 없고 요청 본문 크기(10MB)가 상한이다 — 초과하면 413. 3만건 규모까지 한 번에 넣을 수 있다.
  - `To` (string, required)
  - `Variables` (map from string to any, optional) — 이 수신자에게만 적용할 콜 플로우 변수. 이름은 영문/숫자/밑줄.
- `CallFlowId` (string, optional) — 콜 플로우로 발신. AgentId·Url과 배타.
- `AgentId` (string, optional) — 매니지드 에이전트로 발신. CallFlowId·Url과 배타.
- `Url` (string, optional) — VoiceML을 반환할 URL. CallFlowId·AgentId와 배타.
- `Status` (enum, optional) — 생성 직후 상태. 기본값 running(만들면 바로 발신 대기). paused 로 만들면 명단을 확인한 뒤 actions 의 resume 으로 시작한다.
  - Allowed values: `running`, `paused`
- `MachineDetection` (enum, optional) — 자동응답기(음성사서함) 감지. 기본값 None(사용 안 함). `Enable` 은 감지만 해서 결과의 `answeredBy` 에 human·machine·unknown 을 남기고 통화는 그대로 진행합니다. `Hangup` 은 자동응답기로 판정되면 통화를 끊습니다. **AMD 애드온이 활성화된 계정만** 쓸 수 있고(없으면 422), 감지한 통화마다 요금이 붙습니다. 애드온 활성 여부는 **발신할 때마다** 다시 확인합니다 — 배치를 만든 뒤 애드온을 해지하면 남은 통화는 감지 없이 걸립니다(배치가 실패하지는 않습니다).
  - Allowed values: `None`, `Enable`, `Hangup`
- `Rounds` (list of object, optional) — 발신 차수. **배열 인덱스가 곧 차수**이고 `Rounds[0]` 이 1차 발신, 그 뒤가 재시도입니다. 생략하면 **한 번 걸고 끝**(발신 가능 시간대 전체)입니다. 최대 5개. 차수마다 시간대를 따로 줄 수 있는 것이 핵심입니다 — "1차는 낮(10~18시)에 걸고, 안 받으면 2·3차는 받을 확률이 높은 저녁(18~21시)에" 같은 진행을 한 배치로 표현합니다. 재시도도 최초 발신과 똑같이 동시통화 한도·분당 상한·발신 가능 시간대의 적용을 받습니다. 정책상의 시각이 그 차수의 시간대 밖이면 **시간대가 열릴 때까지 기다렸다가** 걸립니다 — 20시 50분에 실패한 통화의 "30분 뒤"는 21시 20분이지만 그 시각은 발신 금지라 실제로는 다음 열리는 시각에 걸립니다.
  - `After` (integer, optional) — 직전 차수 통화를 마무리한 뒤 이 차수까지 기다릴 시간(분). 1~1440(하루). **1차(`Rounds[0]`)에는 쓸 수 없습니다** — 기준이 될 직전 통화가 없기 때문입니다. 발신 시작 시각은 `StartAt` 으로 지정하세요. 2차부터는 필수입니다.
  - `On` (list of enum, optional) — 직전 통화가 이 결과일 때만 이 차수를 진행합니다. `no-answer`(안 받음) · `busy`(통화 중) · `rejected`(거절/차단) · `failed`(발신 실패) · `machine`(자동응답기 판정). **1차에는 쓸 수 없고**(직전 결과가 없습니다) 2차부터는 필수입니다. 차수마다 다르게 줄 수 있습니다 — 2차는 안 받은 경우만, 3차는 통화 중도 포함하는 식입니다. `machine` 은 `MachineDetection` 을 함께 켠 배치에서만 동작합니다. 감지를 끈 채로 넣으면 거절되지는 않지만 **아무 일도 일어나지 않습니다** — 판정값(`answeredBy`)이 아예 없어 맞출 대상이 없기 때문입니다. 켜더라도 신중히 고르세요 — 한국어 자동응답기 감지는 오탐이 잦아 **사람이 받은 통화를 기계로 잘못 본** 경우가 많고, 그러면 이미 통화한 분께 다시 걸게 됩니다.
    - Allowed values: `no-answer`, `busy`, `rejected`, `failed`, `machine`
  - `Windows` (list of object, optional) — 이 차수의 발신 가능 시간대. 생략하면 법정 허용 시간(08:00~21:00) 전체입니다. 법정 허용 시간과 겹치는 구간이 전혀 없으면(예: 22:00~23:00) 400 으로 거절합니다 — 통과시키면 그 차수가 영원히 걸리지 않습니다.
    - `Days` (list of integer, required) — 1(월)~7(일)
    - `Start` (string, required)
    - `End` (string, required)
- `MessagePolicy` (object, optional) — 끝내 통화가 안 된 분께 보낼 문자. 생략하면 보내지 않습니다. 본문의 `{{변수}}` 는 그 수신자의 `Variables` 값으로 치환됩니다(콜 플로우 멘트와 같은 문법). 참조한 변수가 없는 수신자가 한 명이라도 있으면 400 으로 거절합니다 — 빈칸으로 나가는 문자는 되돌릴 수 없기 때문입니다. 문자는 통화가 실패한 **직후** 나갑니다(차수 시간대를 따로 기다리지 않습니다). 다만 법정 금지 시간(21\~08시)에 걸리면 다음 날 아침으로 밀리고, 보낼 시점이 24시간 이상 지나면 보내지 않습니다(일시정지해 둔 배치를 며칠 뒤 재개했을 때 뒤늦은 문자가 나가는 것을 막습니다). ⚠️ 문자 발신번호 등록은 음성 발신 등록과 **별개 절차**입니다. 등록되지 않은 번호는 발송 요청이 성공해도 통신사에서 거절될 수 있어, 생성 응답의 `warnings` 로 알려 드립니다.
  - `OnFirstFail` (object, optional) — **첫 통화**가 안 됐을 때 바로 보낼 문자. 재시도 전화가 그 뒤에 이어집니다. 재시도 차수 없이는(`Rounds` 가 1개) 쓸 수 없습니다 — 다시 걸지 않으면 첫 실패가 곧 최종 실패라 OnFinalFail 과 같은 뜻이 됩니다.
    - `Body` (string, required)
  - `OnFinalFail` (object, optional) — 재시도를 모두 소진하고 **끝내** 통화가 안 됐을 때 보낼 문자.
    - `Body` (string, required)
- `MaxConcurrency` (integer, optional) — 이 배치가 동시에 유지할 통화 수. 기본값: 1
- `PacingPerMinute` (integer, optional) — 분당 최대 발신 수. 기본값: 10
- `Timezone` (string, optional) — 발신 시간대 판정 기준. 기본값: Asia/Seoul
- `StartAt` (datetime, optional) — 이 시각 이후부터 발신 시작
- `EndAt` (datetime, optional) — 이 시각이 지나면 남은 대상은 발신하지 않고 종료
- `Priority` (integer, optional) — 같은 계정에 배치가 여럿일 때 우선순위(높을수록 먼저). 기본값: 0

## Response

### 200

생성 성공

- `batchId` (string, optional)
- `name` (string, optional)
- `status` (enum, optional) — running=발신 중 · paused=일시정지(진행 중 통화는 유지) · canceled=취소 · completed=완료 · expired=EndAt 경과로 종료
  - Allowed values: `draft`, `scheduled`, `running`, `paused`, `completed`, `canceled`, `expired`
- `from` (string, optional)
- `callFlowId` (string, optional)
- `agentId` (string, optional)
- `url` (string, optional)
- `maxConcurrency` (integer, optional)
- `pacingPerMinute` (integer, optional)
- `timezone` (string, optional)
- `startAt` (datetime, optional, nullable)
- `endAt` (datetime, optional, nullable)
- `machineDetection` (enum, optional, nullable) — 자동응답기 감지 모드. 사용하지 않는 배치는 null 입니다.
  - Allowed values: `Enable`, `Hangup`
- `rounds` (list of object, optional) — 발신 차수. 배열 인덱스가 곧 차수이고 rounds[0] 이 1차 발신입니다. 길이 1 = 한 번 걸고 끝. 각 차수가 자기 시간창(windows)을 가집니다.
  - `after` (integer, optional) — 직전 차수를 마무리한 뒤 기다릴 시간(분). 1차에는 없습니다.
  - `on` (list of string, optional) — 직전 통화가 이 결과일 때만 진행. 1차에는 없습니다.
  - `windows` (list of object, optional) — 이 차수의 발신 가능 시간대. 없으면 법정 허용 시간 전체입니다.
    - `days` (list of integer, optional)
    - `start` (string, optional)
    - `end` (string, optional)
- `messagePolicy` (object, optional, nullable) — 끝내 통화가 안 된 분께 보낼 문자. null 이면 보내지 않습니다.
  - `onFirstFail` (object, optional)
    - `body` (string, optional)
  - `onFinalFail` (object, optional)
    - `body` (string, optional)
- `warnings` (list of string, optional) — **생성 응답에만** 포함됩니다. 거절할 정도는 아니지만 알아야 하는 것들 — 발신번호에 문자 전송 이력이 없거나(문자 발신번호 미등록 가능성), 남은 문자 한도가 수신자 수보다 적은 경우입니다.
- `dateCreated` (datetime, optional)
- `dateUpdated` (datetime, optional)
- `counts` (map from string to integer, optional) — 상태별 수신자 수 (pending·dialing·done·failed·canceled·expired)

## Examples

**Request**

```json
{
  "Name": "7월 예약 확인",
  "From": "07052358010",
  "Tasks": [
    {
      "To": "01012345678",
      "Variables": {
        "customer_name": "홍길동",
        "visit_date": "7월 30일"
      }
    },
    {
      "To": "01087654321",
      "Variables": {
        "customer_name": "김영희",
        "visit_date": "7월 31일"
      }
    }
  ],
  "CallFlowId": "cf_9a8b7c6d",
  "MachineDetection": "Enable",
  "Rounds": [
    {
      "Windows": [
        {
          "Days": [
            1,
            2,
            3,
            4,
            5
          ],
          "Start": "10:00",
          "End": "18:00"
        }
      ]
    },
    {
      "After": 30,
      "On": [
        "no-answer",
        "busy"
      ],
      "Windows": [
        {
          "Days": [
            1,
            2,
            3,
            4,
            5
          ],
          "Start": "18:00",
          "End": "21:00"
        }
      ]
    },
    {
      "After": 45,
      "On": [
        "no-answer",
        "busy"
      ],
      "Windows": [
        {
          "Days": [
            1,
            2,
            3,
            4,
            5
          ],
          "Start": "18:00",
          "End": "21:00"
        }
      ]
    }
  ],
  "MessagePolicy": {
    "OnFinalFail": {
      "Body": "{{customer_name}}님, {{visit_date}} 예약 확인차 전화드렸는데 연결이 어려워 문자 남깁니다."
    }
  },
  "MaxConcurrency": 3,
  "PacingPerMinute": 20
}
```

**Response**

```json
{
  "batchId": "clx1a2b3c4d5e",
  "name": "7월 예약 확인",
  "status": "draft",
  "from": "07052358010",
  "callFlowId": "string",
  "agentId": "string",
  "url": "string",
  "maxConcurrency": 1,
  "pacingPerMinute": 1,
  "timezone": "string",
  "startAt": "2024-01-15T09:30:00Z",
  "endAt": "2024-01-15T09:30:00Z",
  "machineDetection": "Enable",
  "rounds": [
    {
      "after": 1,
      "on": [
        "string"
      ],
      "windows": [
        {
          "days": [
            1
          ],
          "start": "string",
          "end": "string"
        }
      ]
    }
  ],
  "messagePolicy": {
    "onFirstFail": {
      "body": "string"
    },
    "onFinalFail": {
      "body": "string"
    }
  },
  "warnings": [
    "07052358010 번호로 문자가 전송된 이력이 없습니다. 문자 발신번호 등록은 음성과 별개 절차라, 등록되지 않은 번호는 발송 요청은 성공해도 통신사에서 전량 거절될 수 있습니다."
  ],
  "dateCreated": "2024-01-15T09:30:00Z",
  "dateUpdated": "2024-01-15T09:30:00Z",
  "counts": {
    "dialing": 3,
    "done": 77,
    "pending": 120
  }
}
```

**SDK Code**

```python CallBatches_createCallBatch_example
import requests

url = "https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/call-batches"

payload = {
    "Name": "7월 예약 확인",
    "From": "07052358010",
    "Tasks": [
        {
            "To": "01012345678",
            "Variables": {
                "customer_name": "홍길동",
                "visit_date": "7월 30일"
            }
        },
        {
            "To": "01087654321",
            "Variables": {
                "customer_name": "김영희",
                "visit_date": "7월 31일"
            }
        }
    ],
    "CallFlowId": "cf_9a8b7c6d",
    "MachineDetection": "Enable",
    "Rounds": [
        { "Windows": [
                {
                    "Days": [1, 2, 3, 4, 5],
                    "Start": "10:00",
                    "End": "18:00"
                }
            ] },
        {
            "After": 30,
            "On": ["no-answer", "busy"],
            "Windows": [
                {
                    "Days": [1, 2, 3, 4, 5],
                    "Start": "18:00",
                    "End": "21:00"
                }
            ]
        },
        {
            "After": 45,
            "On": ["no-answer", "busy"],
            "Windows": [
                {
                    "Days": [1, 2, 3, 4, 5],
                    "Start": "18:00",
                    "End": "21:00"
                }
            ]
        }
    ],
    "MessagePolicy": { "OnFinalFail": { "Body": "{{customer_name}}님, {{visit_date}} 예약 확인차 전화드렸는데 연결이 어려워 문자 남깁니다." } },
    "MaxConcurrency": 3,
    "PacingPerMinute": 20
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript CallBatches_createCallBatch_example
const url = 'https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/call-batches';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"Name":"7월 예약 확인","From":"07052358010","Tasks":[{"To":"01012345678","Variables":{"customer_name":"홍길동","visit_date":"7월 30일"}},{"To":"01087654321","Variables":{"customer_name":"김영희","visit_date":"7월 31일"}}],"CallFlowId":"cf_9a8b7c6d","MachineDetection":"Enable","Rounds":[{"Windows":[{"Days":[1,2,3,4,5],"Start":"10:00","End":"18:00"}]},{"After":30,"On":["no-answer","busy"],"Windows":[{"Days":[1,2,3,4,5],"Start":"18:00","End":"21:00"}]},{"After":45,"On":["no-answer","busy"],"Windows":[{"Days":[1,2,3,4,5],"Start":"18:00","End":"21:00"}]}],"MessagePolicy":{"OnFinalFail":{"Body":"{{customer_name}}님, {{visit_date}} 예약 확인차 전화드렸는데 연결이 어려워 문자 남깁니다."}},"MaxConcurrency":3,"PacingPerMinute":20}'
};

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

```go CallBatches_createCallBatch_example
package main

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

func main() {

	url := "https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/call-batches"

	payload := strings.NewReader("{\n  \"Name\": \"7월 예약 확인\",\n  \"From\": \"07052358010\",\n  \"Tasks\": [\n    {\n      \"To\": \"01012345678\",\n      \"Variables\": {\n        \"customer_name\": \"홍길동\",\n        \"visit_date\": \"7월 30일\"\n      }\n    },\n    {\n      \"To\": \"01087654321\",\n      \"Variables\": {\n        \"customer_name\": \"김영희\",\n        \"visit_date\": \"7월 31일\"\n      }\n    }\n  ],\n  \"CallFlowId\": \"cf_9a8b7c6d\",\n  \"MachineDetection\": \"Enable\",\n  \"Rounds\": [\n    {\n      \"Windows\": [\n        {\n          \"Days\": [\n            1,\n            2,\n            3,\n            4,\n            5\n          ],\n          \"Start\": \"10:00\",\n          \"End\": \"18:00\"\n        }\n      ]\n    },\n    {\n      \"After\": 30,\n      \"On\": [\n        \"no-answer\",\n        \"busy\"\n      ],\n      \"Windows\": [\n        {\n          \"Days\": [\n            1,\n            2,\n            3,\n            4,\n            5\n          ],\n          \"Start\": \"18:00\",\n          \"End\": \"21:00\"\n        }\n      ]\n    },\n    {\n      \"After\": 45,\n      \"On\": [\n        \"no-answer\",\n        \"busy\"\n      ],\n      \"Windows\": [\n        {\n          \"Days\": [\n            1,\n            2,\n            3,\n            4,\n            5\n          ],\n          \"Start\": \"18:00\",\n          \"End\": \"21:00\"\n        }\n      ]\n    }\n  ],\n  \"MessagePolicy\": {\n    \"OnFinalFail\": {\n      \"Body\": \"{{customer_name}}님, {{visit_date}} 예약 확인차 전화드렸는데 연결이 어려워 문자 남깁니다.\"\n    }\n  },\n  \"MaxConcurrency\": 3,\n  \"PacingPerMinute\": 20\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 CallBatches_createCallBatch_example
require 'uri'
require 'net/http'

url = URI("https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/call-batches")

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  \"Name\": \"7월 예약 확인\",\n  \"From\": \"07052358010\",\n  \"Tasks\": [\n    {\n      \"To\": \"01012345678\",\n      \"Variables\": {\n        \"customer_name\": \"홍길동\",\n        \"visit_date\": \"7월 30일\"\n      }\n    },\n    {\n      \"To\": \"01087654321\",\n      \"Variables\": {\n        \"customer_name\": \"김영희\",\n        \"visit_date\": \"7월 31일\"\n      }\n    }\n  ],\n  \"CallFlowId\": \"cf_9a8b7c6d\",\n  \"MachineDetection\": \"Enable\",\n  \"Rounds\": [\n    {\n      \"Windows\": [\n        {\n          \"Days\": [\n            1,\n            2,\n            3,\n            4,\n            5\n          ],\n          \"Start\": \"10:00\",\n          \"End\": \"18:00\"\n        }\n      ]\n    },\n    {\n      \"After\": 30,\n      \"On\": [\n        \"no-answer\",\n        \"busy\"\n      ],\n      \"Windows\": [\n        {\n          \"Days\": [\n            1,\n            2,\n            3,\n            4,\n            5\n          ],\n          \"Start\": \"18:00\",\n          \"End\": \"21:00\"\n        }\n      ]\n    },\n    {\n      \"After\": 45,\n      \"On\": [\n        \"no-answer\",\n        \"busy\"\n      ],\n      \"Windows\": [\n        {\n          \"Days\": [\n            1,\n            2,\n            3,\n            4,\n            5\n          ],\n          \"Start\": \"18:00\",\n          \"End\": \"21:00\"\n        }\n      ]\n    }\n  ],\n  \"MessagePolicy\": {\n    \"OnFinalFail\": {\n      \"Body\": \"{{customer_name}}님, {{visit_date}} 예약 확인차 전화드렸는데 연결이 어려워 문자 남깁니다.\"\n    }\n  },\n  \"MaxConcurrency\": 3,\n  \"PacingPerMinute\": 20\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/call-batches")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"Name\": \"7월 예약 확인\",\n  \"From\": \"07052358010\",\n  \"Tasks\": [\n    {\n      \"To\": \"01012345678\",\n      \"Variables\": {\n        \"customer_name\": \"홍길동\",\n        \"visit_date\": \"7월 30일\"\n      }\n    },\n    {\n      \"To\": \"01087654321\",\n      \"Variables\": {\n        \"customer_name\": \"김영희\",\n        \"visit_date\": \"7월 31일\"\n      }\n    }\n  ],\n  \"CallFlowId\": \"cf_9a8b7c6d\",\n  \"MachineDetection\": \"Enable\",\n  \"Rounds\": [\n    {\n      \"Windows\": [\n        {\n          \"Days\": [\n            1,\n            2,\n            3,\n            4,\n            5\n          ],\n          \"Start\": \"10:00\",\n          \"End\": \"18:00\"\n        }\n      ]\n    },\n    {\n      \"After\": 30,\n      \"On\": [\n        \"no-answer\",\n        \"busy\"\n      ],\n      \"Windows\": [\n        {\n          \"Days\": [\n            1,\n            2,\n            3,\n            4,\n            5\n          ],\n          \"Start\": \"18:00\",\n          \"End\": \"21:00\"\n        }\n      ]\n    },\n    {\n      \"After\": 45,\n      \"On\": [\n        \"no-answer\",\n        \"busy\"\n      ],\n      \"Windows\": [\n        {\n          \"Days\": [\n            1,\n            2,\n            3,\n            4,\n            5\n          ],\n          \"Start\": \"18:00\",\n          \"End\": \"21:00\"\n        }\n      ]\n    }\n  ],\n  \"MessagePolicy\": {\n    \"OnFinalFail\": {\n      \"Body\": \"{{customer_name}}님, {{visit_date}} 예약 확인차 전화드렸는데 연결이 어려워 문자 남깁니다.\"\n    }\n  },\n  \"MaxConcurrency\": 3,\n  \"PacingPerMinute\": 20\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/call-batches', [
  'body' => '{
  "Name": "7월 예약 확인",
  "From": "07052358010",
  "Tasks": [
    {
      "To": "01012345678",
      "Variables": {
        "customer_name": "홍길동",
        "visit_date": "7월 30일"
      }
    },
    {
      "To": "01087654321",
      "Variables": {
        "customer_name": "김영희",
        "visit_date": "7월 31일"
      }
    }
  ],
  "CallFlowId": "cf_9a8b7c6d",
  "MachineDetection": "Enable",
  "Rounds": [
    {
      "Windows": [
        {
          "Days": [
            1,
            2,
            3,
            4,
            5
          ],
          "Start": "10:00",
          "End": "18:00"
        }
      ]
    },
    {
      "After": 30,
      "On": [
        "no-answer",
        "busy"
      ],
      "Windows": [
        {
          "Days": [
            1,
            2,
            3,
            4,
            5
          ],
          "Start": "18:00",
          "End": "21:00"
        }
      ]
    },
    {
      "After": 45,
      "On": [
        "no-answer",
        "busy"
      ],
      "Windows": [
        {
          "Days": [
            1,
            2,
            3,
            4,
            5
          ],
          "Start": "18:00",
          "End": "21:00"
        }
      ]
    }
  ],
  "MessagePolicy": {
    "OnFinalFail": {
      "Body": "{{customer_name}}님, {{visit_date}} 예약 확인차 전화드렸는데 연결이 어려워 문자 남깁니다."
    }
  },
  "MaxConcurrency": 3,
  "PacingPerMinute": 20
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp CallBatches_createCallBatch_example
using RestSharp;

var client = new RestClient("https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/call-batches");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"Name\": \"7월 예약 확인\",\n  \"From\": \"07052358010\",\n  \"Tasks\": [\n    {\n      \"To\": \"01012345678\",\n      \"Variables\": {\n        \"customer_name\": \"홍길동\",\n        \"visit_date\": \"7월 30일\"\n      }\n    },\n    {\n      \"To\": \"01087654321\",\n      \"Variables\": {\n        \"customer_name\": \"김영희\",\n        \"visit_date\": \"7월 31일\"\n      }\n    }\n  ],\n  \"CallFlowId\": \"cf_9a8b7c6d\",\n  \"MachineDetection\": \"Enable\",\n  \"Rounds\": [\n    {\n      \"Windows\": [\n        {\n          \"Days\": [\n            1,\n            2,\n            3,\n            4,\n            5\n          ],\n          \"Start\": \"10:00\",\n          \"End\": \"18:00\"\n        }\n      ]\n    },\n    {\n      \"After\": 30,\n      \"On\": [\n        \"no-answer\",\n        \"busy\"\n      ],\n      \"Windows\": [\n        {\n          \"Days\": [\n            1,\n            2,\n            3,\n            4,\n            5\n          ],\n          \"Start\": \"18:00\",\n          \"End\": \"21:00\"\n        }\n      ]\n    },\n    {\n      \"After\": 45,\n      \"On\": [\n        \"no-answer\",\n        \"busy\"\n      ],\n      \"Windows\": [\n        {\n          \"Days\": [\n            1,\n            2,\n            3,\n            4,\n            5\n          ],\n          \"Start\": \"18:00\",\n          \"End\": \"21:00\"\n        }\n      ]\n    }\n  ],\n  \"MessagePolicy\": {\n    \"OnFinalFail\": {\n      \"Body\": \"{{customer_name}}님, {{visit_date}} 예약 확인차 전화드렸는데 연결이 어려워 문자 남깁니다.\"\n    }\n  },\n  \"MaxConcurrency\": 3,\n  \"PacingPerMinute\": 20\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift CallBatches_createCallBatch_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "Name": "7월 예약 확인",
  "From": "07052358010",
  "Tasks": [
    [
      "To": "01012345678",
      "Variables": [
        "customer_name": "홍길동",
        "visit_date": "7월 30일"
      ]
    ],
    [
      "To": "01087654321",
      "Variables": [
        "customer_name": "김영희",
        "visit_date": "7월 31일"
      ]
    ]
  ],
  "CallFlowId": "cf_9a8b7c6d",
  "MachineDetection": "Enable",
  "Rounds": [
    ["Windows": [
        [
          "Days": [1, 2, 3, 4, 5],
          "Start": "10:00",
          "End": "18:00"
        ]
      ]],
    [
      "After": 30,
      "On": ["no-answer", "busy"],
      "Windows": [
        [
          "Days": [1, 2, 3, 4, 5],
          "Start": "18:00",
          "End": "21:00"
        ]
      ]
    ],
    [
      "After": 45,
      "On": ["no-answer", "busy"],
      "Windows": [
        [
          "Days": [1, 2, 3, 4, 5],
          "Start": "18:00",
          "End": "21:00"
        ]
      ]
    ]
  ],
  "MessagePolicy": ["OnFinalFail": ["Body": "{{customer_name}}님, {{visit_date}} 예약 확인차 전화드렸는데 연결이 어려워 문자 남깁니다."]],
  "MaxConcurrency": 3,
  "PacingPerMinute": 20
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/call-batches")! 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()
```