> This is Payabli documentation. For a complete page index, fetch https://docs.payabli.com/llms.txt — append .md to any page URL for lightweight markdown. For section-level indexes, query parameters, and other AI-optimized access methods, see https://docs.payabli.com/ai-agents.md

# Update notification

PUT https://api-sandbox.payabli.com/api/Notification/{nId}
Content-Type: application/json

Update a notification or autogenerated report.

Reference: https://docs.payabli.com/developers/api-reference/notification/update-notification

## Servers

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

## Request

### Path parameters

- `nId` (string, required) — Notification ID.

### Body (application/json)

- `object or object`
  - NotificationStandardRequest
    - `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 those key events. See [Notifications](/developers/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` (object, optional)
      - `eventType` (enum, optional) — The notification's event name.
        - Allowed values: `approvedpayment`, `authorizedpayment`, `declinedpayment`, `fundedpayment`, `originatedpayment`, `refundedpayment`, `settledpayment`, `voidedpayment`, `payin_transaction_onhold`, `payin_transaction_released`, `payin_transaction_recovered`, `payin_transaction_rejected`, `payin_batch_onhold`, `payin_batch_released`, `transfersuccess`, `transferadjusted`, `transferreturn`, `transfererror`, `transferbalanceunavailable`, `transferreadyforretry`, `transferresolved`, `transfersuspended`, `transferdisabledcreditfund`, `transferdisableddebitfund`, `invoicecreated`, `invoicesent`, `invoicepaid`, `subscriptioncreated`, `subscriptionupdated`, `subscriptioncanceled`, `subscriptioncompleted`, `savedmethodupdated`, `nocreceived`, `payout_transaction_voidedcancelled`, `payout_transaction_processing`, `payout_transaction_processed`, `payout_transaction_onhold`, `payout_transaction_released`, `payout_transaction_recovered`, `payout_transaction_authorized`, `payout_transaction_approvedcaptured`, `payout_transaction_declined`, `payout_transaction_technicaldecline`, `payout_transaction_error`, `payout_transaction_paid`, `payout_transaction_returned`, `payout_transaction_rejected`, `payout_transaction_duplicated`, `payout_transaction_funded`, `payout_transaction_reissued`, `payout_batch_settlement_pending`, `payout_batch_settlement_intransit`, `payout_batch_settlement_funded`, `payout_batch_settlement_exception`, `payout_batch_settlement_achreturn`, `payout_batch_paid`, `payout_batch_fundpending`, `payout_batch_closed`, `payout_batch_notclosed`, `payout_batch_cancelled`, `payout_funds_added`, `payout_funds_available`, `payout_funds_returned`, `payout_virtualcard_transaction_accepted`, `payout_virtualcard_transaction_declined`, `payout_ghostcard_transaction_accepted`, `payout_ghostcard_transaction_declined`, `payout_fund_virtualcard_transaction_success`, `payout_fund_virtualcard_transaction_error`, `vcardcreated`, `vcardsent`, `billapproved`, `billdisapproved`, `billpaid`, `billprocessing`, `billsent`, `billcanceled`, `vendor_created`, `vendor_updated`, `vendor_ach_payment_method_created`, `payoutsubscriptioncreated`, `payoutsubscriptionupdated`, `payoutsubscriptionreminder`, `payoutsubscriptioncompleted`, `payoutsubscriptioncanceled`, `payoutsavedmethodupdated`, `payoutnocreceived`, `approvedapplication`, `boardingapplication`, `createdapplication`, `declinedapplication`, `holdingapplication`, `submittedapplication`, `failedboardingapplication`, `activatedmerchant`, `cardupdatercomplete`, `updatedmerchant`, `receivedchargeback`, `chargebackupdated`, `chargebackreversal`, `receivedprearbitration`, `receivedretrieval`, `receivedachreturn`, `fraudalert`, `transactionnotfound`, `importfilereceived`, `importfileprocessed`, `importfileerror`, `exportfilesent`, `exportfileerror`, `exportreportcompleted`, `paypointroutingupdated`, `paypointaccountnocreceived`
      - `internalData` (list of object, optional) — Array of pairs key:value to insert in request body to target in **method** = *web*.
        - `key` (string, optional) — Key name.
        - `value` (string, optional) — Key value.
      - `transactionId` (string, optional, default: 0) — Used internally to reference the entity or object generating the event.
      - `webHeaderParameters` (list of object, optional) — Array of pairs key:value to insert in header of request to target in **method** = *web*.
        - `key` (string, optional) — Key name.
        - `value` (string, optional) — Key value.
    - `ownerId` (integer, optional) — ID for the paypoint or organization that owns the notification. If the `ownerType` field is `0`, this field is the same as the `orgId` for the organization that owns this notification. If the `ownerType` field is `2`, this field is the same as the `paypointId` for the paypoint that owns this notification.
    - `status` (integer, optional) — Status of notification: - `0`: Inactive - `1`: Active
  - NotificationReportRequest
    - `content` (object, required)
      - `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 object, optional) — Array of pairs key:value to insert in request body to target in **method** = *report-web*.
        - `key` (string, optional) — Key name.
        - `value` (string, optional) — Key value.
      - `reportName` (enum, optional) — The kind of 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 object, optional) — Array of pairs key:value to insert in header of request to target in **method** = *report-web*.
        - `key` (string, optional) — Key name.
        - `value` (string, optional) — Key value.
    - `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 reports for daily sales, ACH returns, settlements, and more. You can send these reports via email or via webhook. See [Automated Reports](/developers/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` (integer, optional) — ID for the paypoint or organization that owns the notification. If the `ownerType` field is `0`, this field is the same as the `orgId` for the organization that owns this notification. If the `ownerType` field is `2`, this field is the same as the `paypointId` for the paypoint that owns this notification.
    - `status` (integer, optional) — Status of notification: - `0`: Inactive - `1`: Active

## Response

### 200

Success

- `responseText` (string, required) — Response text for operation: 'Success' or 'Declined'.
- `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](/developers/api-reference/api-responses).
- `responseData` (integer or string, optional) — When the request was successful, this contains the notification ID, or `nID` used to manage the notification.

