> 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.

# Manage notifications

Use Payabli's notification functions to create and manage automated notifications and reports for important events. This guide covers the key operations for managing notifications through the API.

## Considerations

Keep these considerations in mind when working with notifications:

* Notifications can be configured at both organization and paypoint levels independently. Setting up the same notification at both levels results in duplicate notifications, as neither configuration overrides the other.
* Multiple notification methods are supported including email, SMS, webhooks, and automated reports.
* Each notification requires a specific event type to trigger it. Learn more about the events [here](/developer-guides/notifications-and-webhooks-overview#notifications).
* Notifications can be set to run until cancelled or for a specific duration.
* For webhook notifications, you can include custom header parameters.

## Create a notification

Send a POST request to `/api/Notification` to create a notification. The notification can be configured to trigger on specific events and deliver updates via email, SMS, or webhooks. See the [API reference](/api-reference/notification/add-notification) for full documentation.

This example creates a webhook notification that triggers when a payment is approved:

### Request

POST [https://api-sandbox.payabli.com/api/Notification](https://api-sandbox.payabli.com/api/Notification)

**`Webhook`**

```curl Webhook
curl -X POST https://api-sandbox.payabli.com/api/Notification \
     -H "requestToken: <apiKey>" \
     -H "Content-Type: application/json" \
     -d '{
  "content": {
    "eventType": "CreatedApplication"
  },
  "frequency": "untilcancelled",
  "method": "web",
  "ownerId": "236",
  "ownerType": 0,
  "status": 1,
  "target": "https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275"
}'
```

**`Webhook`**

```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())
```

**`Webhook`**

```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);
}
```

**`Webhook`**

```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))

}
```

**`Webhook`**

```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
```

**`Webhook`**

```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();
```

**`Webhook`**

```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();
```

**`Webhook`**

```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);
```

**`Webhook`**

```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()
```

A successful response will return the ID of the created notification:

### Response (200)

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

## Get notification details

Send a GET request to `/api/Notification/{notificationId}` to retrieve information about a specific notification. See the [API reference](/api-reference/notification/get-notification) for full documentation.

This example retrieves details for notification ID `1717`:

### Request

GET [https://api-sandbox.payabli.com/api/Notification/\{nId}](https://api-sandbox.payabli.com/api/Notification/\{nId})

**`Get`**

```curl Get
curl https://api-sandbox.payabli.com/api/Notification/1717 \
     -H "requestToken: <apiKey>"
```

**`Get`**

```python Get
import requests

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

headers = {"requestToken": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

**`Get`**

```javascript Get
const url = 'https://api-sandbox.payabli.com/api/Notification/1717';
const options = {method: 'GET', headers: {requestToken: '<apiKey>'}};

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

**`Get`**

```go Get
package main

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

func main() {

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

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("requestToken", "<apiKey>")

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

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

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

}
```

**`Get`**

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

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

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

request = Net::HTTP::Get.new(url)
request["requestToken"] = '<apiKey>'

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

**`Get`**

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

HttpResponse<String> response = Unirest.get("https://api-sandbox.payabli.com/api/Notification/1717")
  .header("requestToken", "<apiKey>")
  .asString();
```

**`Get`**

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-sandbox.payabli.com/api/Notification/1717', [
  'headers' => [
    'requestToken' => '<apiKey>',
  ],
]);

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

**`Get`**

```csharp Get
using RestSharp;

var client = new RestClient("https://api-sandbox.payabli.com/api/Notification/1717");
var request = new RestRequest(Method.GET);
request.AddHeader("requestToken", "<apiKey>");
IRestResponse response = client.Execute(request);
```

**`Get`**

```swift Get
import Foundation

let headers = ["requestToken": "<apiKey>"]

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

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()
```

A successful response returns the details of the notification:

### Response (200)

```json
{
  "content": {
    "fileFormat": "csv",
    "reportName": "Returned"
  },
  "createdAt": "2024-02-21T09:16:31Z",
  "frequency": "weekly",
  "lastUpdated": "2024-02-21T09:16:31Z",
  "method": "report-email",
  "notificationId": 1717,
  "ownerId": "123",
  "ownerName": "The Pilgrim Planner",
  "ownerType": 0,
  "status": 1,
  "target": "admin@business.com"
}
```

## Update a notification

Send a PUT request to `/api/Notification/{notificationId}` to modify an existing notification's configuration. See the [API reference](/api-reference/notification/update-notification) for full documentation.

This example updates a notification to use a different webhook URL and adds a new header parameter:

### Request

PUT [https://api-sandbox.payabli.com/api/Notification/\{nId}](https://api-sandbox.payabli.com/api/Notification/\{nId})

**`Update`**

```curl Update
curl -X PUT https://api-sandbox.payabli.com/api/Notification/1717 \
     -H "requestToken: <apiKey>" \
     -H "Content-Type: application/json" \
     -d '{
  "content": {
    "eventType": "ApprovedPayment"
  },
  "frequency": "untilcancelled",
  "method": "email",
  "ownerId": "136",
  "ownerType": 0,
  "status": 1,
  "target": "newemail@email.com"
}'
```

**`Update`**

```python Update
import requests

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

payload = {
    "content": { "eventType": "ApprovedPayment" },
    "frequency": "untilcancelled",
    "method": "email",
    "ownerId": "136",
    "ownerType": 0,
    "status": 1,
    "target": "newemail@email.com"
}
headers = {
    "requestToken": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

**`Update`**

```javascript Update
const url = 'https://api-sandbox.payabli.com/api/Notification/1717';
const options = {
  method: 'PUT',
  headers: {requestToken: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"content":{"eventType":"ApprovedPayment"},"frequency":"untilcancelled","method":"email","ownerId":"136","ownerType":0,"status":1,"target":"newemail@email.com"}'
};

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

**`Update`**

```go Update
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"content\": {\n    \"eventType\": \"ApprovedPayment\"\n  },\n  \"frequency\": \"untilcancelled\",\n  \"method\": \"email\",\n  \"ownerId\": \"136\",\n  \"ownerType\": 0,\n  \"status\": 1,\n  \"target\": \"newemail@email.com\"\n}")

	req, _ := http.NewRequest("PUT", 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))

}
```

**`Update`**

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

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

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

request = Net::HTTP::Put.new(url)
request["requestToken"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"content\": {\n    \"eventType\": \"ApprovedPayment\"\n  },\n  \"frequency\": \"untilcancelled\",\n  \"method\": \"email\",\n  \"ownerId\": \"136\",\n  \"ownerType\": 0,\n  \"status\": 1,\n  \"target\": \"newemail@email.com\"\n}"

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

**`Update`**

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

HttpResponse<String> response = Unirest.put("https://api-sandbox.payabli.com/api/Notification/1717")
  .header("requestToken", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"content\": {\n    \"eventType\": \"ApprovedPayment\"\n  },\n  \"frequency\": \"untilcancelled\",\n  \"method\": \"email\",\n  \"ownerId\": \"136\",\n  \"ownerType\": 0,\n  \"status\": 1,\n  \"target\": \"newemail@email.com\"\n}")
  .asString();
```

