Action types
The actions your server asks your users to approve, such as a sign-in or a transfer, with the name and description they see on their phone.
Every login request your app sends through the 2FA API names an action type, such as LOGIN or SEND_MONEY. The phone shows that type's display name and description, so the user knows what they are approving.
A new organization has no action types, not even LOGIN. Until you add one, every request that names it is refused with 400 unknown_action. Add the types here, or define them from your server at start-up.
An action type also decides how strict the approval is: a critical type always asks for number matching, and Second Thought questions make the phone ask the user before Approve.
In the dashboardCustomers → 2FA API → Action typesdashboard.touchque.com/action-types
Permissions
- Developers who connect the 2FA API, and the security team that decides which actions are critical.
- Every member can see the list. Only owners and admins can add, edit and delete action types. Making a critical type non-critical, removing Second Thought questions, or deleting a critical type or one with questions also needs two-step verification on your account and an approval on your phone.
Add an action type
- Open Customers → 2FA API → Action types.
- Press Add action type.
- Type the ID your server will send, for example
WITHDRAW. Letters become capitals and spaces become_as you type. - Type the Display name and, if you like, a Description. People see both on their phone.
- Turn on Critical action if the phone should ask for number matching on every approval.
- Press Add action type.
The ID cannot be changed later. Send it as the type of your login request.
Change what the phone shows
- On Action types, press the pencil icon (Edit) on the row.
- Change the Display name or the Description.
- Press Save changes.
Add Second Thought questions
- Open the action type with Add action type or Edit.
- Open Second Thought questions and tick up to 2 questions.
- Choose the Language on the phone: Turkish or English.
- Save the action type.
Use them for actions people get talked into. A risky answer does not refuse the request: the approval becomes provisional and the phone asks "Was this you?" later.
Pause an action type
- On Action types, press Edit on the row.
- Turn off Active.
- Press Save changes.
Requests with an inactive type are refused with 403 action_disabled. A define call from your server never turns it back on.
Delete an action type
- On Action types, press the bin icon (Delete) on the row.
- Confirm with Delete action type.
- If the type is critical or has Second Thought questions, approve on your phone.
Requests that send its ID are refused until you add it again, which may break your integration.
Settings reference
Action types
| Setting | Description |
|---|---|
| Name | The display name, with the description under it. |
| ID | The value you pass as the action type when you call the SDK or the API. |
| Approval | Standard, or Number matching for a critical action, plus the number of Second Thought questions. |
| Status | Active or Inactive. |
| Created | When the type was added. |
Add action type
| Setting | Description |
|---|---|
| ID | Required and unique. 1 to 64 letters, digits and _ . : -. Cannot be changed later. |
| Display name | Required, up to 255 characters. Shown on the phone and in the dashboard. |
| Description | The text people see under the name on their phone. |
| Critical action | The phone asks for number matching on every approval. Time-based codes are refused, and offline sign needs its own opt-in in App user policy. |
| Active | On by default. Requests with an inactive action type are refused. |
| Second Thought questions | Up to 2 yes/no questions the phone asks before Approve, chosen from a fixed list (for example "Is someone on a call or in messages telling you to do this right now?"). |
| Language on the phone | Turkish (default) or English, for the Second Thought questions. |
Limits
- A new organization has none. A request with an undefined type gets
400 unknown_action; one with an inactive type gets403 action_disabled. - ID: 1 to 64 letters, digits and
_ . : -, unique in the organization, and fixed once created. - Display name: at most 255 characters. Second Thought: at most 2 questions per type.
- Only owners and admins can change action types.
See also
- App user policy: How strictly Touchque checks the sign-ins and actions your own app sends through the 2FA API: number matching, passkeys, offline approvals, risk signals, Vishing Shield and access rules.
- End users: The people who sign in to your own app and approve with Touchque Authenticator through the 2FA API: their status, phone, secrets, passkeys and recent requests.
- App agents: Your own app's AI agents as identities of their own: who owns each, what it may ask your users to approve, its limits, and a switch that stops them all.
- Webhooks: Where Touchque sends the result of every login request (approved or rejected) and the follow-up events, as a signed POST to your server.
API and SDKs
- Action types for developers (below)
- Send a login request with an action type
- REST reference: /action-types
Changelog
- Improved2026.11.11.2 A request for an unknown or turned-off action type is refused at once.
- New2026.11.10 Action types can pause requests after a security change, warn about look-alike destinations and ask Second Thought questions.
Action types for developers
An action type names what a person is asked to approve: LOGIN for a sign-in, SEND_MONEY for a transfer, or any name you choose. The phone shows its name and description. Every login request and every SDK guard names one, and Touchque refuses a type your workspace has not defined.
LOGIN. Until a type is defined, every request that names it, and every guard such as requireTouchque('SEND_MONEY'), gets 400 unknown_action.- In the dashboard: Customers → 2FA API → Action types. You can also turn a type off there; a define call from code never turns it back on.
- From your server at start-up:
actionTypes.definein every SDK, orPOST /action-types. It is safe to call on every start: it never turns on a type an admin turned off, and changescritical,descriptionandsecondThoughtonly when you send them. - From an AI coding assistant: the Touchque MCP's
touchque_define_action_type, which asks you before it creates one.
| Field | Meaning |
|---|---|
type | The ID you pass as type: 1 to 64 letters, digits and _ . : - (e.g. LOGIN, SEND_MONEY). Required. |
name | Shown on the phone and in the dashboard. Required. |
description | A line under the name on the phone. |
critical | The phone asks for number matching on every approval. Time-based codes are refused, and offline sign needs its own opt-in in App user policy. |
secondThought | Up to two yes/no questions the phone asks before Approve, for actions people get talked into ("Is someone on a call telling you to do this?"). A risky answer does not refuse: the approval comes back provisional. |
active | Dashboard only. A request with an inactive type gets 403 action_disabled. |
requireTouchque('SEND_MONEY') (Node), @require_touchque('SEND_MONEY') (Python), ->middleware('touchque:SEND_MONEY') (Laravel) and touchque.Require(tq, "SEND_MONEY", …) (Go) all send SEND_MONEY as the type.const { Touchque } = require('@touchque/node');
const tq = new Touchque(); // TQ_API_KEY / TQ_API_SECRET from the environment
// At start-up: creates or updates (never turns on one an admin turned off)
await tq.actionTypes.define('LOGIN', { name: 'Sign in' });
await tq.actionTypes.define('SEND_MONEY', { name: 'Send money', description: 'A transfer from your account', critical: true });
const types = await tq.actionTypes.list();from touchque import Touchque
tq = Touchque() # TQ_API_KEY / TQ_API_SECRET from the environment
# At start-up: creates or updates (never turns on one an admin turned off)
tq.action_types.define("LOGIN", name="Sign in")
tq.action_types.define("SEND_MONEY", name="Send money", description="A transfer from your account", critical=True)
types = tq.action_types.list()$tq = new \Touchque\Touchque(); // TQ_API_KEY / TQ_API_SECRET from the environment
// At start-up: creates or updates (never turns on one an admin turned off)
$tq->actionTypes->define('LOGIN', 'Sign in');
$tq->actionTypes->define('SEND_MONEY', 'Send money', 'A transfer from your account', true);
$types = $tq->actionTypes->list();tq, err := touchque.New() // TQ_API_KEY / TQ_API_SECRET from the environment
if err != nil {
log.Fatal(err)
}
// At start-up: creates or updates (never turns on one an admin turned off)
_, err = tq.ActionTypes.Define("LOGIN", touchque.DefineOptions{Name: "Sign in"})
critical := true
_, err = tq.ActionTypes.Define("SEND_MONEY", touchque.DefineOptions{Name: "Send money", Description: "A transfer from your account", Critical: &critical})
types, err := tq.ActionTypes.List()var tq = new TouchqueClient(); // TQ_API_KEY / TQ_API_SECRET from the environment
// At start-up: creates or updates (never turns on one an admin turned off)
await tq.ActionTypes.DefineAsync("LOGIN", "Sign in");
await tq.ActionTypes.DefineAsync("SEND_MONEY", "Send money", "A transfer from your account", critical: true);
var types = await tq.ActionTypes.ListAsync();var tq = new TouchqueClient(); // TQ_API_KEY / TQ_API_SECRET from the environment
// At start-up: creates or updates (never turns on one an admin turned off)
tq.actionTypes().define("LOGIN", "Sign in", false);
tq.actionTypes().define("SEND_MONEY", "Send money", "A transfer from your account", true, null);
JsonNode types = tq.actionTypes().list();tq = Touchque::Client.new # TQ_API_KEY / TQ_API_SECRET from the environment
# At start-up: creates or updates (never turns on one an admin turned off)
tq.action_types.define("LOGIN", name: "Sign in")
tq.action_types.define("SEND_MONEY", name: "Send money", description: "A transfer from your account", critical: true)
types = tq.action_types.list# Signed requests (HMAC), see Authentication
POST /action-types
{ "type": "SEND_MONEY", "name": "Send money", "description": "A transfer from your account", "critical": true }
→ { "id": "…", "type": "SEND_MONEY", "name": "Send money", "description": "A transfer from your account", "critical": true, "active": true, "secondThought": null }
GET /action-types
→ [ { "type": "LOGIN", … }, { "type": "SEND_MONEY", … } ]