cURL
curl --request GET \
--url https://api.contactship.ai/v1/agents \
--header 'x-api-key: <api-key>'import requests
url = "https://api.contactship.ai/v1/agents"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.contactship.ai/v1/agents', 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.contactship.ai/v1/agents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <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.contactship.ai/v1/agents"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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.contactship.ai/v1/agents")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contactship.ai/v1/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"data": [
{
"id": "337a9eeb-3e16-4cc5-94ec-25fa159eb57a",
"name": "Sales Representative Agent",
"person_name": "Sarah Johnson",
"language": "en-US",
"webhook_url": "https://webhook.example.com/sales-notifications",
"conversation_purpose": "Qualify leads and schedule product demos",
"prompt": "You are Sarah, a professional sales representative. Your goal is to understand potential customers' needs and schedule product demonstrations when appropriate.",
"volume": 1.2,
"voice_id": "custom_voice_sarah_123",
"interruption_sensitivity": 0.8,
"ambient_sound": "call-center",
"voice_speed": 1.1,
"voice_temperature": 0.9,
"post_call_analysis_data": [
{
"name": "lead_score",
"type": "number",
"description": "Lead qualification score (1-100)"
},
{
"name": "demo_scheduled",
"type": "boolean",
"description": "Whether a product demo was scheduled"
}
],
"tools": [
{
"name": "schedule_demo",
"type": "function",
"description": "Schedule a product demonstration"
}
],
"created_at": "2024-01-15T10:30:00.000Z",
"updated_at": "2024-01-15T15:45:00.000Z"
},
{
"id": "b39d48c2-7340-446d-b08f-0e3204bc7cb4",
"name": "Customer Support Agent",
"person_name": "Michael Chen",
"language": "multi",
"webhook_url": "https://webhook.example.com/support-tickets",
"conversation_purpose": "Provide technical support and resolve customer issues",
"prompt": "You are Michael, a technical support specialist. Help customers resolve their issues efficiently and create support tickets when necessary.",
"volume": 1,
"voice_id": "custom_voice_michael_456",
"interruption_sensitivity": 0.7,
"ambient_sound": "call-center",
"voice_speed": 1,
"voice_temperature": 0.8,
"post_call_analysis_data": [
{
"name": "issue_resolved",
"type": "boolean",
"description": "Whether the customer's issue was resolved"
},
{
"name": "satisfaction_score",
"type": "number",
"description": "Customer satisfaction rating (1-10)"
}
],
"tools": [
{
"name": "create_ticket",
"type": "function",
"description": "Create a support ticket"
},
{
"name": "search_knowledge_base",
"type": "function",
"description": "Search technical documentation"
}
],
"created_at": "2024-02-20T08:15:00.000Z",
"updated_at": "2024-02-20T14:30:00.000Z"
},
{
"id": "209ed663-0dcf-41ba-aac8-9450303de1e2",
"name": "Appointment Scheduler",
"person_name": "Emma Wilson",
"language": "en-GB",
"webhook_url": "https://webhook.example.com/appointments",
"conversation_purpose": "Schedule and manage medical appointments",
"prompt": "You are Emma, a medical office coordinator. Help patients schedule, reschedule, or cancel their appointments efficiently.",
"volume": 0.9,
"voice_id": "custom_voice_emma_789",
"interruption_sensitivity": 0.6,
"ambient_sound": "convention-hall",
"voice_speed": 0.95,
"voice_temperature": 0.7,
"post_call_analysis_data": [
{
"name": "appointment_scheduled",
"type": "boolean",
"description": "Whether an appointment was scheduled"
},
{
"name": "preferred_time_available",
"type": "boolean",
"description": "Whether patient's preferred time slot was available"
}
],
"tools": [
{
"name": "check_availability",
"type": "function",
"description": "Check calendar availability"
},
{
"name": "schedule_appointment",
"type": "function",
"description": "Schedule a new appointment"
}
],
"created_at": "2024-03-10T09:45:00.000Z",
"updated_at": "2024-03-10T16:20:00.000Z"
}
]
}{
"error": 123,
"message": "<string>"
}Agentes
List Agents
Returns all agents from the system that the user has access to
GET
/
v1
/
agents
cURL
curl --request GET \
--url https://api.contactship.ai/v1/agents \
--header 'x-api-key: <api-key>'import requests
url = "https://api.contactship.ai/v1/agents"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.contactship.ai/v1/agents', 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.contactship.ai/v1/agents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <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.contactship.ai/v1/agents"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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.contactship.ai/v1/agents")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contactship.ai/v1/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"data": [
{
"id": "337a9eeb-3e16-4cc5-94ec-25fa159eb57a",
"name": "Sales Representative Agent",
"person_name": "Sarah Johnson",
"language": "en-US",
"webhook_url": "https://webhook.example.com/sales-notifications",
"conversation_purpose": "Qualify leads and schedule product demos",
"prompt": "You are Sarah, a professional sales representative. Your goal is to understand potential customers' needs and schedule product demonstrations when appropriate.",
"volume": 1.2,
"voice_id": "custom_voice_sarah_123",
"interruption_sensitivity": 0.8,
"ambient_sound": "call-center",
"voice_speed": 1.1,
"voice_temperature": 0.9,
"post_call_analysis_data": [
{
"name": "lead_score",
"type": "number",
"description": "Lead qualification score (1-100)"
},
{
"name": "demo_scheduled",
"type": "boolean",
"description": "Whether a product demo was scheduled"
}
],
"tools": [
{
"name": "schedule_demo",
"type": "function",
"description": "Schedule a product demonstration"
}
],
"created_at": "2024-01-15T10:30:00.000Z",
"updated_at": "2024-01-15T15:45:00.000Z"
},
{
"id": "b39d48c2-7340-446d-b08f-0e3204bc7cb4",
"name": "Customer Support Agent",
"person_name": "Michael Chen",
"language": "multi",
"webhook_url": "https://webhook.example.com/support-tickets",
"conversation_purpose": "Provide technical support and resolve customer issues",
"prompt": "You are Michael, a technical support specialist. Help customers resolve their issues efficiently and create support tickets when necessary.",
"volume": 1,
"voice_id": "custom_voice_michael_456",
"interruption_sensitivity": 0.7,
"ambient_sound": "call-center",
"voice_speed": 1,
"voice_temperature": 0.8,
"post_call_analysis_data": [
{
"name": "issue_resolved",
"type": "boolean",
"description": "Whether the customer's issue was resolved"
},
{
"name": "satisfaction_score",
"type": "number",
"description": "Customer satisfaction rating (1-10)"
}
],
"tools": [
{
"name": "create_ticket",
"type": "function",
"description": "Create a support ticket"
},
{
"name": "search_knowledge_base",
"type": "function",
"description": "Search technical documentation"
}
],
"created_at": "2024-02-20T08:15:00.000Z",
"updated_at": "2024-02-20T14:30:00.000Z"
},
{
"id": "209ed663-0dcf-41ba-aac8-9450303de1e2",
"name": "Appointment Scheduler",
"person_name": "Emma Wilson",
"language": "en-GB",
"webhook_url": "https://webhook.example.com/appointments",
"conversation_purpose": "Schedule and manage medical appointments",
"prompt": "You are Emma, a medical office coordinator. Help patients schedule, reschedule, or cancel their appointments efficiently.",
"volume": 0.9,
"voice_id": "custom_voice_emma_789",
"interruption_sensitivity": 0.6,
"ambient_sound": "convention-hall",
"voice_speed": 0.95,
"voice_temperature": 0.7,
"post_call_analysis_data": [
{
"name": "appointment_scheduled",
"type": "boolean",
"description": "Whether an appointment was scheduled"
},
{
"name": "preferred_time_available",
"type": "boolean",
"description": "Whether patient's preferred time slot was available"
}
],
"tools": [
{
"name": "check_availability",
"type": "function",
"description": "Check calendar availability"
},
{
"name": "schedule_appointment",
"type": "function",
"description": "Schedule a new appointment"
}
],
"created_at": "2024-03-10T09:45:00.000Z",
"updated_at": "2024-03-10T16:20:00.000Z"
}
]
}{
"error": 123,
"message": "<string>"
}⌘I
