Get Agent
curl --request GET \
--url https://api.contactship.ai/v1/agents/{agentId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.contactship.ai/v1/agents/{agentId}"
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/{agentId}', 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/{agentId}",
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/{agentId}"
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/{agentId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contactship.ai/v1/agents/{agentId}")
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": 123,
"data.id": "<string>",
"data.name": "<string>",
"data.person_name": "<string>",
"data.prompt": "<string>",
"data.conversation_purpose": "<string>",
"data.voice_id": "<string>",
"data.language": "<string>",
"data.timezone": "<string>",
"data.tools": [
{}
],
"data.post_call_analysis_data": [
{}
],
"data.webhook_url": "<string>",
"data.created_at": "<string>",
"data.updated_at": "<string>"
}Agentes
Get Agent
Retrieve a voice agent’s published configuration.
GET
/
v1
/
agents
/
{agentId}
Get Agent
curl --request GET \
--url https://api.contactship.ai/v1/agents/{agentId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.contactship.ai/v1/agents/{agentId}"
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/{agentId}', 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/{agentId}",
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/{agentId}"
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/{agentId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contactship.ai/v1/agents/{agentId}")
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": 123,
"data.id": "<string>",
"data.name": "<string>",
"data.person_name": "<string>",
"data.prompt": "<string>",
"data.conversation_purpose": "<string>",
"data.voice_id": "<string>",
"data.language": "<string>",
"data.timezone": "<string>",
"data.tools": [
{}
],
"data.post_call_analysis_data": [
{}
],
"data.webhook_url": "<string>",
"data.created_at": "<string>",
"data.updated_at": "<string>"
}Retrieve a voice agent’s published configuration.
The response also includes configured voice/conversation values such as volume, voice_speed, voice_temperature, responsiveness, interruption_sensitivity, ambient_sound, ambient_sound_volume, begin_message, begin_message_delay_ms, max_call_duration_ms, start_speaker, and boosted_keywords.
Authentication
string
requerido
Organization API key. Keep it on your server or in a credential store.
Path
string
requerido
Agent ID from the organization’s agent list.
Example
curl 'https://api.contactship.ai/v1/agents/AGENT_ID' -H 'x-api-key: YOUR_API_KEY'
Response
number
HTTP response status.
string
ContactShip agent ID, used in agent and call endpoints.
string
Internal name.
string
In-call name.
string
Instructions.
string
Conversation objective.
string
Voice ID.
string
Configured language code.
string
IANA time zone.
object[]
Configured tool definitions.
object[]
Extraction fields.
string
Outgoing call webhook URL.
string
Creation timestamp.
string
Update timestamp.
