/api/Actions manages the action itself, /api/TopicActions links actions to topics, and /api/HookActions links actions to workflow events.Authorization: Bearer <token> for protected endpoints. /api/Actions create, update, list and delete operations require the ManageSettings policy. GET /api/Actions/available accepts ticket access or phone-auth context. Topic and hook action endpoints require an authenticated user.Use these endpoints to manage the reusable action records for the authenticated customer.
| Method | Path | Policy | Purpose |
|---|---|---|---|
GET | /api/Actions | ManageSettings | Return a paginated list of action definitions. |
POST | /api/Actions | ManageSettings | Create a new action definition. |
GET | /api/Actions/available | TicketAccessOrPhoneAuth | Return active actions available in ticket or phone-auth contexts. |
GET | /api/Actions/{id} | ManageSettings | Return one action definition. |
PUT | /api/Actions/{id} | ManageSettings | Update an action definition. The body actionID must match the route id. |
DELETE | /api/Actions/{id} | ManageSettings | Delete an action definition. |
Returns a paginated PaginatedResult<ActionReadDTO> for the authenticated customer.
Query parameters: pageNumber default 1, pageSize default 10, sortBy default Name, sortOrder default asc.
GET /api/Actions?pageNumber=1&pageSize=10&sortBy=Name&sortOrder=asc
Authorization: Bearer <token>
Returns ActionAvailableDTO records for actions that can be used from ticket or phone-auth flows.
GET /api/Actions/available
Authorization: Bearer <token>
[
{
"actionID": 14,
"customerID": 8,
"name": "Send reply",
"description": "Generate and send an answer",
"actionType": "ReplySend",
"isActive": true
}
] Creates a new ActionCreateDTO. name is required; other fields depend on the selected actionType.
POST /api/Actions
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "Call CRM",
"description": "Update the customer record",
"actionType": "ApiCall",
"apiEndpoint": "/customers/{{endUser.customerNumber}}",
"apiMethod": "PUT",
"apiHeaders": "{\"Content-Type\":\"application/json\"}",
"apiBodyTemplate": "{\"status\":\"{{ticket.status}}\"}",
"overrideApiAuthenticationType": "Bearer",
"isActive": true,
"isFunctionTool": false,
"toolCallTimeoutSeconds": 30
}
Updates an ActionUpdateDTO. The body actionID must match the route id.
PUT /api/Actions/14
Authorization: Bearer <token>
Content-Type: application/json
{
"actionID": 14,
"name": "Call CRM",
"description": "Update the customer record",
"actionType": "ApiCall",
"apiMethod": "PUT",
"isActive": true
}
A successful update returns 204 No Content.
Returns one ActionReadDTO, including actionID, customerID and any related customFieldDefinitions.
GET /api/Actions/14
Authorization: Bearer <token>
Deletes the action definition for the current customer.
DELETE /api/Actions/14
Authorization: Bearer <token>
A successful delete returns 204 No Content; an unknown id returns 404 Not Found.
TopicActions link an action to a topic, channel or special topic context. This is where execution priority is stored.
| Method | Path | Purpose |
|---|---|---|
GET | /api/TopicActions | List links. Filters include topicId, actionId, hookName, channelId, isActive, pagination and sorting. |
POST | /api/TopicActions | Create one topic-action link. |
POST | /api/TopicActions/bulk | Create multiple links. |
GET | /api/TopicActions/{id} | Read one link. |
PUT | /api/TopicActions/{id} | Update the priority only. |
DELETE | /api/TopicActions/{id} | Delete one link. |
{
"topicID": 21,
"specialTopic": null,
"documentID": 0,
"channelID": 3,
"specialChannel": null,
"actionID": 14,
"priority": 100
} HookActions link actions to workflow events such as spam checks, topic detection, escalation, close events and phone pickup flows.
| Method | Path | Purpose |
|---|---|---|
GET | /api/HookActions | List hook actions. At least hookName or actionId is required. |
POST | /api/HookActions | Create one hook-action link. |
POST | /api/HookActions/bulk | Create multiple hook-action links. |
GET | /api/HookActions/wait-seconds | Return the total active wait time for a channel and hook. |
GET | /api/HookActions/{id} | Read one hook-action link. |
PUT | /api/HookActions/{id} | Update the priority only. |
DELETE | /api/HookActions/{id} | Delete one hook-action link. |
Current hook names: PreSpam, PostSpam, PostTopicDetection, OnEscalate, OnClose, OnEndUserUpdate, OnEndUserAdd, OnEndUserDelete, UserTriggered, PostEscalate, OnEscalateFailed, OnPhonePickup, OnPhonePickupSay.
GET /api/HookActions/wait-seconds?channelId=3&hookName=PostTopicDetection
Authorization: Bearer <token>
{
"totalWaitSeconds": 45
} These are the fields currently exposed by ActionCreateDTO, ActionUpdateDTO and ActionReadDTO. priority is intentionally not listed here: execution priority belongs to TopicActions or HookActions.
| Field | Type | Use |
|---|---|---|
name | string, required | Display name, maximum 100 characters. |
description | string | Short optional description, maximum 100 characters. |
actionType | string | Execution behavior, for example ApiCall, Reply, ReplySend, Send, Forward, Close, Delete, Spam, DetectTopics or Wait. |
isActive | boolean | Controls whether the action can run. |
| Field | Type | Use |
|---|---|---|
apiEndpoint | string | Endpoint or path AnswerPal calls when actionType is API-call based. |
apiMethod | string | HTTP method for the outbound call, such as GET, POST, PUT or DELETE. |
apiHeaders | JSON string | Additional outbound request headers. |
apiBodyTemplate | string | Request body template with placeholders. |
fieldMapping | JSON string | Maps AnswerPal fields to external API fields. |
responseFieldMapping | JSON string | Maps external API response values back into AnswerPal context. |
| Field | Type | Use |
|---|---|---|
overrideApiBaseUrl | string | Overrides the customer default base URL for this action. |
overrideApiUsername | string | Username for an outbound connector call. |
overrideApiPassword | string | Password for an outbound connector call. |
overrideApiToken | string | Token for an outbound connector call. |
overrideApiAuthenticationType | string | Outbound connector auth type. This does not change inbound AnswerPal API auth, which remains JWT Bearer. |
| Field | Type | Use |
|---|---|---|
conditionalRules | string | Rules that determine whether the action should run. |
forwardRecipients | string | Email recipients for forward-style actions. |
forwardPhoneNumber | string | Phone number for phone forward-style actions. |
waitSeconds | integer | Delay used by Wait actions. |
actionSchedule | string | Schedule expression or schedule setting for time-limited execution. |
actionScheduleTimeZoneId | string | Timezone id, normalized by the API against the current user timezone. |
| Field | Type | Use |
|---|---|---|
isFunctionTool | boolean | Exposes the action as a callable tool when enabled. |
functionParametersSchema | JSON schema string | Parameters schema for tool-call usage. |
toolCallTimeoutSeconds | integer | Maximum time to wait for a function-tool call. |
| Field | Type | Use |
|---|---|---|
actionID | integer | Action identifier. Required in PUT /api/Actions/{id} and must match the route id. |
customerID | integer | Owning customer, set by the API from the authenticated context. |
customFieldDefinitions | array | Included on ActionReadDTO when custom field definitions are attached. |
hookName/actionId filter for GET /api/HookActions.GET /api/Actions/available when building ticket or phone flows; use GET /api/Actions for settings screens.TopicActions or HookActions; do not send priority on the Action definition itself.actionScheduleTimeZoneId when scheduling an action; the API normalizes it against the current user timezone.overrideApiAuthenticationType only for outbound API calls made by AnswerPal.isActive=false when you may need to restore it; delete only when the action is no longer referenced./api/Actions management requires ManageSettings. /api/Actions/available accepts ticket access or phone-auth context. Topic and hook action endpoints require an authenticated user.
Priority is stored on TopicActions and HookActions, not on the action definition. Updating a topic or hook action currently updates priority only.
Actions define what can run. TopicActions attach actions to topics or topic/channel combinations. HookActions attach actions to workflow events such as PreSpam, PostTopicDetection, escalation, close or phone pickup.
No. The inbound AnswerPal API uses JWT Bearer authentication. Basic or Bearer values inside action configuration are outbound connector settings used when AnswerPal calls an external API.
AnswerPal: AI-powered customer service solutions to elevate your support and communication effortlessly.
For all support, sales, and partnership inquiries, email us at info@answerpal.eu
AnswerPal
Bisschoppenhoflaan 380
2100 Antwerp
Belgium
+32.36416685
BE 0862.692.858