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
The unique identifier of the voice agent.
Request headers
Bearer token for authentication. Format:
Bearer talq_your_environment_token_hereMust be set to
application/jsonRequest body
Action node ID for workflow integration
Action name (max 255 characters)
What the action does
Action type. Options:
webhook, transfer, hold, external.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 agentpost_call— webhook runs after the call ends (only valid forexternalaction 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
Response
Success Response (200 OK)
Response fields
Indicates if the operation was successful.
Success message confirming the action was created or updated.
The created or updated action object.
Error responses
Validation Error (422)
404 Not Found
401 Unauthorized
403 Forbidden
500 Server Error
Error codes
| Code | Description | HTTP Status |
|---|---|---|
AGENT_NOT_FOUND | Specified agent does not exist | 404 |
INVALID_TOKEN | Authentication token is invalid or missing | 401 |
UNAUTHORIZED | User does not have permission to create actions for this agent | 403 |
VALIDATION_ERROR | Request data validation failed | 422 |
SERVER_ERROR | Internal 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.
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