> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://beta-docs.payabli.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://beta-docs.payabli.com/_mcp/server.

# Create notification

POST https://api-sandbox.payabli.com/api/Notification
Content-Type: application/json

Create a new notification or autogenerated report. 

Reference: https://beta-docs.payabli.com/api-reference/notification/add-notification

## Authentication

- `requestToken` header (required) — API Key authentication via header

## Servers

- `https://api-sandbox.payabli.com/api` (Sandbox, default)
- `https://api.payabli.com/api` (Production)

## Request

### Body (application/json)

This endpoint expects an AddNotificationRequest.

- `AddNotificationRequest`

## Response

### 200

Success

- `isSuccess` (boolean, optional) — If `isSuccess` = true, `responseData` contains the notification identifier. If `isSuccess` = false, `responseData` contains the reason for the error.
- `pageIdentifier` (string, optional) — Auxiliary validation used internally by payment pages and components.
- `responseCode` (integer, optional) — Code for the response. Learn more in [API Response Codes](/api-reference/api-responses).
- `responseData` (PayabliApiResponseNotificationsResponseData, optional) — When the request was successful, this contains the notification ID, or `nID` used to manage the notifcation.
- `responseText` (string, optional) — Response text for operation: 'Success' or 'Declined'.

## Errors

### 400 Bad Request Error

Bad request/ invalid data

- `any`

### 401 Unauthorized Error

Unauthorized request.

- `any`

### 500 Internal Server Error

Internal API Error

- `any`

### 503 Service Unavailable Error

Database connection error

- `isSuccess` (boolean, optional) — Boolean indicating whether the operation was successful. A `true` value indicates success. A `false` value indicates failure.
- `responseData` (map from string to any, optional) — The object containing the response data.
- `responseText` (string, optional) — Response text for operation: 'Success' or 'Declined'.

## Types

### NotificationStandardRequest

Information about the standard notification configuration (email, sms, web).

- `frequency` (enum, required)
  - Allowed values: `one-time`, `untilcancelled`
