Documentation Index Fetch the complete documentation index at: https://docs.talkover.ai/llms.txt
Use this file to discover all available pages before exploring further.
Create/Update Action
Create new actions or update existing actions for a voice agent. This endpoint allows you to configure webhooks, call transfers, holds, and other actions that the agent can perform during conversations.
Endpoint
POST /api/v1/agents/{agent_id}/actions
Path Parameters
The unique identifier of the voice agent. You can find this in your dashboard under Voice Agents.
Bearer token for authentication. Format: Bearer talq_your_environment_token_here
Must be set to application/json
Request Body
Action node ID for workflow integration
Action name (max 255 characters)
Detailed description of what the action does
Action type. Options: webhook, transfer, hold, etc.
Array of input parameters for the action
Integration configuration object
Webhook URL (must be a valid URL — used by webhook actions).
Authorization URL (must be a valid URL — used by webhook actions when the target requires a separate authorization endpoint).
Authorization scheme used when calling url. Options: none, bearer, basic, api_key, custom. Default: none.
Array of custom HTTP headers to send with the webhook request. Each item is { "key": "Header-Name", "value": "header-value" }.
Phrase the agent will say when the webhook is triggered (before the call to url). Useful to keep the conversation natural while the integration runs.
Phrase the agent will say after the webhook responds successfully. The webhook response can be referenced via template variables.
Defines when the action runs. Options:
during_call (default) — webhook runs during the conversation, response is consumed by the agent
post_call — webhook runs after the call ends (only valid for external action type)
Hold duration in seconds (for hold actions).
Transfer destination phone number in E.164 format (for transfer actions).
Action status. Options: active, inactive. Default: active.
Example Requests
# Request 1: Create webhook action
curl -X POST "https://app.talkover.ai/api/v1/agents/550e8400-e29b-41d4-a716-446655440000/actions" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{
"node_id": "action-node-456",
"name": "Schedule Meeting",
"description": "Schedule a meeting with the customer",
"type": "webhook",
"inputs": [
{
"name": "date",
"type": "string",
"required": true,
"description": "Meeting date"
},
{
"name": "time",
"type": "string",
"required": true,
"description": "Meeting time"
}
],
"integration": {
"id": "integration-uuid"
},
"url": "https://api.example.com/schedule",
"authorization_url": "https://api.example.com/auth",
"current_status": "active"
}'
# Request 2: Create transfer action
curl -X POST "https://app.talkover.ai/api/v1/agents/550e8400-e29b-41d4-a716-446655440000/actions" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{
"node_id": "action-node-789",
"name": "Transfer Call",
"description": "Transfer the call to a human agent",
"type": "transfer",
"inputs": [
{
"name": "transfer_to",
"type": "string",
"required": true,
"description": "Transfer to",
"value": "+1234567890"
}
],
"transfer_to": "+1234567890",
"current_status": "active"
}'
# Request 3: Create hold action
curl -X POST "https://app.talkover.ai/api/v1/agents/550e8400-e29b-41d4-a716-446655440000/actions" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{
"node_id": "action-node-101",
"name": "Put Call on Hold",
"description": "Put the current call on hold for a specified duration",
"type": "hold",
"inputs": [
{
"name": "hold_duration",
"type": "integer",
"required": true,
"description": "Hold duration in seconds",
"value": 30
}
],
"hold_duration": 30,
"current_status": "active"
}'
Response
Success Response (200 OK)
{
"success" : true ,
"message" : "Agent action updated successfully" ,
"data" : {
"id" : "action-uuid-1" ,
"name" : "Schedule Meeting" ,
"label" : "Schedule Meeting" ,
"description" : "Schedule a meeting with the customer" ,
"type" : "webhook" ,
"input_schema" : [
{
"name" : "date" ,
"type" : "string" ,
"required" : true ,
"description" : "Meeting date"
},
{
"name" : "time" ,
"type" : "string" ,
"required" : true ,
"description" : "Meeting time"
}
],
"config" : null ,
"action_trigger" : null ,
"url" : "https://api.example.com/schedule" ,
"authorization_url" : "https://api.example.com/auth" ,
"current_status" : "active" ,
"created_at" : "2024-01-15T10:30:00Z" ,
"updated_at" : "2024-01-15T12:30:00Z"
}
}
Response Fields
Indicates if the operation was successful.
Success message confirming the action was created or updated.
The created or updated action object. Unique identifier for the action.
Display label for the action.
Detailed description of what the action does.
Type of action. Options: webhook, transfer, hold, etc.
Array of input parameters required for the action.
Configuration object for the action (if applicable).
Trigger conditions for the action (if applicable).
Webhook URL for webhook-type actions.
Authorization URL for webhook-type actions.
Current status of the action. Options: active, inactive.
ISO 8601 timestamp when the action was created.
ISO 8601 timestamp when the action was last updated.
Error Responses
Validation Error (422)
{
"success" : false ,
"message" : "The given data was invalid." ,
"errors" : {
"name" : [
"The name field is required."
],
"type" : [
"The selected type is invalid."
],
"url" : [
"The url must be a valid URL."
],
"authorization_url" : [
"The authorization url must be a valid URL."
]
}
}
404 Not Found
{
"success" : false ,
"message" : "Agent not found"
}
401 Unauthorized
{
"success" : false ,
"message" : "Unauthenticated."
}
403 Forbidden
{
"success" : false ,
"message" : "You are not authorized to create actions for this agent."
}
500 Server Error
{
"success" : false ,
"message" : "Internal server error."
}
Error Codes
Code Description HTTP Status AGENT_NOT_FOUNDSpecified agent does not exist 404 INVALID_TOKENAuthentication token is invalid or missing 401 UNAUTHORIZEDUser does not have permission to create actions for this agent 403 VALIDATION_ERRORRequest data validation failed 422 SERVER_ERRORInternal server error occurred 500
Important Notes
Agent status will be set to draft. After creating or updating actions, the agent will be automatically set to “draft” status and will need to be published again to become active.
Action types have different requirements. Different action types (webhook, transfer, hold) require different parameters and configurations.
URL validation. For webhook actions, both url and authorization_url must be valid URLs.
Best Practices
Test webhook URLs - Always test webhook URLs before creating actions
Use descriptive names - Give actions clear, descriptive names
Validate inputs - Ensure all required input parameters are properly defined
Handle errors gracefully - Implement proper error handling for action execution
Monitor action performance - Track how often actions are triggered and their success rates
Document action behavior - Provide clear descriptions of what each action does
List Actions : GET /api/v1/agents/{agent_id}/actions
Delete Action : DELETE /api/v1/agents/{agent_id}/actions/{action_id}
Get Agent : GET /api/v1/agents/{agent_id}
Publish Agent : POST /api/v1/agents/{agent_id}/publish