Alert Actions

postAlertActions

POST
/alertActions

Create an alertAction, which represents a particular instance of an Alert sent out through one particular channel, such as SMS, mobile application notification, or email, and each alertAction is associated with an Alert resource.

Authorization

APIKEY<token>

In: header

Header Parameters

token?string

A single-use, limited authentication layer in addition to an API Key or Session Key to authorize sensitive operations. Auth Tokens add security by requiring one-time approval for specific actions.

request-token?string

A custom, one-time identifier for any API request (GET, PUT, POST, or DELETE). Blocks future requests with the same token for 48 hours, ensuring only the first request is processed. Valid values can contain 1-100 alphanumeric and special characters. See Request Tokens for more information.

Request Body

application/json

Create Alert Action Request

Create Alert Action Request

alert*|

The identifier of the Alert resource that defines this alertAction.

headerName?string

The request header name for authentication to the endpoint.

headerValue?string

The request header value for authentication to the endpoint.

type*alertActionType

The medium to use to deliver this Alert.

  • email - Deliver the Alert to an email address.
  • web - Deliver the Alert through a web site notification.
  • app - Deliver the Alert through a mobile application notification.
  • sms - Deliver the Alert through an SMS message to a mobile device.

Value in

  • "email"
  • "web"
  • "app"
  • "sms"
options*string

When the 'type' field of this resource is set to 'web', this field determines the format that the Alert data should be sent in.

value*string

A value used to deliver the alert. Thie field should be set to an email address if the type is email, an endpoint if the type is web, etc.

retries?|

The number of times an alert should be resent in case of a failure. This fields can only be set for web type alertActions.

maxAttemptsTempDisabled?alertActionsMaxAttemptsTempDisabled

Whether it was temporarily disabled for reaching the maximum number of failed attempts.

  • 0 - Not Temporarily Disabled
  • 1 - Temporarily Disabled

Value in

  • 0
  • 1
inactive?inactive

Whether this resource is marked as inactive.

  • 0 - Active
  • 1 - Inactive

Value in

  • 0
  • 1
frozen?frozen

Whether this resource is marked as frozen.

  • 0 - Not Frozen
  • 1 - Frozen

Value in

  • 0
  • 1

Response Body

application/json

application/json

curl -X POST "https://example.com/alertActions" \  -H "Content-Type: application/json" \  -d '{    "alert": "t1_alt_65fddb118236188e055d54c",    "type": "web",    "options": "JSON",    "value": "https://test.payrix.com/apix/test/t1",    "maxAttemptsTempDisabled": 0,    "headerName": "Authorization",    "headerValue": "SecretToken123!",    "retries": 3,    "inactive": 0,    "frozen": 0  }'
{  "response": {    "data": [      {        "id": "t1_ala_67d0924f1919ec362341d00",        "created": "2025-03-11 15:43:11.1194",        "modified": "2025-03-11 15:43:11.1194",        "creator": "t1_log_65b2c883d793216616f16ab",        "modifier": "t1_log_65b2c883d793216616f16ab",        "type": "web",        "options": "JSON",        "value": "https://test.payrix.com/apix/test/t1",        "alert": "t1_alt_65fddb118236188e055d54c",        "retries": 3,        "headerName": "Authorization",        "headerValue": "SecretToken123!",        "maxAttemptsTempDisabled": 0,        "inactive": 0,        "frozen": 0      }    ],    "details": {      "requestId": 1,      "totals": [],      "page": {        "current": 1,        "last": 1,        "hasMore": false      }    },    "errors": []  }}