---
title: "Create Alert action"
method: POST
path: "/pws/v2/pws_action_alert/"
tags: ["Rules action V2"]
---

# Create Alert action

`POST /pws/v2/pws_action_alert/`

This API is used to create alert actionthat can be applied to different rule.<p>Version 2 Action Alert api support idempotency;</p>

## Request body

- AlertActionModel — This web service allows to alert different types of action
  - `action_name` string, required — <p>This is just a name given to alert action</p></br>Eg.Decline for decline action.</br>Alert for Alert action
  - `api_call_unique_identifier` string, required — Unique number that must be passed at each API request. Identifier to make each API request unique
  - `body` string, required — ,message container
  - `client_id` integer, required — Unique identifier for the client which Paymentology will provide at outset
  - `rule_id` integer, required — Id of rule in which we want to add decline action.Rule Id is returned when creating rule.
  - `sub` string, required — Subject
  - `to` string, required — <p>Recepient :Value of to can be :</p> <ul> <li class="docBullet" >me</li> <li class="docBullet" >cardholder</li> <li class="docBullet" >parent_account_owner</li> <li class="docBullet" >cust_service_1</li> <li class="docBullet" >aml_team</li> <li class="docBullet" >custom</li> </ul>
  - `type` string, required — <p>action Type Values of type can be :"1" or "2" or "1,2".</p> <ul> <li class="docBullet" >"1"-–indicate sending alert through sms</li> <li class="docBullet" >"2" --indicates sending alert through email</li> <li class="docBullet" >"1,2" --indicates sending alert through both email and sms</li><ul>
  - `user_id` string — User Id of the Customer who triggered the API request.
  - `remarks` string — Remarks for API request
  - `phone` string — <p>Phone Number mandatory when type is one of the following:</p> <ul> <li>type=="1"</li> <li>type="1,2"</li> </ul>
  - `email` string — <p>Email Id mandatory when type is one of the following:</p> <ul> <li>type=="2"</li> <li>type=="1,2"</li> </ul>

## Response `200`

Successful Response

- CreateActionResponseModel
  - `header` ResponseHeader
    - `error_id` integer — Error Id
    - `error_desc` string — Error Message
  - `body` CreateActionResponseModelBody
    - `id` integer — action Id

## Other responses

- `404` — Webservices does not exist
- `500` — Internal Server error

---

[API](https://skmtc.net/paymentology/apis/payapi-docs.md) · [All operations](https://skmtc.net/paymentology/apis/payapi-docs/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/paymentology/payapi-docs/revisions/a675891b0365/schema)
