curl --request GET \
--url https://api.sandbox.asapp.com/generativeagent/v1/call-transfers/{callTransferId} \
--header 'asapp-api-id: <api-key>' \
--header 'asapp-api-secret: <api-key>'import requests
url = "https://api.sandbox.asapp.com/generativeagent/v1/call-transfers/{callTransferId}"
headers = {
"asapp-api-id": "<api-key>",
"asapp-api-secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'asapp-api-id': '<api-key>', 'asapp-api-secret': '<api-key>'}
};
fetch('https://api.sandbox.asapp.com/generativeagent/v1/call-transfers/{callTransferId}', 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.sandbox.asapp.com/generativeagent/v1/call-transfers/{callTransferId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"asapp-api-id: <api-key>",
"asapp-api-secret: <api-key>"
],
]);
$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.sandbox.asapp.com/generativeagent/v1/call-transfers/{callTransferId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("asapp-api-id", "<api-key>")
req.Header.Add("asapp-api-secret", "<api-key>")
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.sandbox.asapp.com/generativeagent/v1/call-transfers/{callTransferId}")
.header("asapp-api-id", "<api-key>")
.header("asapp-api-secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.asapp.com/generativeagent/v1/call-transfers/{callTransferId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["asapp-api-id"] = '<api-key>'
request["asapp-api-secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "0867617078-0032318833-2221801472-0002236962",
"externalConversationId": "0867617078-0032318833-2221801472-0002236962",
"status": "completed",
"createdAt": "2024-06-01T12:34:56Z",
"callReceivedAt": "2024-06-01T12:35:00Z",
"completedAt": "2024-06-01T12:38:56Z",
"inputContext": {
"taskName": "Welcome",
"inputVariables": {
"email": "example@gmail.com",
"name": "name"
}
},
"outputContext": {
"transferType": "SYSTEM",
"currentTaskName": "Welcome",
"referenceVariables": {
"reference_variable_1": "reference_value_1",
"reference_variable_2": "reference_value_2"
},
"transferVariables": {
"transfer_variable_1": "transfer_value_1",
"transfer_variable_2": "transfer_value_2"
}
},
"type": "PHONE_NUMBER",
"phoneNumber": {
"transferNumber": "+19995550199",
"country": "US",
"expiresAt": "2024-06-01T12:35:56Z"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "400-01",
"message": "Bad request"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "401-01",
"message": "Unauthorized"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "403-01",
"message": "Forbidden Response"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "404-01",
"message": "Not Found"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "409-01",
"message": "Conflict"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "413-01",
"message": "Request Entity Too Large"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "422-01",
"message": "Unprocessable Entity"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "429-01",
"message": "Too Many Requests"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "503-01",
"message": "Service Unavailable"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "500-01",
"message": "Internal server error"
}
}Get Call Transfer
Get Call Transfer resource by ID.
curl --request GET \
--url https://api.sandbox.asapp.com/generativeagent/v1/call-transfers/{callTransferId} \
--header 'asapp-api-id: <api-key>' \
--header 'asapp-api-secret: <api-key>'import requests
url = "https://api.sandbox.asapp.com/generativeagent/v1/call-transfers/{callTransferId}"
headers = {
"asapp-api-id": "<api-key>",
"asapp-api-secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'asapp-api-id': '<api-key>', 'asapp-api-secret': '<api-key>'}
};
fetch('https://api.sandbox.asapp.com/generativeagent/v1/call-transfers/{callTransferId}', 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.sandbox.asapp.com/generativeagent/v1/call-transfers/{callTransferId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"asapp-api-id: <api-key>",
"asapp-api-secret: <api-key>"
],
]);
$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.sandbox.asapp.com/generativeagent/v1/call-transfers/{callTransferId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("asapp-api-id", "<api-key>")
req.Header.Add("asapp-api-secret", "<api-key>")
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.sandbox.asapp.com/generativeagent/v1/call-transfers/{callTransferId}")
.header("asapp-api-id", "<api-key>")
.header("asapp-api-secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.asapp.com/generativeagent/v1/call-transfers/{callTransferId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["asapp-api-id"] = '<api-key>'
request["asapp-api-secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "0867617078-0032318833-2221801472-0002236962",
"externalConversationId": "0867617078-0032318833-2221801472-0002236962",
"status": "completed",
"createdAt": "2024-06-01T12:34:56Z",
"callReceivedAt": "2024-06-01T12:35:00Z",
"completedAt": "2024-06-01T12:38:56Z",
"inputContext": {
"taskName": "Welcome",
"inputVariables": {
"email": "example@gmail.com",
"name": "name"
}
},
"outputContext": {
"transferType": "SYSTEM",
"currentTaskName": "Welcome",
"referenceVariables": {
"reference_variable_1": "reference_value_1",
"reference_variable_2": "reference_value_2"
},
"transferVariables": {
"transfer_variable_1": "transfer_value_1",
"transfer_variable_2": "transfer_value_2"
}
},
"type": "PHONE_NUMBER",
"phoneNumber": {
"transferNumber": "+19995550199",
"country": "US",
"expiresAt": "2024-06-01T12:35:56Z"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "400-01",
"message": "Bad request"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "401-01",
"message": "Unauthorized"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "403-01",
"message": "Forbidden Response"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "404-01",
"message": "Not Found"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "409-01",
"message": "Conflict"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "413-01",
"message": "Request Entity Too Large"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "422-01",
"message": "Unprocessable Entity"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "429-01",
"message": "Too Many Requests"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "503-01",
"message": "Service Unavailable"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "500-01",
"message": "Internal server error"
}
}Path Parameters
The identifier for the call transfer.
Response
Successful response
Get Call Transfer Response
The unique identifier for this call transfer request.
"0867617078-0032318833-2221801472-0002236962"
The unique identifier of the call in your call system. This will be referenced in ASAPP reporting.
"0867617078-0032318833-2221801472-0002236962"
The current status of the call transfer request.
ACTIVE: The call transfer request has been created and is waiting for your system to transfer the call.ONGOING: The call transfer has been received by ASAPP and is currently in progress. The phone number is no longer assigned to the call transfer request.COMPLETED: The call transfer has been successfully completed. The output context will be returned.EXPIRED: The call transfer request is no longer valid (e.g., the phone number expired).
ACTIVE, ONGOING, COMPLETED, EXPIRED Timestamp (ISO 8601) when the call transfer resource was created.
"2024-06-01T12:34:56Z"
The type of call transfer method that was used.
PHONE_NUMBER, SIP Timestamp (ISO 8601) when the call transfer was received by ASAPP.
"2024-06-01T12:34:56Z"
Timestamp (ISO 8601) when the call transfer was completed by the Generative Agent.
"2024-06-01T12:34:56Z"
The context information that was passed to the Generative Agent when the call was received.
Show child attributes
Show child attributes
{
"taskName": "welcome",
"variables": {
"email": "example@gmail.com",
"name": "name"
}
}
The context information from the Generative Agent when the call ended.
Show child attributes
Show child attributes
{
"currentTaskName": "welcome",
"referenceVariables": {
"reference_variable_1": "reference_value_1",
"reference_variable_2": "reference_value_2"
},
"transferVariables": {
"transfer_variable_1": "transfer_value_1",
"transfer_variable_2": "transfer_value_2"
}
}
Details about the assigned phone number for the transfer, including the number to dial and when it expires. Only available if type is PHONE_NUMBER.
Show child attributes
Show child attributes
Configuration for SIP transfers. Defines how the call will be transferred back when the Generative Agent finishes the conversation.
Transfer Types:
BYE: Ends the call with a SIP BYE message. Use for supervised transfers to Generative Agent. Default value if returnTransferType is not provided.REFER: Sends a SIP REFER message with the return URI in the Refer-To header. Use for blind transfers to another system.INVITE: Initiates a new SIP INVITE to the return URI, ASAPP will continue to transcribe the call until the call is ended.
Show child attributes
Show child attributes
{
"returnTransferType": "REFER",
"returnUri": "sip:transfer@your-company.com:5060"
}
Was this page helpful?