**`Update`**

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api-sandbox.payabli.com/api/Notification/1717', [
  'body' => '{
  "content": {
    "eventType": "ApprovedPayment"
  },
  "frequency": "untilcancelled",
  "method": "email",
  "ownerId": "136",
  "ownerType": 0,
  "status": 1,
  "target": "newemail@email.com"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'requestToken' => '<apiKey>',
  ],
]);

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

**`Update`**

```csharp Update
using RestSharp;

var client = new RestClient("https://api-sandbox.payabli.com/api/Notification/1717");
var request = new RestRequest(Method.PUT);
request.AddHeader("requestToken", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"content\": {\n    \"eventType\": \"ApprovedPayment\"\n  },\n  \"frequency\": \"untilcancelled\",\n  \"method\": \"email\",\n  \"ownerId\": \"136\",\n  \"ownerType\": 0,\n  \"status\": 1,\n  \"target\": \"newemail@email.com\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

**`Update`**

```swift Update
import Foundation

let headers = [
  "requestToken": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "content": ["eventType": "ApprovedPayment"],
  "frequency": "untilcancelled",
  "method": "email",
  "ownerId": "136",
  "ownerType": 0,
  "status": 1,
  "target": "newemail@email.com"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Notification/1717")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
```

A successful response returns the ID of the updated notification as `responseData`:

### Response (200)

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

## Delete a notification

Send a DELETE request to `/api/Notification/{notificationId}` to remove an existing notification. See the [API reference](/api-reference/notification/delete-notification) for full documentation.

This example deletes notification ID `1717`:

### Request

PUT [https://api-sandbox.payabli.com/api/Notification/\{nId}](https://api-sandbox.payabli.com/api/Notification/\{nId})

**`Update`**

```curl Update
curl -X PUT https://api-sandbox.payabli.com/api/Notification/1717 \
     -H "requestToken: <apiKey>" \
     -H "Content-Type: application/json" \
     -d '{
  "content": {
    "eventType": "ApprovedPayment"
  },
  "frequency": "untilcancelled",
  "method": "email",
  "ownerId": "136",
  "ownerType": 0,
  "status": 1,
  "target": "newemail@email.com"
}'
```

**`Update`**

```python Update
import requests

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

