---
title: "Perform Custom Template Action"
method: POST
path: "/api/MobileApp/templates/custom_trigger"
tags: ["MobileApp"]
---

# Perform Custom Template Action

`POST /api/MobileApp/templates/custom_trigger`

## Request

- Base URL: `https://api.leapsurgebi.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.leapsurgebi.com/api/MobileApp/templates/custom_trigger`
- Auth: OAuth 2
  - Password
  - Token URL: `/auth/token`
- TypeScript: <https://skmtc.dev/leapsurgebi/apis/leapsurgeapi/docs/api/MobileApp/templates/custom_trigger/post.ts> (a function with typed inputs; its response is checked against the schema)

**Function**: `perform_custom_template_action`

**Type**: API Endpoint (POST)

**Purpose**:  
Queues a custom template action.

**Headers**:
- `Customer_Key` (str, required): The customer key.
- `User_Code` (str, required): The user code.

**Request Body**:
A JSON object containing the action data.

**Response**:
A JSON response containing the result of the action.

**Exceptions**:
- `HTTPException`: If any exception occurs during the process, it raises an HTTPException with a 500 status code and the exception message.

**Action Data Request Body**:
{
    "template_code": "string, required, the template code",
    "action_type": "integer, required, the action type (0 = custom send, 1 = row send, 2 = direct row send)",
    "email_to": "string, optional, the email addresses to send to",
    "email_cc": "string, optional, the email addresses to send CC to",
    "email_bcc": "string, optional, the email addresses to send BCC to",
    "sequence": "string, optional, the sequence to send to",
    "recipient_row_id": "integer, optional, the recipient row ID to send to"
}

## Headers

- `Customer-Key` string, required
- `User-Code` string, required

## Request body

- TemplateCustomActionRequest
  - `template_code` string, required
  - `action_type` integer, required
  - `email_to` string[], nullable
  - `email_cc` string[], nullable
  - `email_bcc` string[], nullable
  - `recipient_row_id` integer, nullable
  - `sequence` integer, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-24** `23b42df3193a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/leapsurgebi/apis/leapsurgeapi/changes/api/MobileApp/templates/custom_trigger/post.md)

---

[API](https://skmtc.dev/leapsurgebi/apis/leapsurgeapi.md) - [All operations](https://skmtc.dev/leapsurgebi/apis/leapsurgeapi/llms.txt) - [OpenAPI document](https://skmtc.dev/leapsurgebi/apis/leapsurgeapi/revisions/13653cb8ee76?raw)
