An action is one step AnswerPal can carry out on a message or ticket: generate or send an answer, close, mark as spam, call an external API, call an AI model, send a notification, forward, wait, and more. An action definition holds what the step does. When it runs is decided by its links: a link to a topic runs it after topic detection, a link to a hook runs it at that event. The order comes from the priority of the link, not from the action.
/api/ActionspageNumber (default 1), pageSize (default 10), sortBy (default Name; any field of the definition, an unknown field gives 400) and sortOrder (asc or desc). The answer has items, totalCount and totalPages./api/Actions/api/Actions/availableactionID, customerID, name, description, actionType and isActive. Meant for choosing an action to run by hand on a message./api/Actions/{id}customFieldDefinitions./api/Actions/{id}actionID in the body must equal the ID in the path. Answers 204 No Content./api/Actions/{id}/api/TopicActionstopicId, actionId, hookName, channelId (links for that channel, for its channel type and for All), isActive (filters on the linked action), pageNumber (default 1), pageSize (default 10), sortBy (actionName by default, or topicName, hookName, channelName, priority) and sortOrder./api/TopicActions/api/TopicActions/bulk/api/TopicActions/{id}/api/TopicActions/{id}priority of a link; nothing else changes. Answers 204 No Content./api/TopicActions/{id}/api/TemplatePlaceholders/api/TemplatePlaceholders/preview/api/TemplatePlaceholders/email/api/TemplatePlaceholders/email/previewLinks to events such as PreSpam or OnPhoneCallEnded are managed on the Hooks page. To run an action by hand on one message, use the execute routes on the Ticket Messages page.
actionType decides what the action does. The value is compared without regard to case; a value that is not in this list is stored but does nothing when the action runs.
ReplySendReplySendCloseSpam, MarkSpamMarkSpamClose also closes the ticket.NotSpamDeletePreSpam event the incoming e-mail is skipped instead.DeleteCleanupDeleteCleanupClose also closes the ticket.DetectTopicsPostTopicDetection.ApiCallAICallSendNotificationScheduleAppointmentWaitwaitSeconds (at most 300 seconds).ForwardforwardRecipients, or transfers a phone call to forwardPhoneNumber.Linked actions run in ascending priority order; an action linked twice runs once, with its lowest priority. Close, Delete, the spam types and the cleanup types end the chain, and so does an action that fails.
name (string, required, max 100)description (string or null, max 4000)actionType (string, max 50)isActive (boolean)The update replaces the whole definition: send every field, a field you leave out is cleared. Only the stored password and token follow other rules, see below.
Used by ApiCall actions and by actions offered to the AI as a function tool.
apiEndpoint (string, max 2048)overrideApiBaseUrl or else to the customer’s API base URL. Placeholders such as {{Message.Subject}}, {{Ticket.TicketID}} or {{CustomFields.orderNumber}} are filled in and URL-encoded.apiMethod (string, max 50)GET (also when empty), POST, PUT, PATCH, DELETE, HEAD or OPTIONS. Another value makes the action fail when it runs.apiHeaders (string or null)Authorization, Proxy-Authorization and Host are ignored; set authentication below.apiBodyTemplate (string or null)GET and HEAD it must be a flat JSON object and is sent as query parameters.overrideApiBaseUrl (string, max 2048)responseFieldMapping (string or null){ "apiParameterName", "fieldType", "fieldName" }. apiParameterName is a dotted path in the JSON answer ($ is the whole answer). fieldType is Ticket (fields Subject, Preview, Summary, SummaryDate, FollowUpDate, IsImportant), Message (for example Message, Subject, AdditionalInfo, AI_GeneratedResponse, Lang) or CustomFields (any custom field name). Invalid JSON or another target gives 400 on save.fieldMapping (string or null)These are the credentials AnswerPal sends to the external API, not credentials for calling AnswerPal. Empty fields fall back to the API settings of the customer.
overrideApiAuthenticationType (string, max 50)Basic (username and password), Bearer (token) or RawAuthorization (the token is the complete Authorization header value, printable ASCII without spaces around it).overrideApiUsername (string, max 255)overrideApiPassword (string, max 255, write only)overrideApiToken (string, max 1024, write only)clearOverrideApiPassword, clearOverrideApiToken (boolean, write only)The password and token are never returned. An empty value keeps the stored secret, a new value replaces it, and only the clear flag removes it. When a secret is kept, changing the destination (apiEndpoint host or overrideApiBaseUrl) gives 400: enter the secret again or clear it. Switching to or from RawAuthorization also needs the token again, and a RawAuthorization or Bearer action can only take over the customer’s token when the customer uses a matching type.
conditionalRules (string or null)field, operator, value, grouped with and or or) on message, ticket and custom field values. The action only runs when they match. An unknown field or operator gives 400 on save. The rule fields and the conversion from plain text are on the Topics page.actionSchedule (string or null);: days and a time range such as Mon-Fri 08:00-18:00 (ranges past midnight are allowed), and exclusions such as !25/12 or !24/12-26/12. Empty means always. Outside the schedule the action is skipped.actionScheduleTimeZoneId (string, max 100)Europe/Brussels. An empty or unknown value becomes the time zone of the signed-in user, else UTC.waitSeconds (integer or null)Wait; values above 300 wait 300 seconds.aiModelID (integer, required)aiInstructionsTemplate (string or null), aiInputTemplate (string, required)aiOutputMode (string)Text (also when empty), JsonObject or JsonSchema. JsonSchema needs valid JSON in aiJsonSchema.aiTemperature (number or null)aiIncludeMessageAttachments (boolean), aiImageRefsTemplate (string or null)notificationSettings (string, required)channelID, to, cc, bcc, subjectTemplate and messageTemplate. The channel must belong to the customer and be active while the action is active. An e-mail channel needs at least one to address, a subject and a message; an SMS channel needs exactly one number in E.164 format and a message, without cc, bcc or subject. Other channel types are refused. A schedule is not used for this type and is cleared.appointmentSettings (string, required)appointmentTypeID (an appointment type of the customer), maxSlots (1 to 3, default 3), earliestFirst (default true; false spreads the proposals over days) and mode (Confirm, the default: the AI books; ProposeOnly: a representative confirms).forwardRecipients (string, max 1024);.forwardPhoneNumber (string, max 50)notificationSettings and appointmentSettings are cleared when the action has another type.
isFunctionTool (boolean)name and described by its description; when the AI calls it, AnswerPal runs the outbound API call with the parameters the AI passes.functionParametersSchema (string or null)toolCallTimeoutSeconds (integer or null)A ScheduleAppointment action is never offered as a tool of its own: it configures the appointment tools instead. How the phone service lists and calls tools is on the Voice and Transcription page.
actionID, customerID (integer)hasOverrideApiPassword, hasOverrideApiToken (boolean)customFieldDefinitions (array)GET /api/Actions/{id}; empty in lists and in the create answer.actionID (integer, required)priority (integer, required)topicID (integer or null)specialTopic (string or null, max 20)OnTranscribe takes documents only and gives 400 with code HookDoesNotSupportActions.channelID (integer or null)specialChannel (string or null)Email, Chat, Phone, WhatsApp, SMS, Teams or All.topicActionID, topicName, actionName and channelName (the channel name, or the channel type). documentID is always 0.A link matches a message when its channel is the message’s channel, its channel type is the channel’s type, or it is All.
POST /api/Actions
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "Look up order status",
"description": "Reads the order status from the shop system.",
"actionType": "ApiCall",
"isActive": true,
"apiEndpoint": "/orders/{{CustomFields.orderNumber}}",
"apiMethod": "GET",
"apiHeaders": "{\"Accept\":\"application/json\"}",
"overrideApiBaseUrl": "https://shop.example.com/api",
"overrideApiAuthenticationType": "Bearer",
"overrideApiToken": "example-token-value",
"responseFieldMapping": "[{\"apiParameterName\":\"status\",\"fieldType\":\"CustomFields\",\"fieldName\":\"orderStatus\"}]",
"actionSchedule": "Mon-Fri 08:00-18:00",
"actionScheduleTimeZoneId": "Europe/Brussels"
} 201 Created
Location: /api/Actions/58
{
"actionID": 58,
"customerID": 12,
"name": "Look up order status",
"description": "Reads the order status from the shop system.",
"actionType": "ApiCall",
"isActive": true,
"apiEndpoint": "/orders/{{CustomFields.orderNumber}}",
"apiMethod": "GET",
"apiHeaders": "{\"Accept\":\"application/json\"}",
"apiBodyTemplate": null,
"overrideApiBaseUrl": "https://shop.example.com/api",
"overrideApiUsername": null,
"overrideApiAuthenticationType": "Bearer",
"hasOverrideApiPassword": false,
"hasOverrideApiToken": true,
"fieldMapping": null,
"responseFieldMapping": "[{\"apiParameterName\":\"status\",\"fieldType\":\"CustomFields\",\"fieldName\":\"orderStatus\"}]",
"isFunctionTool": false,
"functionParametersSchema": null,
"toolCallTimeoutSeconds": null,
"aiModelID": null,
"aiInstructionsTemplate": null,
"aiInputTemplate": null,
"aiOutputMode": null,
"aiJsonSchema": null,
"aiTemperature": null,
"aiIncludeMessageAttachments": false,
"aiImageRefsTemplate": null,
"conditionalRules": null,
"notificationSettings": null,
"appointmentSettings": null,
"forwardRecipients": null,
"waitSeconds": null,
"forwardPhoneNumber": null,
"actionSchedule": "Mon-Fri 08:00-18:00",
"actionScheduleTimeZoneId": "Europe/Brussels",
"customFieldDefinitions": []
} POST /api/Actions
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "Notify sales team",
"actionType": "SendNotification",
"isActive": true,
"notificationSettings": "{\"channelID\":4,\"to\":[\"sales@example.com\"],\"cc\":[],\"bcc\":[],\"subjectTemplate\":\"New request: {{Message.Subject}}\",\"messageTemplate\":\"A new request arrived on ticket {{Ticket.TicketID}}.\"}"
} POST /api/TopicActions
Authorization: Bearer <token>
Content-Type: application/json
{
"topicID": 31,
"actionID": 58,
"specialChannel": "Email",
"priority": 10
}
201 Created
{
"topicActionID": 904,
"topicID": 31,
"specialTopic": null,
"documentID": 0,
"channelID": null,
"specialChannel": "Email",
"topicName": "Order status",
"actionID": 58,
"actionName": "Look up order status",
"channelName": "Email",
"priority": 10
} Placeholders are filled in with the data of the message, the ticket and the end user when a template is used: in the URL and body of an API call, in notification texts, in the instructions and input of an AI call, in prompt documents, in appointment notification texts, and in e-mail replies and signatures.
{{Family.Field}}, for example {{Message.Subject}}, {{Ticket.TicketID}}, {{EndUser.Firstname}} or {{CustomFields.orderNumber}}; names are not case-sensitive. Families: Message, Ticket, Appointment, EndUser, EndUsers, CustomFields, EndUserCustomFields, Parameters (the values the AI passes to a function tool) and, without a family, {{now}}, {{today}}, {{next_week}}, {{now_plus_2_days}} or {{now_minus_3_hours}} (units minute, hour, day, week, month, year) and {{TopicList}}. The families starting with Json, such as {{JsonEndUser.Email}}, write a JSON value (quoted and escaped, or null) for use in a JSON body. In the URL of an API call, of the date forms only {{now_plus_…}} and {{now_minus_…}} are filled in.{ "groups": [...], "families": [...] }. Each group (message, ticket, appointment, endUser, endUsers, customFields, endUserCustomFields, dateTime, parameters, special) has id, label, description and placeholders. Each placeholder has placeholder (the text to paste, with braces), family, field, label, description, format (Text or Json), example, canBeEmpty, isCommon, isPattern (a pattern such as {{Parameters.<name>}}), isDeprecated, requires (FunctionTool or null), aliases and valueType (Text, Number, Boolean or Date). Each family has name, aliases, format, requires, isBare and resolvesWithoutTicket. The account’s message and end user custom fields are included when their name only has letters, digits and _.
ticketID (integer, optional)templates (array, required, at most 10)field (your own name, returned as is), template (at most 20,000 characters) and context: text for a text such as a notification or an AI input, json for an API body (the template must be valid JSON; placeholders are filled in inside string values). The e-mail preview only takes text.audience (optional)internal (default) or participant: as for a text the end user sees, without internal notifications and ticket summaries. The e-mail preview always uses participant.asCustomerRepID (integer, e-mail preview only)The answer has ticketID, messageID, subject, messageDate, channelType and results: per template field, rendered and error (for example for a JSON template that is not valid JSON; rendered is then null). The e-mail preview encodes the values as HTML, as in a sent e-mail. Without a ticket with a message the answer is 404.
POST /api/TemplatePlaceholders/preview
Authorization: Bearer <token>
Content-Type: application/json
{
"ticketID": 4521,
"templates": [
{ "field": "subject", "template": "New request: {{Message.Subject}}", "context": "text" },
{ "field": "body", "template": "{ \"ticket\": \"{{Ticket.TicketID}}\", \"email\": {{JsonEndUser.Email}} }", "context": "json" }
]
}
200 OK
{
"ticketID": 4521,
"messageID": 98812,
"subject": "Question about invoice 2026-0147",
"messageDate": "2026-11-20T09:14:02Z",
"channelType": "Email",
"results": [
{ "field": "subject", "rendered": "New request: Question about invoice 2026-0147", "error": null },
{ "field": "body", "rendered": "{ \"ticket\": \"4521\", \"email\": \"an.janssens@example.com\" }", "error": null }
]
} GET /api/TemplatePlaceholders
Authorization: Bearer <token>
200 OK
{
"groups": [
{
"id": "message",
"label": "Message",
"description": "...",
"placeholders": [
{ "placeholder": "{{Message.Subject}}", "family": "Message", "field": "Subject", "format": "Text", "valueType": "Text", "isCommon": true, ... }
]
},
...
],
"families": [
{ "name": "Message", "aliases": ["TicketMessage"], "format": "Text", "requires": null, "isBare": false, "resolvesWithoutTicket": false },
...
]
} Action definitions need Configurator or Administrator; the short list of GET /api/Actions/available is open to every user role and to the phone token. The topic link endpoints work for every signed-in user of the customer. The placeholder list and preview need Configurator or Administrator; their e-mail versions are open to every role except Analyst. The access line of each endpoint above is the reference.
200 OK, 201 Created, 204 No Content400 Bad Requestname, description or time zone; ID mismatch. on an update; { "message": "..." } for invalid type settings (AI model, output mode, temperature, notification or appointment settings, conditional rules, response mapping); a text message for authentication problems or a destination change with a kept secret; { "code": "HookDoesNotSupportActions", "message": "..." } for a link to OnTranscribe; an unknown sort field gives { "code", "message", "traceId" }.404 Not Found409 Conflict500 Internal Server ErrorapiEndpoint, actionType, specialChannel), a link to an action, topic or channel that does not exist, a link that already exists, or a specialChannel outside the list. These are not validated up front.On the link. Every topic or hook link has a priority; lower numbers run first. The same action can have a different priority on each link.
A new action is always saved as active. Send an update with isActive set to false to switch it off.
Leave overrideApiToken empty and clearOverrideApiToken false. To remove it, set clearOverrideApiToken to true. If you change the API destination at the same time, send the token again.
Its topic and hook links are deleted with it.
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