payload = {
    "content": { "eventType": "ApprovedPayment" },
    "frequency": "untilcancelled",
    "method": "email",
    "ownerId": "136",
    "ownerType": 0,
    "status": 1,
    "target": "newemail@email.com"
}
headers = {
    "requestToken": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

**`Update`**

```javascript Update
const url = 'https://api-sandbox.payabli.com/api/Notification/1717';
const options = {
  method: 'PUT',
  headers: {requestToken: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"content":{"eventType":"ApprovedPayment"},"frequency":"untilcancelled","method":"email","ownerId":"136","ownerType":0,"status":1,"target":"newemail@email.com"}'
};

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

**`Update`**

```go Update
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"content\": {\n    \"eventType\": \"ApprovedPayment\"\n  },\n  \"frequency\": \"untilcancelled\",\n  \"method\": \"email\",\n  \"ownerId\": \"136\",\n  \"ownerType\": 0,\n  \"status\": 1,\n  \"target\": \"newemail@email.com\"\n}")

	req, _ := http.NewRequest("PUT", 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))

}
```

**`Update`**

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

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

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

request = Net::HTTP::Put.new(url)
request["requestToken"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"content\": {\n    \"eventType\": \"ApprovedPayment\"\n  },\n  \"frequency\": \"untilcancelled\",\n  \"method\": \"email\",\n  \"ownerId\": \"136\",\n  \"ownerType\": 0,\n  \"status\": 1,\n  \"target\": \"newemail@email.com\"\n}"

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

**`Update`**

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

HttpResponse<String> response = Unirest.put("https://api-sandbox.payabli.com/api/Notification/1717")
  .header("requestToken", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"content\": {\n    \"eventType\": \"ApprovedPayment\"\n  },\n  \"frequency\": \"untilcancelled\",\n  \"method\": \"email\",\n  \"ownerId\": \"136\",\n  \"ownerType\": 0,\n  \"status\": 1,\n  \"target\": \"newemail@email.com\"\n}")
  .asString();
```

**`Update`**

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api-sandbox.payabli.com/api/Notification/1717', [
  'body' => '{
  "content": {
    "eventType": "ApprovedPayment"
  },
  "frequency": "untilcancelled",
  "method": "email",
  "ownerId": "136",
  "ownerType": 0,
  "status": 1,
  "target": "newemail@email.com"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'requestToken' => '<apiKey>',
  ],
]);

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

**`Update`**

```csharp Update
using RestSharp;

var client = new RestClient("https://api-sandbox.payabli.com/api/Notification/1717");
var request = new RestRequest(Method.PUT);
request.AddHeader("requestToken", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"content\": {\n    \"eventType\": \"ApprovedPayment\"\n  },\n  \"frequency\": \"untilcancelled\",\n  \"method\": \"email\",\n  \"ownerId\": \"136\",\n  \"ownerType\": 0,\n  \"status\": 1,\n  \"target\": \"newemail@email.com\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

**`Update`**

```swift Update
import Foundation

let headers = [
  "requestToken": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "content": ["eventType": "ApprovedPayment"],
  "frequency": "untilcancelled",
  "method": "email",
  "ownerId": "136",
  "ownerType": 0,
  "status": 1,
  "target": "newemail@email.com"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Notification/1717")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
```

A successful response returns the ID of the deleted notification as `responseData`:

### Response (200)

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