통화 API 엔드포인트는 통화 객체에 대한 액세스를 제공합니다. Contact Center AI Platform (CCAI Platform)으로 걸거나 받는 모든 통화에 대해 통화 객체가 생성됩니다.
다음은 호출 API 엔드포인트입니다.
통화 객체
다음은 호출 객체의 예시입니다.
[
{
"id": 0,
"parent_id": 0,
"lang": "en",
"call_type": "Voice Scheduled (API)",
"status": "scheduled",
"created_at": "2018-06-07T19:49:52.896Z",
"queued_at": "2018-06-07T19:49:52.896Z",
"assigned_at": "2018-06-07T19:49:52.896Z",
"connected_at": "2018-06-07T19:49:52.896Z",
"ends_at": "2018-06-07T19:49:52.896Z",
"scheduled_at": "2018-06-07T19:49:52.896Z",
"wait_duration": 0,
"call_duration": 0,
"hold_duration": 0,
"rating": 0,
"has_feedback": true,
"voip_provider": "voip_provider_twilio",
"out_ticket_id": "string",
"out_ticket_url": "string",
"verified": true,
"recording_url": "string",
"recording_permission": "not_asked",
"voicemail_reason": "not_voicemail",
"deflection": "no_deflection",
"disconnected_by": "disconnected_by_unknown",
"fail_details": "string",
"fail_reason": "nothing",
"support_number": "string",
"selected_menu": {
"id": 0,
"name": "string",
"parent_id": 0,
"position": 0,
"deleted": true,
"hidden": "string",
"menu_type": "ivr_menu",
"output_msg": "string"
},
"menu_path": {
"items_count": 0,
"name": "string",
"materialized_path": "string"
},
"agent_info": {
"id": 0,
"name": "string",
"last_name": "string",
"first_name": "string",
"agent_number": "string",
"avatar_url": "string"
},
"end_user": {
"id": 0,
"identifier": "string",
"out_contact_id": "string"
},
"photos": [
{
"id": 0,
"photo_type": "photo",
"url": "string"
}
],
"videos": [
{
"id": 0,
"url": "string"
}
],
"transfers": [
{
"id": 0,
"status": "transferring",
"fail_reason": "nothing",
"created_at": "2018-06-07T19:49:52.896Z",
"from_menu": {
"items_count": 0,
"name": "string",
"materialized_path": "string"
},
"to_menu": {
"items_count": 0,
"name": "string",
"materialized_path": "string"
},
"from_agent": {
"id": 0,
"name": "string",
"last_name": "string",
"first_name": "string",
"agent_number": "string",
"avatar_url": "string"
},
"to_agent": {
"id": 0,
"name": "string",
"last_name": "string",
"first_name": "string",
"agent_number": "string",
"avatar_url": "string"
}
}
],
"participants": [
{
"id": 0,
"type": "end_user",
"status": "waiting",
"call_id": 0,
"user_id": 0,
"end_user_id": 0,
"call_duration": 0,
"hold_duration": 0,
"connected_at": "2018-06-07T19:49:52.896Z",
"ended_at": "2018-06-07T19:49:52.896Z",
"fail_reason": "nothing"
}
]
}
]
통화 상태 정의
상태 필드는 다음 상태 중 하나일 수 있습니다.
| 통화 상태 | 설명 |
|---|---|
| 선택 중 | 최종 사용자가 고객센터에 전화를 걸었지만 리프 메뉴에 배치되기 전에 메뉴 옵션을 탐색하는 경우 발생하는 상태입니다. |
| 큐에 추가됨 | 최종 사용자가 리프 메뉴 노드를 선택하고 상담사에게 델트캐스트 또는 멀티캐스트될 통화 요청을 시작한 후 발생하는 상태입니다. |
| 할당됨 | 상담사가 최종 사용자 통화를 수신하도록 선택될 때 발생하는 상태입니다. 이 이벤트는 상담사가 전화를 수신할 때 발생합니다. |
| 연결 중 | 상담사가 할당되고 최종 사용자와 상담사 간에 연결이 설정되는 중에 발생하는 상태입니다. |
| 연결됨 | 통화가 연결되고 상담사와 최종 사용자가 모두 통화에 참여한 경우 발생하는 상태입니다. |
| 완료됨 | 통화가 연결된 후 종료될 때 발생하는 상태입니다. |
| 실패 | 통화가 성공적으로 연결되기 전에 종료될 때 발생하는 상태입니다. 자세한 내용을 위해 실패 이유도 제공됩니다. |
| 전환 중 | 연결을 시도하는 중에 통화가 실패하고 CCAI 플랫폼이 다른 VOIP 제공업체와 통화를 연결하려고 시도할 때 발생하는 상태입니다. |
| 복구됨 | 실패한 통화가 다시 호출될 때 발생하는 상태입니다. 이 새로운 통화는 원래 통화의 하위 요소입니다. 콜백이 오류 없이 완료되었음을 나타내는 메모가 복구되었습니다. |
| 예약됨 | 최종 사용자가 웹 또는 앱 내에서 향후 통화를 예약한 경우 발생하는 상태입니다. |
| 작업만 | 고객의 자체 전화 통신 제공업체에서 처리하는 통화가 Google의 iOS 또는 Android SDK에 연결될 때 발생하는 상태입니다. |
| 작업만 완료됨 | 고객의 자체 전화 통신 제공업체에서 처리하는 통화가 Google의 iOS 또는 Android SDK에 연결되어 종료될 때 발생하는 상태입니다. |
| 골대를 벗어남 | 과부하 대기열 또는 근무 외 시간 통화의 구성에 따라 발생하는 상태입니다. 전환 옵션에는 음성사서함, 통화 예약 등이 포함됩니다. 전환은 채널 (인앱, IVR, 인웹)에 따라 다릅니다. |
| 음성메시지 | 최종 사용자가 음성사서함 옵션으로 전환되고 나중에 들을 음성사서함 메시지를 남기도록 선택할 때 발생하는 상태입니다. 이 상태는 최종 사용자가 음성메일을 남길 때 표시됩니다. |
| 음성메시지 받음 | 최종 사용자가 음성사서함을 남겼지만 상담사가 음성사서함을 듣지 않은 후에 발생하는 상태 |
| 음성메일 읽음 | 상담사가 음성메시지를 열어 들을 때 발생하는 상태입니다. |
통화 유형 정의
call_type 필드는 다음 값 중 하나만 사용할 수 있습니다.
| 통화 유형 | 설명 |
|---|---|
| 음성 아웃바운드 (API) | 아웃바운드 통화 API에서 이루어진 통화입니다. |
| Voice Inbound (API) | Incoming Call API에서 이루어진 통화입니다. |
| 음성 예약됨 (API) | 예약된 통화 API에서 이루어진 통화입니다. |
일반적인 API 응답 코드
가장 일반적인 API 응답은 다음과 같습니다.
| 응답 코드 | 의미 |
|---|---|
| 201 | API 요청이 성공했으며 통화가 생성됩니다. |
| 202 | API 요청은 성공했지만 작업을 완료하려면 위젯 내에서 수동 개입이 필요합니다. |
| 400 | 잘못된 통화 유형 - call_type이 지원되는지 확인하세요. |
| 400 | 상담사가 이 전화를 받을 수 없음 |
| 400 | 매개변수 누락 - 필수 매개변수가 추가되었는지 확인 |
| 404 | 리소스를 찾을 수 없음 - 하위 도메인을 확인하세요. |
아웃바운드 전화 - end_user_number
| 매개변수 | 필수 | 데이터 유형 | 정의 |
|---|---|---|---|
| call_tye | TRUE | 문자열 | 생성할 tye 호출입니다. 현재 '음성 아웃바운드 (API)', '아웃바운드 통화' (지원 중단됨)를 사용할 수 있습니다. |
| agent_email | TRUE | 문자열 | 아웃바운드 전화에 할당될 상담사의 이메일 주소입니다. |
| ticket_id | FALSE | 문자열 | CRM 티켓 ID를 입력하면 티켓에 연결된 최종 사용자에게 전화를 겁니다. |
| end_user_number | FALSE | 문자열 | 다이얼링할 최종 사용자 전화번호입니다. ticket_id가 end_user_number보다 우선순위가 높습니다. |
| outbound_number | FALSE | 문자열 | 설정 > 전화번호 > 전화번호 관리에서 관리되는 올바른 형식의 발신 번호 비어 있으면 기본 아웃바운드 번호가 사용됩니다. |
| lang | FALSE | 문자열 | 통화 언어입니다. ISO 639-1 코드를 사용합니다. (기본값: 'en') |
엔드포인트:
Method: POST
Type: RAW
URL: https://{subdomain}.{domain}/apps/api/v1/calls
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "agent@somedomain.com",
"outbound_number": "+1 760-867-5309",
"end_user_number": "123123",
"lang": "en"
}
요청 및 응답 예시
다음 섹션에서는 엔드포인트에 대한 요청의 예를 제공합니다.
오류 : 상담사가 이 통화를 받을 수 없음
이 예에서는 상담사가 통화를 받을 수 없는 경우의 실패 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "agent@somedomain.com",
"end_user_number": "+1 205-123-4567",
"lang": "en"
}
대답: 오류 : 상담사가 이 통화를 받을 수 없습니다.
{
"message": "Agent is not available to take this call"
}
상태 코드: 400
최종 사용자 번호로 아웃바운드 전화 만들기
이 예시에서는 특정 최종 사용자 번호에 아웃바운드 전화를 거는 방법을 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "admin@somedomain.com",
"end_user_number": "+1 859-657-9625",
"outbound_number": "+1 339-219-5276",
"lang": "en"
}
대답: end_user_number로 발신 전화 걸기
{
"id": 397,
"lang": "en",
"call_type": "Voice Outbound (API)",
"status": "assigned",
"created_at": "2019-06-07T01:27:30.406Z",
"queued_at": null,
"assigned_at": "2019-06-07T01:27:30.441Z",
"connected_at": null,
"ends_at": null,
"scheduled_at": null,
"wait_duration": 0,
"call_duration": 0,
"hold_duration": 0,
"rating": null,
"has_feedback": false,
"voip_provider": "voip_provider_twilio",
"out_ticket_id": null,
"out_ticket_url": null,
"verified": false,
"recording_url": null,
"recording_permission": "not_asked",
"voicemail_reason": "not_voicemail",
"deflection": "no_deflection",
"disconnected_by": "disconnected_by_unknown",
"fail_reason": "nothing",
"fail_details": null,
"support_number": null,
"selected_menu": null,
"menu_path": null,
"agent_info": {
"id": 1,
"agent_number": null,
"name": "Admin UJET",
"last_name": "UJET",
"first_name": "Admin",
"avatar_url": "https://somedomain.com/avatar.jpg"
},
"end_user": null,
"photos": [],
"videos": [],
"transfers": [],
"deflection_details": [],
"participants": [
{
"id": 610,
"type": "agent",
"status": "waiting",
"call_id": 397,
"user_id": 1,
"end_user_id": null,
"call_duration": null,
"hold_duration": null,
"connected_at": null,
"ended_at": null,
"fail_reason": "nothing"
},
{
"id": 611,
"type": "end_user",
"status": "waiting",
"call_id": 397,
"user_id": null,
"end_user_id": null,
"call_duration": null,
"hold_duration": null,
"connected_at": null,
"ended_at": null,
"fail_reason": "nothing"
}
],
"offer_type": null,
"offer_events": [],
"answer_type": "manual",
"outbound_number": "+1 339-219-5276"
}
상태 코드: 201
티켓 ID로 아웃바운드 전화 만들기
이 예시에서는 특정 티켓 ID로 아웃바운드 통화를 만드는 방법을 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "agent@somedomain.com",
"ticket_id": "71450",
"outbound_number": "+1 339-219-5276",
"lang": "en"
}
대답: ticket_id로 아웃바운드 통화 만들기
{
"id": 398,
"lang": "en",
"call_type": "Voice Outbound (API)",
"status": "assigned",
"created_at": "2019-06-07T01:28:47.955Z",
"queued_at": null,
"assigned_at": "2019-06-07T01:28:47.971Z",
"connected_at": null,
"ends_at": null,
"scheduled_at": null,
"wait_duration": 0,
"call_duration": 0,
"hold_duration": 0,
"rating": null,
"has_feedback": false,
"voip_provider": "voip_provider_twilio",
"out_ticket_id": "71450",
"out_ticket_url": null,
"verified": false,
"recording_url": null,
"recording_permission": "not_asked",
"voicemail_reason": "not_voicemail",
"deflection": "no_deflection",
"disconnected_by": "disconnected_by_unknown",
"fail_reason": "nothing",
"fail_details": null,
"support_number": null,
"selected_menu": null,
"menu_path": null,
"agent_info": {
"id": 1,
"agent_number": null,
"name": "Admin UJET",
"last_name": "UJET",
"first_name": "Admin",
"avatar_url": "https://somedomain.com/avatar.png"
},
"end_user": {
"id": 67,
"identifier": null,
"out_contact_id": "381630957514"
},
"photos": [],
"videos": [],
"transfers": [],
"deflection_details": [],
"participants": [
{
"id": 612,
"type": "agent",
"status": "waiting",
"call_id": 398,
"user_id": 1,
"end_user_id": null,
"call_duration": null,
"hold_duration": null,
"connected_at": null,
"ended_at": null,
"fail_reason": "nothing"
},
{
"id": 613,
"type": "end_user",
"status": "waiting",
"call_id": 398,
"user_id": null,
"end_user_id": 67,
"call_duration": null,
"hold_duration": null,
"connected_at": null,
"ended_at": null,
"fail_reason": "nothing"
}
],
"offer_type": null,
"offer_events": [],
"answer_type": "manual",
"outbound_number": "+1 339-219-5276"
}
상태 코드: 201
오류 : 티켓 ID 또는 최종 사용자 번호가 필요함
이 예시에서는 티켓 ID 또는 최종 사용자 번호가 필요하지만 제공되지 않는 실패 사례를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "allen@somedomain.com",
"end_user_number": "+1 205-123-4567",
"lang": "en"
}
응답: 오류 : ticket_id 또는 end_user_number가 필요함
{
"message": "ticket_id or end_user_number required"
}
상태 코드: 400
오류 : 유효한 상담사 이메일이 아님
이 예시에서는 상담사의 이메일 주소가 유효하지 않은 경우의 실패를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "admin@somedomain.com",
"end_user_number": "+1 205-123-4567",
"lang": "en"
}
대답: 오류 : 유효한 상담사 이메일이 아님
{
"message": "Not a valid agent email"
}
상태 코드: 400
오류 : 상담사 이메일이 필요함
이 예시에서는 상담사의 이메일 주소가 제공되지 않은 경우의 실패를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"end_user_number": "+1 205-123-4567",
"lang": "en"
}
응답: 오류 : 상담사 이메일이 필요합니다.
{
"message": "Agent email required"
}
상태 코드: 400
오류 : 상담사에게 전화를 걸 수 있는 액세스 권한이 없습니다.
이 예에서는 지정된 에이전트가 발신 전화를 걸 수 없는 경우의 실패를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "allen@somedomain.com",
"end_user_number": "+1 205-123-4567",
"lang": "en"
}
대답: 오류 : 에이전트가 전화를 걸 수 없습니다.
{
"message": "Agent does not have access to make calls"
}
상태 코드: 400
오류 : end_user_number가 형식이 올바르지 않습니다.
이 예에서는 제공된 최종 사용자 번호의 형식이 올바르지 않은 실패 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "allen@somedomain.com",
"outbound_number": "+1 760-410-8538",
"end_user_number": "123123",
"lang": "en"
}
대답: 오류 : end_user_number가 올바른 형식이 아님
{
"message": "end_user_number is not well-formed"
}
상태 코드: 400
오류 : 연락처를 찾을 수 없음
이 예시에서는 제공된 연락처가 존재하지 않는 실패 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "allen@somedomain.com",
"outbound_number": "+1 760-410-8538",
"ticket_id": 1,
"lang": "en"
}
대답: 오류 : 연락처를 찾을 수 없음
{
"message": "Contact not found"
}
상태 코드: 400
수락됨 : 발신 번호를 선택해야 함
이 예에서는 아웃바운드 통화가 수락되지만 상담사는 통화를 걸기 전에 사용할 아웃바운드 번호를 선택해야 합니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "agent@somedomain.com",
"outbound_number": "+1 760-867-5309",
"end_user_number": "123123",
"lang": "en"
}
응답
{
"call_type": "Voice Outbound (API)",
"agent_email": "allen@somedomain.com",
"end_user_number": "+1 205-123-4567",
"lang": "en"
}
상태 코드: 200
오류 : 잘못된 통화 유형
이 예시에서는 제공된 호출 유형이 잘못된 실패 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "allen@somedomain.com",
"outbound_number": "+1 760-410-8538",
"end_user_number": "123123",
"lang": "en"
}
응답: 오류 : 잘못된 호출 유형
{
"message": "Invalid call type"
}
상태 코드: 400
여러 발신 번호로 통화 어댑터 프롬프트
이 시나리오에서는 통화 어댑터에 여러 개의 아웃바운드 번호가 표시됩니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "agent@somedomain.com",
"outbound_number": "+1 760-867-5309",
"end_user_number": "123123",
"lang": "en"
}
응답
{
"call_type": "Voice Outbound (API)",
"agent_email": "admin@somedomain.com",
"end_user_number": "+1 859-657-9625",
"lang": "en"
}
상태 코드: 200
수락됨 : 상담사가 티켓 ID를 사용하여 아웃바운드 전화를 걸어야 합니다.
이 예시에서는 상담사가 제공된 티켓 ID를 기반으로 아웃바운드 전화를 걸어야 하는 요청을 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "allen@somedomain.com",
"end_user_number": "+1 205-123-4567",
"lang": "en"
}
상태 코드: 202
아웃바운드 전화 - ticket_id
| 매개변수 | 필수 | 데이터 유형 | 정의 |
|---|---|---|---|
| call_type | TRUE | 문자열 | 만들 통화 유형입니다. 현재 '음성 아웃바운드 (API)', '아웃바운드 통화' (지원 중단됨)를 사용할 수 있습니다. |
| agent_email | TRUE | 문자열 | 아웃바운드 전화에 할당될 상담사의 이메일 주소입니다. |
| ticket_id | FALSE | 문자열 | CRM 티켓 ID를 입력하면 티켓에 연결된 최종 사용자에게 전화를 겁니다. |
| end_user_number | FALSE | 문자열 | 다이얼링할 최종 사용자 전화번호입니다. ticket_id가 end_user_number보다 우선순위가 높습니다. |
| outbound_number | FALSE | 문자열 | 설정 > 전화번호 > 전화번호 관리에서 관리되는 올바른 형식의 발신 번호 비어 있으면 기본 아웃바운드 번호가 사용됩니다. |
| lang | FALSE | 문자열 | 통화 언어입니다. ISO 639-1 코드를 사용합니다. (기본값: 'en') |
엔드포인트:
Method: POST
Type: RAW
URL: https://{subdomain}.{domain}/apps/api/v1/calls
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "allen@somedomain.com",
"outbound_number": "+1 760-867-5309",
"ticket_id": "123123",
"lang": "en"
}
요청 및 응답 예시
다음 섹션에서는 엔드포인트에 대한 요청의 예를 제공합니다.
오류 : 티켓 ID 또는 최종 사용자 번호가 필요함
이 예에서는 티켓 ID 또는 최종 사용자 번호의 실패 시나리오가 누락되었지만 필수입니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "allen@somedomain.com",
"end_user_number": "+1 205-123-4567",
"lang": "en"
}
응답: 오류 : ticket_id 또는 end_user_number가 필요함
{
"message": "ticket_id or end_user_number required"
}
상태 코드: 400
오류 : 상담사 이메일이 필요함
이 예에서는 상담사 이메일이 제공되지 않았지만 필요한 실패 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"end_user_number": "+1 205-123-4567",
"lang": "en"
}
응답: 오류 : 상담사 이메일이 필요합니다.
{
"message": "Agent email required"
}
상태 코드: 400
최종 사용자 번호로 아웃바운드 전화 만들기
이 예에서는 최종 사용자 번호를 제공하여 아웃바운드 통화를 만드는 방법을 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "admin@somedomain.com",
"end_user_number": "+1 859-657-9625",
"outbound_number": "+1 339-219-5276",
"lang": "en"
}
대답: end_user_number로 발신 전화 걸기
{
"id": 397,
"lang": "en",
"call_type": "Voice Outbound (API)",
"status": "assigned",
"created_at": "2019-06-07T01:27:30.406Z",
"queued_at": null,
"assigned_at": "2019-06-07T01:27:30.441Z",
"connected_at": null,
"ends_at": null,
"scheduled_at": null,
"wait_duration": 0,
"call_duration": 0,
"hold_duration": 0,
"rating": null,
"has_feedback": false,
"voip_provider": "voip_provider_twilio",
"out_ticket_id": null,
"out_ticket_url": null,
"verified": false,
"recording_url": null,
"recording_permission": "not_asked",
"voicemail_reaso": "not_voicemail",
"deflection": "n_deflection",
"disconnected_by": "disconnected_by_unknown",
"fail_reason": "nothing",
"fail_details": null,
"support_number": null,
"selected_menu": null,
"menu_path": null,
"agent_info": {
"id": 1,
"agent_number": null,
"name": "Admin UJET",
"last_name": "UJET",
"first_name": "Admin",
"avatar_url": "https://somedomain.com/default-profile.png"
},
"end_user": null,
"photos": [],
"videos": [],
"transfers": [],
"deflection_details": [],
"participants": [
{
"id": 610,
"type": "agent",
"status": "waiting",
"call_id": 397,
"user_id": 1,
"end_user_id": null,
"call_duration": null,
"hold_duration": null,
"connected_at": null,
"ended_at": null,
"fail_reason": "nothing"
},
{
"id": 611,
"type": "end_user",
"status": "waiting",
"call_id": 397,
"user_id": null,
"end_user_id": null,
"call_duration": null,
"hold_duration": null,
"connected_at": null,
"ended_at": null,
"fail_reason": "nothing"
}
],
"offer_type": null,
"offer_events": [],
"answer_type": "manual",
"outbound_number": "+1 339-219-5276"
}
상태 코드: 201
오류 : 잘못된 통화 유형
이 예에서는 제공된 호출 유형이 잘못된 실패 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "ScheduledCall",
"agent_email": "allen@somedomain.com",
"outbound_number": "+1 760-410-8538",
"end_user_number": "123123",
"lang": "en"
}
응답: 오류 : 잘못된 호출 유형
{
"message": "Invalid call type"
}
상태 코드: 400
여러 발신 번호로 통화 어댑터 프롬프트
이 예시에서는 여러 아웃바운드 전화번호로 통화 어댑터에 프롬프트를 표시하는 방법을 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "admin@somedomain.com",
"end_user_number": "+1 859-657-9625",
"lang": "en"
}
상태 코드: 202
수락됨 : 상담사가 티켓 ID를 사용하여 아웃바운드 전화를 걸어야 합니다.
이 예에서는 티켓 ID로 아웃바운드 전화를 걸고 상담사가 요청을 수락하는 방법을 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "allen@somedomain.com",
"end_user_number": "+1 205-123-4567",
"lang": "en"
}
대답: 오류 : 에이전트가 전화를 걸 수 없습니다.
{
"message": "Agent does not have access to make calls"
}
상태 코드: 400
티켓 ID로 아웃바운드 전화를 겁니다.
이 예에서는 티켓 ID를 사용하여 아웃바운드 통화를 만드는 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "admin@somedomain.com",
"ticket_id": "71450",
"outbound_number": "+1 339-219-5276",
"lang": "en"
}
대답: ticket_id로 아웃바운드 통화 만들기
{
"id": 398,
"lang": "en",
"call_type": "Voice Outbound (API)",
"status": "assigned",
"created_at": "2019-06-07T01:28:47.955Z",
"queued_at": null,
"assigned_at": "2019-06-07T01:28:47.971Z",
"connected_at": null,
"ends_at": null,
"scheduled_at": null,
"wait_duration": 0,
"call_duration": 0,
"hold_duration": 0,
"rating": null,
"has_feedback": false,
"voip_provider": "voip_provider_twilio",
"out_ticket_id": "71450",
"out_ticket_url": null,
"verified": false,
"recording_url": null,
"recording_permission": "not_asked",
"voicemail_reason": "not_voicemail",
"deflection": "no_deflection",
"disconnected_by": "disconnected_by_unknown",
"fail_reason": "nothing",
"fail_details": null,
"support_number": null,
"selected_menu": null,
"menu_path": null,
"agent_info": {
"id": 1,
"agent_number": null,
"name": "Admin UJET",
"last_name": "UJET",
"first_name": "Admin",
"avatar_url": "https://somedomain.com/default-profile.png"
},
"end_user": {
"id": 67,
"identifier": null,
"out_contact_id": "381630957514"
},
"photos": [],
"videos": [],
"transfers": [],
"deflection_details": [],
"participants": [
{
"id": 612,
"type": "agent",
"status": "waiting",
"call_id": 398,
"user_id": 1,
"end_user_id": null,
"call_duration": null,
"hold_duration": null,
"connected_at": null,
"ended_at": null,
"fail_reason": "nothing"
},
{
"id": 613,
"type": "end_user",
"status": "waiting",
"call_id": 398,
"user_id": null,
"end_user_id": 67,
"call_duration": null,
"hold_duration": null,
"connected_at": null,
"ended_at": null,
"fail_reason": "nothing"
}
],
"offer_type": null,
"offer_events": [],
"answer_type": "manual",
"outbound_number": "+1 339-219-5276"
}
상태 코드: 201
수락됨 : 발신 번호를 선택해야 함
이 예에서는 발신 번호를 선택해야 하는 발신 전화 요청이 생성된 후 수락되는 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "allen@somedomain.com",
"end_user_number": "+1 205-123-4567",
"lang": "en"
}
상태 코드: 202
오류 : 상담사가 이 통화를 받을 수 없음
이 예에서는 통화가 생성되었지만 상담사가 통화를 수락할 수 없는 실패 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "allen@somedomain.com",
"end_user_number": "+1 205-123-4567",
"lang": "en"
}
대답: 오류 : 상담사가 이 통화를 받을 수 없습니다.
{
"message": "Agent is not available to take this call"
}
상태 코드: 400
오류 : 최종 사용자 번호의 형식이 잘못됨
이 예에서는 제공된 최종 사용자 전화번호가 잘못된 형식인 실패 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "allen@somedomain.com",
"outbound_number": "+1 760-410-8538",
"end_user_number": "123123",
"lang": "en"
}
대답: 오류 : end_user_number가 올바른 형식이 아님
{
"message": "end_user_number is not well-formed"
}
상태 코드: 400
오류 : 유효한 상담사 이메일이 아님
이 예에서는 제공된 상담사 이메일이 유효하지 않은 실패 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "admin@somedomain.com",
"end_user_number": "+1 205-123-4567",
"lang": "en"
}
대답: 오류 : 유효한 상담사 이메일이 아님
{
"message": "Not a valid agent email"
}
상태 코드: 400
오류 : 연락처를 찾을 수 없음
이 예에서는 제공된 연락처를 찾을 수 없는 실패 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Outbound (API)",
"agent_email": "allen@somedomain.com",
"outbound_number": "+1 760-410-8538",
"ticket_id": 1,
"lang": "en"
}
대답: 오류 : 연락처를 찾을 수 없음
{
"message": "Contact not found"
}
상태 코드: 400
수신 전화
| 매개변수 | 필수 | 데이터 유형 | 정의 |
|---|---|---|---|
| call_type | TRUE | 문자열 | 만들 통화 유형입니다. 'Voice Inbound (API)' 또는 'IncomingCall' (지원 중단됨)을 사용하여 수신 전화를 만듭니다. |
| menu_id | TRUE | 정수 | 통화를 귀속시킬 메뉴의 ID입니다. IVR 및 웹 메뉴 ID만 허용됩니다. |
| end_user_number | TRUE | 문자열 | 다이얼할 최종 사용자 전화번호입니다. ticket_id와 end_user_number가 모두 전달되면 ticket_id가 우선 적용됩니다. |
| lang | FALSE | 문자열 | 통화 언어입니다. ISO 639-1 코드를 사용합니다. (기본값: 'en') |
| ticket_id | FALSE | 문자열 | CRM 티켓 ID입니다. 티켓에 연결된 최종 사용자 전화번호로 전화를 겁니다. ticket_id와 end_user_number가 모두 전달되면 ticket_id가 우선 적용됩니다. |
| outbound_number | FALSE | 문자열 | 통화에 사용할 아웃바운드 전화번호입니다. 입력이 전달되지 않거나 유효하지 않으면 기본 전역 발신 전화번호가 사용됩니다. 아웃바운드 번호는 설정 > 대기열 > 수정 / 보기 > 대기열 선택 > 아웃바운드 전화번호에서 관리합니다. |
| recording_permission | FALSE | 문자열 | 이 값은 '통화 녹음 옵션' 기능이 '사용자에게 녹음 권한 요청'으로 설정된 경우에만 평가됩니다. 설정 > 대기열 > 수정 / 보기 > 대기열 선택 > 통화 녹음 옵션에서 구성할 수 있습니다. 값이 'recording_permission_not_asked' (기본값) 또는 'recording_permission_denied'이면 통화가 녹음되지 않습니다. 값이 'recording_permission_granted'이면 통화가 녹음됩니다. |
엔드포인트:
Method: POST
Type: RAW
URL: https://{{subdomain}}.{{domain}}/apps/api/v1/calls
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Inbound (API)",
"lang": "en",
"menu_id": 9,
"ticket_id": "76517",
"end_user_number": "+1 859-657-9625",
"recording_permission": "recording_permission_granted"
}
요청 및 응답 예시
다음 섹션에서는 엔드포인트에 대한 요청의 예를 제공합니다.
오류 : 최종 사용자 번호가 올바른 형식이 아님
이 예에서는 수신 전화가 생성되지만 제공된 최종 사용자 번호가 잘못된 실패 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Inbound (API)",
"lang": "en",
"menu_id": 9,
"end_user_number": "+1 999-657-12",
"recording_permission": "recording_permission_granted"
}
대답: 오류 : end_user_number 형식이 올바르지 않음
{
"message": "end_user_number is not well formed"
}
상태 코드: 400
오류 : 메뉴가 '수동 리디렉션' 상태이므로 전화를 수락할 수 없음
이 예에서는 호출이 메뉴 ID로 라우팅되지만 메뉴가 수동 리디렉션 상태에 있어 수신 전화를 받을 수 없는 실패 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Inbound (API)",
"lang": "en",
"menu_id": 9,
"end_user_number": "+1 859-657-9625",
"recording_permission": "recording_permission_granted"
}
대답: 오류 : 메뉴가 '수동 리디렉션' 상태이므로 전화를 수락할 수 없습니다.
{
"message": "Menu is in 'manual redirection' state, can't accept calls"
}
상태 코드: 400
오류 : 잘못된 통화 유형
이 예에서는 수신 전화가 생성되지만 제공된 전화 유형이 유효하지 않은 실패 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "InvalidCallType",
"lang": "en",
"menu_id": 9,
"end_user_number": "+1 859-657-9625",
"recording_permission": "recording_permission_granted"
}
응답: 오류 : 잘못된 호출 유형
{
"message": "Invalid call type"
}
상태 코드: 400
오류 : 메뉴 ID가 필요합니다.
이 예에서는 수신 전화가 생성되지만 제공된 메뉴 ID가 유효하지 않은 실패 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Inbound (API)",
"lang": "en",
"end_user_number": "+1 859-657-9625",
"recording_permission": "recording_permission_granted"
}
응답: 오류 : menu_id는 필수 항목입니다.
{
"message": "menu_id is required"
}
상태 코드: 400
오류 : IVR 및 모바일 메뉴 ID만 허용됨
이 예에서는 수신 전화가 생성되었지만 제공된 메뉴 ID가 IVR 또는 모바일 메뉴 ID가 아닌 실패 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Inbound (API)",
"lang": "en",
"menu_id": 50,
"end_user_number": "+1 859-657-9625",
"recording_permission": "recording_permission_granted"
}
대답: 오류 : IVR 및 모바일 메뉴 ID만 허용됩니다.
{
"message": "Only IVR and mobile menu IDs are permitted"
}
상태 코드: 400
최종 사용자 번호로 수신 전화 만들기
이 예시에서는 특정 최종 사용자 번호로 수신 전화를 만드는 방법을 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Inbound (API)",
"lang": "en",
"menu_id": 9,
"end_user_number": "+82-10-6861-2345",
"recording_permission": "recording_permission_granted"
}
대답: end_user_number로 수신 전화 만들기
{
"id": 515,
"lang": "en",
"call_type": "Voice Inbound (API)",
"status": "queued",
"created_at": "2019-09-10T00:19:14.000Z",
"queued_at": "2019-09-10T00:19:14.421Z",
"assigned_at": null,
"connected_at": null,
"ends_at": null,
"scheduled_at": null,
"wait_duration": 0,
"call_duration": 0,
"hold_duration": 0,
"rating": null,
"has_feedback": false,
"out_ticket_id": null,
"out_ticket_url": null,
"verified": false,
"recording_url": null,
"recording_permission": "not_asked",
"voicemail_reason": "not_voicemail",
"deflection": "no_deflection",
"disconnected_by": "disconnected_by_unknown",
"fail_reason": "nothing",
"fail_details": null,
"support_number": null,
"selected_menu": {
"id": 9,
"name": "Lock Star",
"parent_id": null,
"position": 0,
"deleted": false,
"menu_type": "ivr_menu",
"output_msg": "You selected Lock Star.",
"hidden": false
},
"menu_path": {
"items_count": 1,
"name": "Lock Star",
"materialized_path": "9"
},
"agent_info": null,
"end_user": {
"id": 75,
"identifier": null,
"out_contact_id": "389391400633"
},
"photos": [],
"videos": [],
"transfers": [],
"deflection_details": [],
"participants": [
{
"id": 820,
"type": "end_user",
"status": "waiting",
"call_id": 515,
"user_id": null,
"end_user_id": 75,
"call_duration": null,
"hold_duration": null,
"connected_at": null,
"ended_at": null,
"fail_reason": "nothing"
}
],
"offer_type": "cascade",
"offer_events": [
{
"casting_time": "2019-09-10T00:19:14.000Z",
"group": "Group 1"
}
],
"answer_type": "manual",
"outbound_number": "+1 339-219-5276"
}
상태 코드: 201
오류 : 메뉴가 '영업 외 시간' 상태이므로 수신 전화를 수락할 수 없음
이 예시에서는 제공된 메뉴 ID가 영업 외 시간 상태인 경우의 실패를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Inbound (API)",
"lang": "en",
"menu_id": 9,
"end_user_number": "+1 859-657-9625",
"recording_permission": "recording_permission_granted"
}
대답: 오류 : 메뉴가 '영업시간 외' 상태이므로 수신 전화를 수락할 수 없음
{
"message": "Menu is in 'after hours' state, can't accept incoming calls"
}
상태 코드: 400
오류 : 언어를 사용할 수 없음
이 예시에서는 지정된 언어를 사용할 수 없는 경우의 실패 요청을 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Inbound (API)",
"lang": "fr",
"menu_id": 9,
"end_user_number": "+1 859-657-9625",
"recording_permission": "recording_permission_granted"
}
대답: 오류 : 언어를 사용할 수 없음
{
"message": "Language 'fr' is not available"
}
상태 코드: 400
티켓 ID로 수신 전화 만들기
이 예시에서는 연결된 티켓 ID가 있는 수신 전화를 만드는 요청을 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Inbound (API)",
"lang": "en",
"menu_id": 9,
"ticket_id": "76517",
"end_user_number": "+1 859-657-9625",
"recording_permission": "recording_permission_granted"
}
응답: ticket_id로 수신 전화 만들기
{
"id": 519,
"lang": "en",
"call_type": "Voice Inbound (API)",
"status": "queued",
"created_at": "2019-09-10T05:12:26.000Z",
"queued_at": "2019-09-10T05:12:26.295Z",
"assigned_at": null,
"connected_at": null,
"ends_at": null,
"scheduled_at": null,
"wait_duration": 0,
"call_duration": 0,
"hold_duration": 0,
"rating": null,
"has_feedback": false,
"out_ticket_id": "76517",
"out_ticket_url": null,
"verified": false,
"recording_url": null,
"recording_permission": "not_asked",
"voicemail_reason": "not_voicemail",
"deflection": "no_deflection",
"disconnected_by": "disconnected_by_unknown",
"fail_reason": "nothing",
"fail_details": null,
"support_number": null,
"selected_menu": {
"id": 9,
"name": "Lock Star",
"parent_id": null,
"position": 0,
"deleted": false,
"menu_type": "ivr_menu",
"output_msg": "You selected Lock Star.",
"hidden": false
},
"menu_path": {
"items_count": 1,
"name": "Lock Star",
"materialized_path": "9"
},
"agent_info": null,
"end_user": {
"id": 75,
"identifier": null,
"out_contact_id": "389391400633"
},
"photos": [],
"videos": [],
"transfers": [],
"deflection_details": [],
"participants": [
{
"id": 826,
"type": "end_user",
"status": "waiting",
"call_id": 519,
"user_id": null,
"end_user_id": 75,
"call_duration": null,
"hold_duration": null,
"connected_at": null,
"ended_at": null,
"fail_reason": "nothing"
}
],
"offer_type": "cascade",
"offer_events": [
{
"casting_time": "2019-09-10T05:12:26.000Z",
"group": "Group 1"
}
],
"answer_type": "manual",
"outbound_number": "+1 339-219-5276"
}
상태 코드: 201
오류 : 언어를 찾을 수 없음
이 예시에서는 제공된 언어를 찾을 수 없는 경우의 실패를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Inbound (API)",
"lang": "xy",
"menu_id": 9,
"end_user_number": "+1 859-657-9625",
"recording_permission": "recording_permission_granted"
}
대답: 오류 : 언어를 찾을 수 없음
{
"message": "Language 'xy' is not found"
}
상태 코드: 400
오류 : menu_id를 찾을 수 없음
이 예에서는 제공된 메뉴 ID를 찾을 수 없는 경우의 실패를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Inbound (API)",
"lang": "en",
"menu_id": 9999,
"end_user_number": "+1 859-657-9625",
"recording_permission": "recording_permission_granted"
}
응답: 오류 : menu_id를 찾을 수 없음
{
"message": "menu_id 9999 is not found"
}
상태 코드: 400
오류 : menu_id 형식이 잘못됨
이 예시에서는 제공된 메뉴 ID가 올바르지 않은 경우의 실패를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Inbound (API)",
"lang": "en",
"menu_id": "menu_999",
"end_user_number": "+1 859-657-9625",
"recording_permission": "recording_permission_granted"
}
대답: 오류 : menu_id가 올바르게 구성되지 않음
{
"message": "menu_id is not well formed"
}
상태 코드: 400
오류 : 최종 사용자 번호가 필요함
이 예에서는 수신 전화가 생성되었지만 최종 사용자 전화번호가 제공되지 않은 실패 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Inbound (API)",
"lang": "en",
"menu_id": 9,
"recording_permission": "recording_permission_granted"
}
응답: 오류 : end_user_number가 필요합니다.
{
"message": "end_user_number is required"
}
상태 코드: 400
예약된 통화
| 매개변수 | 필수 | 데이터 유형 | 정의 |
|---|---|---|---|
| call_type | TRUE | 문자열 | 만들 통화 유형입니다. '음성 예약 (API)' 또는 'ScheduledCall' (지원 중단됨)을 사용하여 예약된 통화를 만듭니다. |
| menu_id | TRUE | 정수 | 통화를 귀속시킬 메뉴의 ID입니다. 모바일 및 웹 메뉴 ID만 허용됩니다. |
| call_id | FALSE | 정수 | 새로 생성된 예약 통화의 상위 통화로 연결될 이전 통화의 통화 ID입니다. 통화 ID를 사용하는 경우 menu_id는 선택사항입니다. |
| end_user_number | TRUE | 문자열 | 다이얼할 최종 사용자 전화번호입니다. ticket_id와 end_user_number가 모두 전달되면 ticket_id가 우선 적용됩니다. |
| lang | FALSE | 문자열 | 통화 언어입니다. ISO 639-1 코드를 사용합니다. (기본값: 'en') |
| ticket_id | FALSE | 문자열 | CRM 티켓 ID입니다. 티켓에 연결된 최종 사용자 전화번호로 전화를 겁니다. ticket_id와 end_user_number가 모두 전달되면 ticket_id가 우선 적용됩니다. |
| scheduled_at | TRUE | 문자열 | 통화 예약 시간입니다. 유효한 미래 시간으로 ISO 8601 형식을 사용합니다. |
| recording_permission | FALSE | 문자열 | 이 값은 '통화 녹음 옵션' 기능이 '사용자에게 녹음 권한 요청'으로 설정된 경우에만 평가됩니다. 설정 > 대기열 > 수정 / 보기 > 대기열 선택 > 통화 녹음 옵션에서 구성할 수 있습니다. 값이 'recording_permission_not_asked' (기본값) 또는 'recording_permission_denied'이면 통화가 녹음되지 않습니다. 값이 'recording_permission_granted'이면 통화가 녹음됩니다. |
엔드포인트:
Method: POST
Type: RAW
URL: https://{{subdomain}}.{{domain}}/apps/api/v1/calls
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Scheduled (API)",
"lang": "en",
"menu_id": 9,
"ticket_id": "76517",
"end_user_number": "+1 859-657-9625",
"scheduled_at": "2019-09-15T00:19:14.421Z",
"recording_permission": "recording_permission_granted"
}
요청 및 응답 예시
다음 섹션에서는 엔드포인트에 대한 요청의 예를 제공합니다.
오류 : end_user_number 형식이 잘못됨
이 예시에서는 end_user_number의 형식이 올바르지 않아 발생하는 실패를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Scheduled (API)",
"lang": "en",
"menu_id": 9,
"end_user_number": "+1 999-657-12",
"scheduled_at": "2019-09-15T00:19:14.421Z",
"recording_permission": "recording_permission_granted"
}
대답: 오류 : end_user_number 형식이 올바르지 않음
{
"message": "end_user_number is not well formed"
}
상태 코드: 400
오류 : 메뉴가 '수동 리디렉션' 상태이므로 전화를 수락할 수 없음
이 예에서는 지정된 메뉴 ID가 메뉴 리디렉션으로 설정되어 전화를 수락할 수 없는 경우의 실패를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Scheduled (API)",
"lang": "en",
"menu_id": 9,
"end_user_number": "+1 859-657-9625",
"scheduled_at": "2019-09-15T00:19:14.421Z",
"recording_permission": "recording_permission_granted"
}
대답: 오류 : 메뉴가 '수동 리디렉션' 상태이므로 전화를 수락할 수 없습니다.
{
"message": "Menu is in 'manual redirection' state, can't accept calls"
}
상태 코드: 400
오류 : 잘못된 통화 유형
이 예에서는 요청이 이루어지고 호출 유형이 잘못된 경우의 실패를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "InvalidCallType",
"lang": "en",
"menu_id": 9,
"end_user_number": "+1 859-657-9625",
"scheduled_at": "2019-09-15T00:19:14.421Z",
"recording_permission": "recording_permission_granted"
}
응답: 오류 : 잘못된 호출 유형
{
"message": "Invalid call type"
}
상태 코드: 400
오류 : menu_id가 필요함
이 예시는 메뉴 ID가 제공되지 않았지만 필요한 경우의 요청과 응답을 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Scheduled (API)",
"lang": "en",
"end_user_number": "+1 859-657-9625",
"scheduled_at": "2019-09-15T00:19:14.421Z",
"recording_permission": "recording_permission_granted"
}
응답: 오류 : menu_id는 필수 항목입니다.
{
"message": "menu_id is required"
}
상태 코드: 400
오류 : 모바일 및 웹 메뉴 ID만 허용됩니다.
이 예시에서는 웹 또는 모바일 메뉴 ID가 아닌 메뉴 ID가 제공될 때 요청이 실패하는 것을 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Scheduled (API)",
"lang": "en",
"menu_id": 50,
"end_user_number": "+1 859-657-9625",
"scheduled_at": "2019-09-15T00:19:14.421Z",
"recording_permission": "recording_permission_granted"
}
응답: 오류 : 모바일 및 웹 메뉴 ID만 허용됩니다.
{
"message": "Only mobile and web menu IDs are permitted"
}
상태 코드: 400
메뉴 ID로 예약된 통화 만들기
이 예에서는 특정 메뉴 ID로 예약된 통화를 만드는 방법을 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Scheduled (API)",
"lang": "en",
"menu_id": 9,
"end_user_number": "+82-10-6861-2345",
"scheduled_at": "2019-09-15T00:19:14.421Z",
"recording_permission": "recording_permission_granted"
}
대답: 메뉴 ID로 예약된 통화 만들기
{
"id": 515,
"lang": "en",
"call_type": "Voice Inbound (API)",
"status": "queued",
"created_at": "2019-09-10T00:19:14.000Z",
"queued_at": null,
"assigned_at": null,
"connected_at": null,
"ends_at": null,
"scheduled_at": "2019-09-15T00:19:14.421Z",
"wait_duration": 0,
"call_duration": 0,
"hold_duration": 0,
"rating": null,
"has_feedback": false,
"out_ticket_id": null,
"out_ticket_url": null,
"verified": false,
"recording_url": null,
"recording_permission": "not_asked",
"voicemail_reason": "not_voicemail",
"deflection": "no_deflection",
"disconnected_by": "disconnected_by_unknown",
"fail_reason": "nothing",
"fail_details": null,
"support_number": null,
"selected_menu": {
"id": 9,
"name": "Lock Star",
"parent_id": null,
"position": 0,
"deleted": false,
"menu_type": "ivr_menu",
"output_msg": "You selected Lock Star.",
"hidden": false
},
"menu_path": {
"items_count": 1,
"name": "Lock Star",
"materialized_path": "9"
},
"agent_info": null,
"end_user": {
"id": 75,
"identifier": null,
"out_contact_id": "389391400633"
},
"photos": [],
"videos": [],
"transfers": [],
"deflection_details": [],
"participants": [
{
"id": 820,
"type": "end_user",
"status": "waiting",
"call_id": 515,
"user_id": null,
"end_user_id": 75,
"call_duration": null,
"hold_duration": null,
"connected_at": null,
"ended_at": null,
"fail_reason": "nothing"
}
],
"offer_type": "cascade",
"offer_events": [
{
"casting_time": "2019-09-10T00:19:14.000Z",
"group": "Group 1"
}
],
"answer_type": "manual",
"outbound_number": "+1 339-219-5276"
}
상태 코드: 201
통화 ID로 예약된 통화 만들기
이 예에서는 특정 통화 ID로 예약된 통화를 만드는 방법을 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Scheduled (API)",
"lang": "en",
"call_id": 514,
"end_user_number": "+82-10-6861-2345",
"scheduled_at": "2019-09-15T00:19:14.421Z",
"recording_permission": "recording_permission_granted"
}
대답: 통화 ID로 예약된 통화 만들기
{
"id": 515,
"lang": "en",
"call_type": "Voice Inbound (API)",
"status": "queued",
"created_at": "2019-09-10T00:19:14.000Z",
"queued_at": null,
"assigned_at": null,
"connected_at": null,
"ends_at": null,
"scheduled_at": "2019-09-15T00:19:14.421Z",
"wait_duration": 0,
"call_duration": 0,
"hold_duration": 0,
"rating": null,
"has_feedback": false,
"out_ticket_id": null,
"out_ticket_url": null,
"verified": false,
"recording_url": null,
"recording_permission": "not_asked",
"voicemail_reason": "not_voicemail",
"deflection": "no_deflection",
"disconnected_by": "disconnected_by_unknown",
"fail_reason": "nothing",
"fail_details": null,
"support_number": null,
"selected_menu": {
"id": 9,
"name": "Lock Star",
"parent_id": null,
"position": 0,
"deleted": false,
"menu_type": "ivr_menu",
"output_msg": "You selected Lock Star.",
"hidden": false
},
"menu_path": {
"items_count": 1,
"name": "Lock Star",
"materialized_path": "9"
},
"agent_info": null,
"end_user": {
"id": 75,
"identifier": null,
"out_contact_id": "389391400633"
},
"photos": [],
"videos": [],
"transfers": [],
"deflection_details": [],
"participants": [
{
"id": 820,
"type": "end_user",
"status": "waiting",
"call_id": 515,
"user_id": null,
"end_user_id": 75,
"call_duration": null,
"hold_duration": null,
"connected_at": null,
"ended_at": null,
"fail_reason": "nothing"
}
],
"offer_type": "cascade",
"offer_events": [
{
"casting_time": "2019-09-10T00:19:14.000Z",
"group": "Group 1"
}
],
"answer_type": "manual",
"outbound_number": "+1 339-219-5276"
}
상태 코드: 201
오류 : 메뉴가 '영업 외 시간' 상태이므로 수신 전화를 수락할 수 없음
이 예에서는 예약된 통화가 생성되었지만 제공된 메뉴가 영업시간 외이므로 수신 전화를 받을 수 없는 실패 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Scheduled (API)",
"lang": "en",
"menu_id": 9,
"end_user_number": "+1 859-657-9625",
"scheduled_at": "2019-09-15T00:19:14.421Z",
"recording_permission": "recording_permission_granted"
}
대답: 오류 : 메뉴가 '영업시간 외' 상태이므로 수신 전화를 수락할 수 없음
{
"message": "Menu is in 'after hours' state, can't accept incoming calls"
}
상태 코드: 400
오류 : 언어를 사용할 수 없음
이 예시에서는 지정된 언어가 잘못된 경우의 실패를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Scheduled (API)",
"lang": "fr",
"menu_id": 9,
"end_user_number": "+1 859-657-9625",
"scheduled_at": "2019-09-15T00:19:14.421Z",
"recording_permission": "recording_permission_granted"
}
대답: 오류 : 언어를 사용할 수 없음
{
"message": "Language 'fr' is not available"
}
상태 코드: 400
오류 : 언어를 찾을 수 없음
이 예에서는 예약된 호출이 생성되었지만 언어가 유효하지 않거나 사용할 수 없는 실패 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Scheduled (API)",
"lang": "xy",
"menu_id": 9,
"end_user_number": "+1 859-657-9625",
"scheduled_at": "2019-09-15T00:19:14.421Z",
"recording_permission": "recording_permission_granted"
}
대답: 오류 : 언어를 찾을 수 없음
{
"message": "Language 'xy' is not found"
}
상태 코드: 400
오류 : 메뉴 ID를 찾을 수 없음
이 예에서는 예약된 호출이 생성되었지만 제공된 메뉴 ID가 유효하지 않고 찾을 수 없는 실패 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Scheduled (API)",
"lang": "en",
"menu_id": 9999,
"end_user_number": "+1 859-657-9625",
"scheduled_at": "2019-09-15T00:19:14.421Z",
"recording_permission": "recording_permission_granted"
}
대답: 오류 : 메뉴 ID를 찾을 수 없음
{
"message": "menu_id 9999 is not found"
}
상태 코드: 400
오류 : 메뉴 ID 형식이 잘못됨
이 예에서는 예약된 통화가 생성되었지만 제공된 메뉴 ID가 잘못된 실패 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Scheduled (API)",
"lang": "en",
"menu_id": "menu_999",
"end_user_number": "+1 859-657-9625",
"scheduled_at": "2019-09-15T00:19:14.421Z",
"recording_permission": "recording_permission_granted"
}
대답: 오류 : menu_id가 올바르게 구성되지 않음
{
"message": "menu_id is not well formed"
}
상태 코드: 400
오류 : 최종 사용자 번호가 필요함
이 예에서는 예약된 통화가 생성되었지만 최종 사용자 번호가 제공되지 않은 실패 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Scheduled (API)",
"lang": "en",
"menu_id": 9,
"scheduled_at": "2019-09-15T00:19:14.421Z",
"recording_permission": "recording_permission_granted"
}
응답: 오류 : end_user_number가 필요합니다.
{
"message": "end_user_number is required"
}
상태 코드: 400
오류 : scheduled_at이 필요합니다.
이 예에서는 예약된 호출이 생성되었지만 예약된 시간 값이 누락되어 필요한 실패 시나리오를 보여줍니다.
요청
헤더:
| 키 | 값 | 설명 |
|---|---|---|
| Content-Type | application/json |
본문:
{
"call_type": "Voice Scheduled (API)",
"lang": "en",
"menu_id": 9,
"end_user_number": "+1 859-657-9625",
"recording_permission": "recording_permission_granted"
}
응답: 오류 : scheduled_at이 필요합니다.
{
"message": "scheduled_at is required"
}
상태 코드: 400
통화 중에 예약된 데이터 속성 가져오기
엔드포인트
Method: GET
Type: RAW
URL: https://{subdomain}.{domain}/apps/api/v1/calls/:id/customer_flag
요청 및 응답 예시
이 섹션에는 엔드포인트의 요청 및 응답 예시가 포함되어 있습니다.
성공
이 예시에서는 성공적인 호출을 보여줍니다.
요청
URL 변수
| 키 | 값 | 설명 |
|---|---|---|
| id | 정수 | (필수) |
응답
{
"verified_customer": "boolean",
"bad_actor": "boolean",
"repeat_customer": "boolean"
}
상태 코드 0
통화 중에 예약된 데이터 속성 업데이트
엔드포인트
Method: PATCH
Type: RAW
URL: https://{subdomain}.{domain}/apps/api/v1/calls/:id/customer_flag
URL 변수
| 키 | 값 | 설명 |
|---|---|---|
| id | 정수 | (필수) |
본문
{
"verified_customer": "boolean",
"bad_actor": "boolean",
"repeat_customers": "boolean"
}
세션 중에 가상 상담사에게 데이터 매개변수 전달
앱 API를 사용하여 통화 세션 중에 가상 상담사에게 데이터 매개변수를 전달하려면 세션 중에 가상 상담사에게 데이터 매개변수 전달을 참고하세요.