通話を取得する
curl --request GET \
--url https://api.ai-call.co/calls/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ai-call.co/calls/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ai-call.co/calls/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ai-call.co/calls/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ai-call.co/calls/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ai-call.co/calls/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ai-call.co/calls/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"direction": "inbound",
"status": "<string>",
"result": "<string>",
"duration_seconds": 123,
"from": "<string>",
"to": "<string>",
"agent": {
"id": "<string>",
"name": "<string>"
},
"purpose": "<string>",
"contact": {
"id": "<string>",
"name": "<string>",
"company": "<string>",
"email": "<string>"
},
"variables": {},
"metadata": {},
"cost_yen": 123,
"failure_reason": "<string>",
"hangup_cause": "<string>",
"transfer": {
"status": "<string>",
"target_name": "<string>"
},
"do_not_call_requested": true,
"placed_via": "<string>",
"transcript": [
{
"role": "ai",
"text": "<string>",
"at": "2023-11-07T05:31:56Z"
}
]
}{
"error": {
"code": "do_not_call",
"message": "この番号は架電しない設定です。"
}
}{
"error": {
"code": "do_not_call",
"message": "この番号は架電しない設定です。"
}
}{
"error": {
"code": "do_not_call",
"message": "この番号は架電しない設定です。"
}
}{
"error": {
"code": "do_not_call",
"message": "この番号は架電しない設定です。"
}
}通話
通話を取得する
1件の通話の状況・結果・料金・文字起こしを返します。
GET
/
calls
/
{id}
通話を取得する
curl --request GET \
--url https://api.ai-call.co/calls/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ai-call.co/calls/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ai-call.co/calls/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ai-call.co/calls/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ai-call.co/calls/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ai-call.co/calls/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ai-call.co/calls/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"direction": "inbound",
"status": "<string>",
"result": "<string>",
"duration_seconds": 123,
"from": "<string>",
"to": "<string>",
"agent": {
"id": "<string>",
"name": "<string>"
},
"purpose": "<string>",
"contact": {
"id": "<string>",
"name": "<string>",
"company": "<string>",
"email": "<string>"
},
"variables": {},
"metadata": {},
"cost_yen": 123,
"failure_reason": "<string>",
"hangup_cause": "<string>",
"transfer": {
"status": "<string>",
"target_name": "<string>"
},
"do_not_call_requested": true,
"placed_via": "<string>",
"transcript": [
{
"role": "ai",
"text": "<string>",
"at": "2023-11-07T05:31:56Z"
}
]
}{
"error": {
"code": "do_not_call",
"message": "この番号は架電しない設定です。"
}
}{
"error": {
"code": "do_not_call",
"message": "この番号は架電しない設定です。"
}
}{
"error": {
"code": "do_not_call",
"message": "この番号は架電しない設定です。"
}
}{
"error": {
"code": "do_not_call",
"message": "この番号は架電しない設定です。"
}
}Authorizations
管理画面「設定 → API」で作成したAPIキー(aic_sk_…)。
Path Parameters
通話のID
Query Parameters
false で文字起こしを省く
Response
通話
Available options:
inbound, outbound, null queued dialing initiated answered active ended failed canceled
calling connected completed no_answer busy rejected canceled invalid_number failed timeout voicemail unknown(未確定は null)
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
請求額(税抜)。精算前は null
Show child attributes
Show child attributes
相手から今後の電話を断られた
api など
Show child attributes
Show child attributes