## Examples

### Update

**Request**

```json
{
  "content": {
    "eventType": "approvedpayment"
  },
  "frequency": "untilcancelled",
  "method": "email",
  "ownerId": 136,
  "ownerType": 0,
  "status": 1,
  "target": "newemail@email.com"
}
```

**Response**

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

**SDK Code**

```typescript Update
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient();
    await client.notification.updateNotification("1717", {
        content: {
            eventType: "approvedpayment",
        },
        frequency: "untilcancelled",
        method: "email",
        ownerId: 136,
        ownerType: 0,
        status: 1,
        target: "newemail@email.com",
    });
}
main();

```

```python Update
from payabli import payabli, NotificationStandardRequest, NotificationStandardRequestContent

client = payabli()

client.notification.update_notification(
    n_id="1717",
    request=NotificationStandardRequest(
        content=NotificationStandardRequestContent(
            event_type="approvedpayment",
        ),
        frequency="untilcancelled",
        method="email",
        owner_id=136,
        owner_type=0,
        status=1,
        target="newemail@email.com",
    ),
)

```

```java Update
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;
import io.github.payabli.api.types.NotificationStandardRequest;
import io.github.payabli.api.types.NotificationStandardRequestContent;
import io.github.payabli.api.types.NotificationStandardRequestContentEventType;
import io.github.payabli.api.types.NotificationStandardRequestFrequency;
import io.github.payabli.api.types.NotificationStandardRequestMethod;
import io.github.payabli.api.types.UpdateNotificationRequest;
import java.util.Optional;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient
            .builder()
            .build();

        client.notification().updateNotification(
            "1717",
            UpdateNotificationRequest.of(
                NotificationStandardRequest
                    .builder()
                    .frequency(NotificationStandardRequestFrequency.UNTILCANCELLED)
                    .method(NotificationStandardRequestMethod.EMAIL)
                    .ownerType(0)
                    .target("newemail@email.com")
                    .content(
                        Optional.of(
                            NotificationStandardRequestContent
                                .builder()
                                .eventType(Optional.of(NotificationStandardRequestContentEventType.APPROVEDPAYMENT))
                                .build()
                        )
                    )
                    .ownerId(Optional.of(136))
                    .status(Optional.of(1))
                    .build()
            )
        );
    }
}
```

```ruby Update
require "payabli"

client = Payabli::Client.new

client.notification.update_notification(
  n_id: "1717",
  content: {},
  frequency: "untilcancelled",
  method_: "email",
  owner_id: 136,
  owner_type: 0,
  status: 1,
  target: "newemail@email.com"
)

```

