Agents
Update Agent
Update an existing agent’s configuration
PUT
/
v1
/
agents
/
{agentId}
curl --request PUT \
--url https://api.contactship.ai/v1/agents/{agentId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{
"name": "<string>",
"person_name": "<string>",
"voice_id": "<string>",
"language": "<string>",
"ambient_sound": "coffee-shop",
"interruption_sensitivity": 123,
"webhook_url": "<string>",
"conversation_purpose": "<string>",
"prompt": "<string>",
"voice_speed": 123,
"voice_temperature": 123,
"volume": 123,
"post_call_analysis_data": [
{}
],
"tools": [
{}
]
}'
{
"statusCode": 200,
"data": {
"id": "337a9eeb-3e16-4cc5-94ec-25fa159eb57a",
"name": "Technical Support Specialist",
"person_name": "Emily Parker",
"language": "en-US",
"webhook_url": "https://webhook.example.com/support-notifications",
"conversation_purpose": "Provide technical support and troubleshooting assistance to customers",
"prompt": "You are Emily Parker, an experienced technical support specialist. Your role is to help customers resolve technical issues efficiently and professionally.\n\nGuidelines:\n- Start by understanding the customer's issue clearly\n- Provide step-by-step solutions in a clear, natural way\n- Use simple language, avoiding technical jargon unless necessary\n- Create support tickets for complex issues\n- Follow up to ensure the solution worked\n\nMaintain a patient and helpful tone throughout the conversation.",
"volume": 1.1,
"voice_id": "custom_voice_emily_tech",
"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 technical issue was resolved"
},
{
"name": "resolution_time",
"type": "number",
"description": "Time taken to resolve the issue (minutes)"
},
{
"name": "ticket_created",
"type": "boolean",
"description": "Whether a support ticket was created"
},
{
"name": "customer_satisfaction",
"type": "number",
"description": "Customer satisfaction score (1-10)"
}
],
"tools": [
{
"name": "create_ticket",
"type": "function",
"description": "Create a support ticket for unresolved issues"
},
{
"name": "search_knowledge_base",
"type": "function",
"description": "Search technical documentation for solutions",
"parameters": {
"type": "object",
"required": [
"query"
],
"properties": {
"query": {
"type": "string",
"description": "Search query for technical documentation"
}
}
}
},
{
"name": "schedule_followup",
"type": "function",
"description": "Schedule a follow-up call for complex issues"
}
],
"created_at": "2024-01-15T10:30:00.000Z",
"updated_at": "2024-03-20T15:45:00.000Z"
}
}
Headers
API key for authentication
Path Parameters
The ID of the agent to update
Body
application/json
Update agent configuration
The body is of type object
.
Response
200
application/json
Agent updated successfully
The response is of type object
.
curl --request PUT \
--url https://api.contactship.ai/v1/agents/{agentId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{
"name": "<string>",
"person_name": "<string>",
"voice_id": "<string>",
"language": "<string>",
"ambient_sound": "coffee-shop",
"interruption_sensitivity": 123,
"webhook_url": "<string>",
"conversation_purpose": "<string>",
"prompt": "<string>",
"voice_speed": 123,
"voice_temperature": 123,
"volume": 123,
"post_call_analysis_data": [
{}
],
"tools": [
{}
]
}'
{
"statusCode": 200,
"data": {
"id": "337a9eeb-3e16-4cc5-94ec-25fa159eb57a",
"name": "Technical Support Specialist",
"person_name": "Emily Parker",
"language": "en-US",
"webhook_url": "https://webhook.example.com/support-notifications",
"conversation_purpose": "Provide technical support and troubleshooting assistance to customers",
"prompt": "You are Emily Parker, an experienced technical support specialist. Your role is to help customers resolve technical issues efficiently and professionally.\n\nGuidelines:\n- Start by understanding the customer's issue clearly\n- Provide step-by-step solutions in a clear, natural way\n- Use simple language, avoiding technical jargon unless necessary\n- Create support tickets for complex issues\n- Follow up to ensure the solution worked\n\nMaintain a patient and helpful tone throughout the conversation.",
"volume": 1.1,
"voice_id": "custom_voice_emily_tech",
"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 technical issue was resolved"
},
{
"name": "resolution_time",
"type": "number",
"description": "Time taken to resolve the issue (minutes)"
},
{
"name": "ticket_created",
"type": "boolean",
"description": "Whether a support ticket was created"
},
{
"name": "customer_satisfaction",
"type": "number",
"description": "Customer satisfaction score (1-10)"
}
],
"tools": [
{
"name": "create_ticket",
"type": "function",
"description": "Create a support ticket for unresolved issues"
},
{
"name": "search_knowledge_base",
"type": "function",
"description": "Search technical documentation for solutions",
"parameters": {
"type": "object",
"required": [
"query"
],
"properties": {
"query": {
"type": "string",
"description": "Search query for technical documentation"
}
}
}
},
{
"name": "schedule_followup",
"type": "function",
"description": "Schedule a follow-up call for complex issues"
}
],
"created_at": "2024-01-15T10:30:00.000Z",
"updated_at": "2024-03-20T15:45:00.000Z"
}
}
Assistant
Responses are generated using AI and may contain mistakes.