Actions
Create/Update Action
Create new actions or update existing actions for a voice agent
POST
Create/Update Action
Create new actions or update existing actions for a voice agent. Configures webhooks, call transfers, holds, and other actions that the agent can perform during conversations.Endpoint
Path parameters
string
required
The unique identifier of the voice agent.
Request headers
string
required
Bearer token for authentication. Format:
Bearer talq_your_environment_token_herestring
required
Must be set to
application/jsonRequest body
string
required
Action node ID for workflow integration
string
required
Action name (max 255 characters)
string
required
What the action does
string
required
Action type. Options:
webhook, transfer, hold, external.array
Array of input parameters for the action
object
Integration configuration object
string
Webhook URL (must be a valid URL — used by
webhook actions).string
Authorization URL (must be a valid URL — used by
webhook actions when the target requires a separate authorization endpoint).string
Authorization scheme used when calling
url. Options: none, bearer, basic, api_key, custom. Default: none.array
Array of custom HTTP headers to send with the webhook request. Each item is
{ "key": "Header-Name", "value": "header-value" }.string
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.string
Phrase the agent will say after the webhook responds successfully. The webhook response can be referenced via template variables.
string
Defines when the action runs. Options:
during_call(default) — webhook runs during the conversation, response is consumed by the agentpost_call— webhook runs after the call ends (only valid forexternalaction type)
integer
Hold duration in seconds (for
hold actions).string
Transfer destination phone number in E.164 format (for
transfer actions).string
Action status. Options:
active, inactive. Default: active.Example requests
Response
Success Response (200 OK)
Response fields
boolean
required
Indicates if the operation was successful.
string
required
Success message confirming the action was created or updated.
object
required
The created or updated action object.
Error responses
Validation Error (422)
404 Not Found
401 Unauthorized
403 Forbidden
500 Server Error
Error codes
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.
Related endpoints
- 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