- `method` (enum, required) — Get near-instant notifications via email, SMS, or webhooks for important events like new payment disputes, merchant activations, fraud alerts, approved transactions, settlement history, vendor payouts, and more. Use webhooks with notifications to get real-time updates and automate operations based on key those key events. See [Notifications](/developer-guides/notifications-and-webhooks-overview#notifications) for more.
  - Allowed values: `email`, `sms`, `web`
- `ownerType` (integer, required) — Entity owner type. Accepted values: - `0`: Organization/partner - `2`: Paypoint
- `target` (string, required) — Specify the notification target. - For method=email the expected value is a list of email addresses separated by semicolon. - For method=sms the expected value is a list of phone numbers separated by semicolon. - For method=web the expected value is a valid and complete URL. Webhooks support only standard HTTP ports: 80, 443, 8080, or 4443.
- `content` (NotificationStandardRequestContent, optional)
- `ownerId` (string, optional) — ID for the paypoint or organization that owns the notification.
- `status` (integer, optional) — Status of notification: - `0`: Inactive - `1`: Active

### NotificationReportRequest

Information about the report notification configuration (report-email, report-web).

- `content` (NotificationReportRequestContent, required)
- `frequency` (enum, required)
  - Allowed values: `one-time`, `daily`, `weekly`, `biweekly`, `monthly`, `quarterly`, `semiannually`, `annually`
- `method` (enum, required) — Automated reporting lets you gather critical reports without manually filtering and exporting the data. Get automated daily, weekly, and monthly report for daily sales, ACH returns, settlements, and more. You can send these reports via email or via webhook. See [Auotmated Reports](/developer-guides/notifications-and-webhooks-overview#automated-reports) for more.
  - Allowed values: `report-email`, `report-web`
- `ownerType` (integer, required) — Entity owner type. Accepted values: - `0`: Organization/partner - `2`: Paypoint
- `target` (string, required) — Specify the notification target. For method=report-email the expected value is a list of email addresses separated by semicolon. For method=report-web the expected value is a valid and complete URL. Webhooks support only standard HTTP ports: 80, 443, 8080, or 4443.
- `ownerId` (string, optional) — ID for the paypoint or organization that owns the notification.
- `status` (integer, optional) — Status of notification: - `0`: Inactive - `1`: Active

### PayabliApiResponseNotificationsResponseData

When the request was successful, this contains the notification ID, or `nID` used to manage the notifcation.

### NotificationStandardRequestContent

- `eventType` (enum, optional) — The notification's event name.
  - Allowed values: `ApprovedPayment`, `AuthorizedPayment`, `DeclinedPayment`, `OriginatedPayment`, `SettledPayment`, `FundedPayment`, `VoidedPayment`, `RefundedPayment`, `HoldTransaction`, `ReleasedTransaction`, `HoldBatch`, `ReleasedBatch`, `TransferAdjusted`, `TransferDisabledCreditFund`, `TransferDisabledDebitFund`, `TransferNotAvailableBalance`, `TransferReadyforRetry`, `TransferResolved`, `TransferReturn`, `TransferSuccess`, `TransferSuspended`, `TransferError`, `SendReceipt`, `RecoveredTransaction`, `CreatedApplication`, `SubmittedApplication`, `ActivatedMerchant`, `ReceivedChargeBack`, `ReceivedAchReturn`, `HoldingApplication`, `DeclinedApplication`, `BoardingApplication`, `FraudAlert`, `InvoiceSent`, `InvoicePaid`, `InvoiceCreated`, `BillPaid`, `BillApproved`, `BillDisApproved`, `BillCanceled`, `BillProcessing`, `PayOutFunded`, `PayOutProcessed`, `PayOutCanceled`, `PayOutPaid`, `importFileReceived`, `importFileProcessed`, `importFileError`, `exportFileSent`, `exportFileError`, `UpdatedMerchant`, `Report`, `FailedEmailNotification`, `FailedWebNotification`, `FailedSMSNotification`, `UserPasswordCloseExpire`, `UserPasswordExpired`
- `internalData` (list of KeyValueDuo, optional) — Array of pairs key:value to insert in request body to target in **method** = *web*.
- `transactionId` (string, optional, default: 0) — Used internally to reference the entity or object generating the event.
- `webHeaderParameters` (list of KeyValueDuo, optional) — Array of pairs key:value to insert in header of request to target in **method** = *web*.

### NotificationReportRequestContent

- `eventType` ("Report", optional) — The notification's event name.
- `fileFormat` (enum, optional) — Indicate the format of report file to be generated by the engine.
  - Allowed values: `json`, `csv`, `xlsx`
- `internalData` (list of KeyValueDuo, optional) — Array of pairs key:value to insert in request body to target in **method** = *report-web*.
- `reportName` (enum, optional) — The kind report to generate.
  - Allowed values: `Transaction`, `Settlement`, `Boarding`, `Returned`
- `timeZone` (integer, optional) — Timezone, in UTC offset. For example, -5 is Eastern time.
- `transactionId` (string, optional, default: 0) — Used internally to reference the entity or object generating the event.
- `webHeaderParameters` (list of KeyValueDuo, optional) — Array of pairs key:value to insert in header of request to target in **method** = *report-web*.

### KeyValueDuo

- `key` (string, optional) — Key name.
- `value` (string, optional) — Key value.

## Examples

### Webhook

**Request**

```json
{
  "content": {
    "eventType": "CreatedApplication"
  },
  "frequency": "untilcancelled",
  "method": "web",
  "ownerId": "236",
  "ownerType": 0,
  "status": 1,
  "target": "https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275"
}
```

**Response**

```json
{
  "isSuccess": true,
  "responseCode": 1,
  "responseData": 1717,
  "responseText": "Success"
}
```

**SDK Code**

```python Webhook
import requests

url = "https://api-sandbox.payabli.com/api/Notification"

payload = {
    "content": { "eventType": "CreatedApplication" },
    "frequency": "untilcancelled",
    "method": "web",
    "ownerId": "236",
    "ownerType": 0,
    "status": 1,
    "target": "https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275"
}
headers = {
    "requestToken": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Webhook
const url = 'https://api-sandbox.payabli.com/api/Notification';
const options = {
  method: 'POST',
  headers: {requestToken: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"content":{"eventType":"CreatedApplication"},"frequency":"untilcancelled","method":"web","ownerId":"236","ownerType":0,"status":1,"target":"https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Webhook
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api-sandbox.payabli.com/api/Notification"

	payload := strings.NewReader("{\n  \"content\": {\n    \"eventType\": \"CreatedApplication\"\n  },\n  \"frequency\": \"untilcancelled\",\n  \"method\": \"web\",\n  \"ownerId\": \"236\",\n  \"ownerType\": 0,\n  \"status\": 1,\n  \"target\": \"https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("requestToken", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Webhook
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/Notification")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["requestToken"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"content\": {\n    \"eventType\": \"CreatedApplication\"\n  },\n  \"frequency\": \"untilcancelled\",\n  \"method\": \"web\",\n  \"ownerId\": \"236\",\n  \"ownerType\": 0,\n  \"status\": 1,\n  \"target\": \"https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275\"\n}"

response = http.request(request)
puts response.read_body
```

```java Webhook
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api-sandbox.payabli.com/api/Notification")
  .header("requestToken", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"content\": {\n    \"eventType\": \"CreatedApplication\"\n  },\n  \"frequency\": \"untilcancelled\",\n  \"method\": \"web\",\n  \"ownerId\": \"236\",\n  \"ownerType\": 0,\n  \"status\": 1,\n  \"target\": \"https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275\"\n}")
  .asString();
```

```php Webhook
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api-sandbox.payabli.com/api/Notification', [
  'body' => '{
  "content": {
    "eventType": "CreatedApplication"
  },
  "frequency": "untilcancelled",
  "method": "web",
  "ownerId": "236",
  "ownerType": 0,
  "status": 1,
  "target": "https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'requestToken' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Webhook
using RestSharp;

var client = new RestClient("https://api-sandbox.payabli.com/api/Notification");
var request = new RestRequest(Method.POST);
request.AddHeader("requestToken", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"content\": {\n    \"eventType\": \"CreatedApplication\"\n  },\n  \"frequency\": \"untilcancelled\",\n  \"method\": \"web\",\n  \"ownerId\": \"236\",\n  \"ownerType\": 0,\n  \"status\": 1,\n  \"target\": \"https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Webhook
import Foundation

let headers = [
  "requestToken": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "content": ["eventType": "CreatedApplication"],
  "frequency": "untilcancelled",
  "method": "web",
  "ownerId": "236",
  "ownerType": 0,
  "status": 1,
  "target": "https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Notification")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### ReportExample

**Request**

```json
{
  "content": {
    "eventType": "Report",
    "fileFormat": "json",
    "reportName": "Transaction",
    "timeZone": -5,
    "transactionId": "0"
  },
  "frequency": "biweekly",
  "method": "report-email",
  "ownerId": "236",
  "ownerType": 0,
  "status": 1,
  "target": "admin@example.com"
}
```

**Response**

```json
{
  "isSuccess": true,
  "responseCode": 1,
  "responseData": 1717,
  "responseText": "Success"
}
```

**SDK Code**

```python ReportExample
import requests

url = "https://api-sandbox.payabli.com/api/Notification"

payload = {
    "content": {
        "eventType": "Report",
        "fileFormat": "json",
        "reportName": "Transaction",
        "timeZone": -5,
        "transactionId": "0"
    },
    "frequency": "biweekly",
    "method": "report-email",
    "ownerId": "236",
    "ownerType": 0,
    "status": 1,
    "target": "admin@example.com"
}
headers = {
    "requestToken": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript ReportExample
const url = 'https://api-sandbox.payabli.com/api/Notification';
const options = {
  method: 'POST',
  headers: {requestToken: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"content":{"eventType":"Report","fileFormat":"json","reportName":"Transaction","timeZone":-5,"transactionId":"0"},"frequency":"biweekly","method":"report-email","ownerId":"236","ownerType":0,"status":1,"target":"admin@example.com"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go ReportExample
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api-sandbox.payabli.com/api/Notification"

	payload := strings.NewReader("{\n  \"content\": {\n    \"eventType\": \"Report\",\n    \"fileFormat\": \"json\",\n    \"reportName\": \"Transaction\",\n    \"timeZone\": -5,\n    \"transactionId\": \"0\"\n  },\n  \"frequency\": \"biweekly\",\n  \"method\": \"report-email\",\n  \"ownerId\": \"236\",\n  \"ownerType\": 0,\n  \"status\": 1,\n  \"target\": \"admin@example.com\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("requestToken", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby ReportExample
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/Notification")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["requestToken"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"content\": {\n    \"eventType\": \"Report\",\n    \"fileFormat\": \"json\",\n    \"reportName\": \"Transaction\",\n    \"timeZone\": -5,\n    \"transactionId\": \"0\"\n  },\n  \"frequency\": \"biweekly\",\n  \"method\": \"report-email\",\n  \"ownerId\": \"236\",\n  \"ownerType\": 0,\n  \"status\": 1,\n  \"target\": \"admin@example.com\"\n}"

response = http.request(request)
puts response.read_body
```

```java ReportExample
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api-sandbox.payabli.com/api/Notification")
  .header("requestToken", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"content\": {\n    \"eventType\": \"Report\",\n    \"fileFormat\": \"json\",\n    \"reportName\": \"Transaction\",\n    \"timeZone\": -5,\n    \"transactionId\": \"0\"\n  },\n  \"frequency\": \"biweekly\",\n  \"method\": \"report-email\",\n  \"ownerId\": \"236\",\n  \"ownerType\": 0,\n  \"status\": 1,\n  \"target\": \"admin@example.com\"\n}")
  .asString();
```

```php ReportExample
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api-sandbox.payabli.com/api/Notification', [
  'body' => '{
  "content": {
    "eventType": "Report",
    "fileFormat": "json",
    "reportName": "Transaction",
    "timeZone": -5,
    "transactionId": "0"
  },
  "frequency": "biweekly",
  "method": "report-email",
  "ownerId": "236",
  "ownerType": 0,
  "status": 1,
  "target": "admin@example.com"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'requestToken' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp ReportExample
using RestSharp;

var client = new RestClient("https://api-sandbox.payabli.com/api/Notification");
var request = new RestRequest(Method.POST);
request.AddHeader("requestToken", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"content\": {\n    \"eventType\": \"Report\",\n    \"fileFormat\": \"json\",\n    \"reportName\": \"Transaction\",\n    \"timeZone\": -5,\n    \"transactionId\": \"0\"\n  },\n  \"frequency\": \"biweekly\",\n  \"method\": \"report-email\",\n  \"ownerId\": \"236\",\n  \"ownerType\": 0,\n  \"status\": 1,\n  \"target\": \"admin@example.com\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift ReportExample
import Foundation

let headers = [
  "requestToken": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "content": [
    "eventType": "Report",
    "fileFormat": "json",
    "reportName": "Transaction",
    "timeZone": -5,
    "transactionId": "0"
  ],
  "frequency": "biweekly",
  "method": "report-email",
  "ownerId": "236",
  "ownerType": 0,
  "status": 1,
  "target": "admin@example.com"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Notification")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```