```csharp Update
using PayabliApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient();

        await client.Notification.UpdateNotificationAsync(
            nId: "1717",
            request: new NotificationStandardRequest {
                Content = new NotificationStandardRequestContent {
                    EventType = NotificationStandardRequestContentEventType.Approvedpayment
                },
                Frequency = NotificationStandardRequestFrequency.Untilcancelled,
                Method = NotificationStandardRequestMethod.Email,
                OwnerId = 136,
                OwnerType = 0,
                Status = 1,
                Target = "newemail@email.com"
            }
        );
    }

}

```

```go Update
package example

import (
    context "context"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
)

func do() {
    client := client.NewClient()
    request := &payabli.UpdateNotificationRequest{
        NotificationStandardRequest: &payabli.NotificationStandardRequest{
            Content: &payabli.NotificationStandardRequestContent{
                EventType: payabli.NotificationStandardRequestContentEventTypeApprovedpayment.Ptr(),
            },
            Frequency: payabli.NotificationStandardRequestFrequencyUntilcancelled,
            Method: payabli.NotificationStandardRequestMethodEmail,
            OwnerId: payabli.Int(
                136,
            ),
            OwnerType: 0,
            Status: payabli.Int(
                1,
            ),
            Target: "newemail@email.com",
        },
    }
    client.Notification.UpdateNotification(
        context.TODO(),
        "1717",
        request,
    )
}

```

```php Update
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\Types\NotificationStandardRequest;
use Payabli\Types\NotificationStandardRequestContent;
use Payabli\Types\NotificationStandardRequestContentEventType;
use Payabli\Types\NotificationStandardRequestFrequency;
use Payabli\Types\NotificationStandardRequestMethod;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->notification->updateNotification(
    '1717',
    new NotificationStandardRequest([
        'content' => new NotificationStandardRequestContent([
            'eventType' => NotificationStandardRequestContentEventType::Approvedpayment->value,
        ]),
        'frequency' => NotificationStandardRequestFrequency::Untilcancelled->value,
        'method' => NotificationStandardRequestMethod::Email->value,
        'ownerId' => 136,
        'ownerType' => 0,
        'status' => 1,
        'target' => 'newemail@email.com',
    ]),
);

```

```swift Update
import Foundation

let headers = ["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()
```

### UpdateWebhook

**Request**

```json
{
  "content": {
    "eventType": "approvedpayment",
    "webHeaderParameters": [
      {
        "key": "Authorization",
        "value": "Basic dXNlcjpwYXNzd29yZA=="
      }
    ]
  },
  "frequency": "untilcancelled",
  "method": "web",
  "ownerId": 136,
  "ownerType": 0,
  "status": 1,
  "target": "https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275"
}
```

**Response**

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

**SDK Code**

```typescript UpdateWebhook
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient();
    await client.notification.updateNotification("1717", {
        content: {
            eventType: "approvedpayment",
            webHeaderParameters: [
                {
                    key: "Authorization",
                    value: "Basic dXNlcjpwYXNzd29yZA==",
                },
            ],
        },
        frequency: "untilcancelled",
        method: "web",
        ownerId: 136,
        ownerType: 0,
        status: 1,
        target: "https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275",
    });
}
main();

```

```python UpdateWebhook
from payabli import payabli, NotificationStandardRequest, NotificationStandardRequestContent, KeyValueDuo

client = payabli()

client.notification.update_notification(
    n_id="1717",
    request=NotificationStandardRequest(
        content=NotificationStandardRequestContent(
            event_type="approvedpayment",
            web_header_parameters=[
                KeyValueDuo(
                    key="Authorization",
                    value="Basic dXNlcjpwYXNzd29yZA==",
                )
            ],
        ),
        frequency="untilcancelled",
        method="web",
        owner_id=136,
        owner_type=0,
        status=1,
        target="https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275",
    ),
)

```

```java UpdateWebhook
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;
import io.github.payabli.api.types.KeyValueDuo;
import io.github.payabli.api.types.NotificationStandardRequest;
import io.github.payabli.api.types.NotificationStandardRequestContent;
import io.github.payabli.api.types.NotificationStandardRequestContentEventType;
import io.github.payabli.api.types.NotificationStandardRequestFrequency;
import io.github.payabli.api.types.NotificationStandardRequestMethod;
import io.github.payabli.api.types.UpdateNotificationRequest;
import java.util.Arrays;
import java.util.Optional;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient
            .builder()
            .build();

        client.notification().updateNotification(
            "1717",
            UpdateNotificationRequest.of(
                NotificationStandardRequest
                    .builder()
                    .frequency(NotificationStandardRequestFrequency.UNTILCANCELLED)
                    .method(NotificationStandardRequestMethod.WEB)
                    .ownerType(0)
                    .target("https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275")
                    .content(
                        Optional.of(
                            NotificationStandardRequestContent
                                .builder()
                                .eventType(Optional.of(NotificationStandardRequestContentEventType.APPROVEDPAYMENT))
                                .webHeaderParameters(
                                    Optional.of(
                                        Arrays.asList(
                                            KeyValueDuo
                                                .builder()
                                                .key("Authorization")
                                                .value("Basic dXNlcjpwYXNzd29yZA==")
                                                .build()
                                        )
                                    )
                                )
                                .build()
                        )
                    )
                    .ownerId(Optional.of(136))
                    .status(Optional.of(1))
                    .build()
            )
        );
    }
}
```

