새로운 문서를 작성 중입니다.새 문서로 이동
ClawOps Docs
API Reference

콜 플로우 생성

POST
/v1/accounts/{accountId}/call-flows

콜 플로우(결정적 ARS)를 새로 만듭니다. 콘솔 빌더가 저장하는 것과 같은 그래프 포맷이라, 여기서 만든 플로우는 콘솔에서 그대로 열리고 편집됩니다(좌표는 자동 배치됩니다).

검증은 두 단계입니다.

  1. 구조 — 블럭 타입·필드·값 범위. 스키마에 없는 필드는 거절합니다(오타 방어).
  2. 참조 — next 류가 가리키는 블럭이 실재하는지, 시작 블럭이 있는지.

실패하면 400과 함께 issues[]필드 단위 사유가 실립니다.

만든 플로우의 callFlowId는 발신(POST /v1/accounts/{accountId}/callsCallFlowId)과 착신(PATCH /v1/accounts/{accountId}/numbers/{number}routingType=callflow)에 그대로 씁니다.

Authorization

BearerAuth
AuthorizationBearer <token>

API Key를 Bearer 토큰으로 전달

In: header

Path Parameters

accountId*string

계정 ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/accounts/AC1a2b3c4d/call-flows" \  -H "Content-Type: application/json" \  -d '{    "name": "동의 확인 ARS",    "graph": {      "version": 1,      "start": "ask",      "nodes": {        "ask": {          "type": "menu",          "prompt": "안내에 동의하시면 1번, 거부하시면 2번을 눌러주세요.",          "branches": {            "1": "agreed",            "2": "declined"          },          "invalidNext": null,          "timeoutNext": "noInput",          "saveAs": "consent"        },        "agreed": {          "type": "hangup",          "message": "동의해 주셔서 감사합니다."        },        "declined": {          "type": "hangup",          "message": "확인했습니다. 감사합니다."        },        "noInput": {          "type": "hangup",          "message": "입력이 없어 통화를 종료합니다."        }      }    }  }'
{
  "callFlowId": "cmryw3ycm000001s6on0kp9a8",
  "name": "고객센터 ARS",
  "phoneNumbers": [
    "07052753864"
  ],
  "variables": [
    "name"
  ],
  "dateCreated": "2026-07-24T09:12:33.000Z",
  "dateUpdated": "2026-07-27T01:40:11.000Z",
  "graph": {
    "version": 1,
    "start": "greeting",
    "voice": {
      "provider": "google",
      "language": "ko"
    },
    "nodes": {
      "greeting": {
        "type": "say",
        "text": "안녕하세요, 클로옵스입니다.",
        "next": "bye"
      },
      "bye": {
        "type": "hangup",
        "message": "이용해 주셔서 감사합니다."
      }
    }
  }
}
{
  "error": "콜 플로우 구성이 올바르지 않습니다",
  "code": "call_flow_invalid_graph",
  "issues": [
    {
      "path": "nodes.ask.timeoutSecs",
      "message": "알 수 없는 필드입니다: timeoutSecs"
    }
  ]
}
{
  "error": "string",
  "code": "recipient_blocked"
}
{
  "error": "string",
  "code": "recipient_blocked"
}
{
  "error": "string",
  "code": "recipient_blocked"
}
{
  "error": "string",
  "code": "recipient_blocked"
}