```ruby UpdateWebhook
require "payabli"

client = Payabli::Client.new

client.notification.update_notification(
  n_id: "1717",
  content: {
    web_header_parameters: [{
      key: "Authorization",
      value: "Basic dXNlcjpwYXNzd29yZA=="
    }]
  },
  frequency: "untilcancelled",
  method_: "web",
  owner_id: 136,
  owner_type: 0,
  status: 1,
  target: "https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275"
)

```

```csharp UpdateWebhook
using PayabliApi;
using System.Threading.Tasks;
using System.Collections.Generic;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient();

        await client.Notification.UpdateNotificationAsync(
            nId: "1717",
            request: new NotificationStandardRequest {
                Content = new NotificationStandardRequestContent {
                    EventType = NotificationStandardRequestContentEventType.Approvedpayment,
                    WebHeaderParameters = new List<KeyValueDuo>(){
                        new KeyValueDuo {
                            Key = "Authorization",
                            Value = "Basic dXNlcjpwYXNzd29yZA=="
                        },
                    }

                },
                Frequency = NotificationStandardRequestFrequency.Untilcancelled,
                Method = NotificationStandardRequestMethod.Web,
                OwnerId = 136,
                OwnerType = 0,
                Status = 1,
                Target = "https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275"
            }
        );
    }

}

```

```go UpdateWebhook
package example

import (
    context "context"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
)

func do() {
    client := client.NewClient()
    request := &payabli.UpdateNotificationRequest{
        NotificationStandardRequest: &payabli.NotificationStandardRequest{
            Content: &payabli.NotificationStandardRequestContent{
                EventType: payabli.NotificationStandardRequestContentEventTypeApprovedpayment.Ptr(),
                WebHeaderParameters: []*payabli.KeyValueDuo{
                    &payabli.KeyValueDuo{
                        Key: payabli.String(
                            "Authorization",
                        ),
                        Value: payabli.String(
                            "Basic dXNlcjpwYXNzd29yZA==",
                        ),
                    },
                },
            },
            Frequency: payabli.NotificationStandardRequestFrequencyUntilcancelled,
            Method: payabli.NotificationStandardRequestMethodWeb,
            OwnerId: payabli.Int(
                136,
            ),
            OwnerType: 0,
            Status: payabli.Int(
                1,
            ),
            Target: "https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275",
        },
    }
    client.Notification.UpdateNotification(
        context.TODO(),
        "1717",
        request,
    )
}

```

```php UpdateWebhook
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\Types\NotificationStandardRequest;
use Payabli\Types\NotificationStandardRequestContent;
use Payabli\Types\NotificationStandardRequestContentEventType;
use Payabli\Types\KeyValueDuo;
use Payabli\Types\NotificationStandardRequestFrequency;
use Payabli\Types\NotificationStandardRequestMethod;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->notification->updateNotification(
    '1717',
    new NotificationStandardRequest([
        'content' => new NotificationStandardRequestContent([
            'eventType' => NotificationStandardRequestContentEventType::Approvedpayment->value,
            'webHeaderParameters' => [
                new KeyValueDuo([
                    'key' => 'Authorization',
                    'value' => 'Basic dXNlcjpwYXNzd29yZA==',
                ]),
            ],
        ]),
        'frequency' => NotificationStandardRequestFrequency::Untilcancelled->value,
        'method' => NotificationStandardRequestMethod::Web->value,
        'ownerId' => 136,
        'ownerType' => 0,
        'status' => 1,
        'target' => 'https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275',
    ]),
);

```

```swift UpdateWebhook
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "content": [
    "eventType": "approvedpayment",
    "webHeaderParameters": [
      [
        "key": "Authorization",
        "value": "Basic dXNlcjpwYXNzd29yZA=="
      ]
    ]
  ],
  "frequency": "untilcancelled",
  "method": "web",
  "ownerId": 136,
  "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/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()
```