# Create notification POST https://api-sandbox.payabli.com/api/Notification Content-Type: application/json Create a new notification or autogenerated report. Reference: https://docs.payabli.com/developers/api-reference/notification/add-notification ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Add notification version: endpoint_notification.AddNotification paths: /Notification: post: operationId: add-notification summary: Add notification description: 'Create a new notification or autogenerated report. ' tags: - - subpackage_notification parameters: - name: requestToken in: header required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/type_:PayabliApiResponseNotifications' '400': description: Bad request/ invalid data content: {} '401': description: Unauthorized request. content: {} '500': description: Internal API Error content: {} '503': description: Database connection error content: {} requestBody: content: application/json: schema: $ref: '#/components/schemas/type_notification:AddNotificationRequest' components: schemas: type_:NotificationStandardRequestContentEventType: type: string enum: - value: payin_transaction_initiated - value: payin_transaction_authorized - value: payin_transaction_approvedcaptured - value: payin_transaction_declined - value: payin_transaction_technicaldecline - value: payin_transaction_failed - value: payin_transaction_error - value: payin_transaction_paid - value: payin_transaction_returned - value: payin_transaction_rejected - value: payin_transaction_voidedcancelled - value: payin_transaction_processing - value: payin_transaction_processed - value: payin_transaction_onhold - value: payin_transaction_released - value: payin_transaction_recovered - value: payout_transaction_initiated - value: payout_transaction_authorized - value: payout_transaction_approvedcaptured - value: payout_transaction_declined - value: payout_transaction_technicaldecline - value: payout_transaction_failed - value: payout_transaction_error - value: payout_transaction_paid - value: payout_transaction_returned - value: payout_transaction_rejected - value: payout_transaction_voidedcancelled - value: payout_transaction_processing - value: payout_transaction_processed - value: payout_transaction_onhold - value: payout_transaction_released - value: payout_transaction_recovered - value: payin_batch_open - value: payin_batch_onhold - value: payin_batch_released - value: payin_batch_processed - value: payin_batch_paid - value: payin_batch_funded - value: payin_batch_closed - value: payin_batch_notclosed - value: payin_batch_fundpending - value: payin_batch_cancelled - value: payin_batch_transferred - value: payin_batch_resolved - value: payout_batch_open - value: payout_batch_onhold - value: payout_batch_released - value: payout_batch_processed - value: payout_batch_paid - value: payout_batch_funded - value: payout_batch_closed - value: payout_batch_notclosed - value: payout_batch_fundpending - value: payout_batch_cancelled - value: payout_batch_transferred - value: payout_batch_resolved - value: payin_batch_settlement_pending - value: payin_batch_settlement_intransit - value: payin_batch_settlement_transferred - value: payin_batch_settlement_funded - value: payin_batch_settlement_resolved - value: payin_batch_settlement_exception - value: payin_batch_settlement_achreturn - value: payin_batch_settlement_held - value: payin_batch_settlement_released - value: payout_batch_settlement_pending - value: payout_batch_settlement_intransit - value: payout_batch_settlement_transferred - value: payout_batch_settlement_funded - value: payout_batch_settlement_resolved - value: payout_batch_settlement_exception - value: payout_batch_settlement_achreturn - value: payout_batch_settlement_held - value: payout_batch_settlement_released - value: ApprovedPayment - value: AuthorizedPayment - value: DeclinedPayment - value: OriginatedPayment - value: SettledPayment - value: SubscriptionCreated - value: SubscriptionUpdated - value: SubscriptionCanceled - value: SubscriptionCompleted - value: FundedPayment - value: VoidedPayment - value: RefundedPayment - value: HoldTransaction - value: ReleasedTransaction - value: HoldBatch - value: ReleasedBatch - value: TransferAdjusted - value: TransferDisabledCreditFund - value: TransferDisabledDebitFund - value: TransferNotAvailableBalance - value: TransferReadyforRetry - value: TransferResolved - value: TransferReturn - value: TransferSuccess - value: TransferSuspended - value: TransferError - value: SendReceipt - value: RecoveredTransaction - value: CreatedApplication - value: ApprovedApplication - value: FailedBoardingApplication - value: SubmittedApplication - value: UnderWritingApplication - value: ActivatedMerchant - value: ReceivedChargeBack - value: ChargebackUpdated - value: ReceivedRetrieval - value: RetrievalUpdated - value: ReceivedAchReturn - value: HoldingApplication - value: DeclinedApplication - value: BoardingApplication - value: PaypointMoved - value: FraudAlert - value: InvoiceSent - value: InvoicePaid - value: InvoiceCreated - value: BillPaid - value: BillApproved - value: BillDisApproved - value: BillCanceled - value: BillProcessing - value: CardCreated - value: CardActivated - value: CardDeactivated - value: CardExpired - value: CardExpiring - value: CardLimitUpdated - value: BatchClosed - value: BatchNotClosed - value: PayOutFunded - value: PayOutProcessed - value: PayOutCanceled - value: PayOutPaid - value: PayOutReturned - value: PayoutSubscriptionCreated - value: PayoutSubscriptionUpdated - value: PayoutSubscriptionCanceled - value: PayoutSubscriptionCompleted - value: PayoutSubscriptionReminder - value: importFileReceived - value: importFileProcessed - value: importFileError - value: exportFileSent - value: exportFileError - value: UpdatedMerchant - value: Report - value: FailedEmailNotification - value: FailedWebNotification - value: FailedSMSNotification - value: UserPasswordExpiring - value: UserPasswordExpired - value: TransactionNotFound - value: SystemAlert type_:KeyValueDuo: type: object properties: key: type: string description: Key name. value: type: string description: Key value. type_:NotificationStandardRequestContent: type: object properties: eventType: $ref: >- #/components/schemas/type_:NotificationStandardRequestContentEventType description: The notification's event name. internalData: type: array items: $ref: '#/components/schemas/type_:KeyValueDuo' description: >- Array of pairs key:value to insert in request body to target in **method** = *web*. transactionId: type: string default: '0' description: >- Used internally to reference the entity or object generating the event. webHeaderParameters: type: array items: $ref: '#/components/schemas/type_:KeyValueDuo' description: >- Array of pairs key:value to insert in header of request to target in **method** = *web*. type_:NotificationStandardRequestFrequency: type: string enum: - value: one-time - value: untilcancelled type_:NotificationStandardRequestMethod: type: string enum: - value: email - value: sms - value: web type_:Ownerid: type: string type_:Ownertype: type: integer type_:Statusnotification: type: integer type_:NotificationStandardRequest: type: object properties: content: $ref: '#/components/schemas/type_:NotificationStandardRequestContent' frequency: $ref: '#/components/schemas/type_:NotificationStandardRequestFrequency' method: $ref: '#/components/schemas/type_:NotificationStandardRequestMethod' description: >- 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](/developers/developer-guides/notifications-and-webhooks-overview#notifications) for more. ownerId: $ref: '#/components/schemas/type_:Ownerid' ownerType: $ref: '#/components/schemas/type_:Ownertype' status: $ref: '#/components/schemas/type_:Statusnotification' target: type: string description: >- 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. required: - frequency - method - ownerType - target type_:NotificationReportRequestContentFileFormat: type: string enum: - value: json - value: csv - value: xlsx type_:NotificationReportRequestContentReportName: type: string enum: - value: Transaction - value: Settlement - value: Boarding - value: Returned type_:Timezone: type: integer type_:NotificationReportRequestContent: type: object properties: eventType: type: string enum: - type: stringLiteral value: Report description: The notification's event name. fileFormat: $ref: >- #/components/schemas/type_:NotificationReportRequestContentFileFormat description: Indicate the format of report file to be generated by the engine. internalData: type: array items: $ref: '#/components/schemas/type_:KeyValueDuo' description: >- Array of pairs key:value to insert in request body to target in **method** = *report-web*. reportName: $ref: >- #/components/schemas/type_:NotificationReportRequestContentReportName description: The kind report to generate. timeZone: $ref: '#/components/schemas/type_:Timezone' transactionId: type: string default: '0' description: >- Used internally to reference the entity or object generating the event. webHeaderParameters: type: array items: $ref: '#/components/schemas/type_:KeyValueDuo' description: >- Array of pairs key:value to insert in header of request to target in **method** = *report-web*. type_:NotificationReportRequestFrequency: type: string enum: - value: one-time - value: daily - value: weekly - value: biweekly - value: monthly - value: quarterly - value: semiannually - value: annually type_:NotificationReportRequestMethod: type: string enum: - value: report-email - value: report-web type_:NotificationReportRequest: type: object properties: content: $ref: '#/components/schemas/type_:NotificationReportRequestContent' frequency: $ref: '#/components/schemas/type_:NotificationReportRequestFrequency' method: $ref: '#/components/schemas/type_:NotificationReportRequestMethod' description: >- 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 [Automated Reports](/developers/developer-guides/notifications-and-webhooks-overview#automated-reports) for more. ownerId: $ref: '#/components/schemas/type_:Ownerid' ownerType: $ref: '#/components/schemas/type_:Ownertype' status: $ref: '#/components/schemas/type_:Statusnotification' target: type: string description: >- 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. required: - content - frequency - method - ownerType - target type_notification:AddNotificationRequest: oneOf: - $ref: '#/components/schemas/type_:NotificationStandardRequest' - $ref: '#/components/schemas/type_:NotificationReportRequest' type_:IsSuccess: type: boolean type_:PageIdentifier: type: string type_:Responsecode: type: integer type_:PayabliApiResponseNotificationsResponseData: oneOf: - type: integer - type: string type_:ResponseText: type: string type_:PayabliApiResponseNotifications: type: object properties: isSuccess: $ref: '#/components/schemas/type_:IsSuccess' description: >- If `isSuccess` = true, `responseData` contains the notification identifier. If `isSuccess` = false, `responseData` contains the reason for the error. pageIdentifier: $ref: '#/components/schemas/type_:PageIdentifier' responseCode: $ref: '#/components/schemas/type_:Responsecode' responseData: $ref: >- #/components/schemas/type_:PayabliApiResponseNotificationsResponseData description: >- When the request was successful, this contains the notification ID, or `nID` used to manage the notification. responseText: $ref: '#/components/schemas/type_:ResponseText' required: - responseText ``` ## SDK Code Examples ```python Webhook from payabli import ( NotificationStandardRequest, NotificationStandardRequestContent, payabli, ) client = payabli( api_key="YOUR_API_KEY", ) client.notification.add_notification( request=NotificationStandardRequest( content=NotificationStandardRequestContent( event_type="CreatedApplication", ), frequency="untilcancelled", method="web", owner_id="236", owner_type=0, status=1, target="https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275", ), ) ``` ```typescript Webhook import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.notification.addNotification({ content: { eventType: "CreatedApplication" }, frequency: "untilcancelled", method: "web", ownerId: "236", ownerType: 0, status: 1, target: "https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275" }); ``` ```go Webhook import ( context "context" option "github.com/payabli/sdk-go/option" sdkgo "github.com/payabli/sdk-go" sdkgoclient "github.com/payabli/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "", ), ) response, err := client.Notification.AddNotification( context.TODO(), &sdkgo.AddNotificationRequest{ NotificationStandardRequest: &sdkgo.NotificationStandardRequest{ Content: &sdkgo.NotificationStandardRequestContent{ EventType: sdkgo.NotificationStandardRequestContentEventTypeCreatedApplication, }, Frequency: sdkgo.NotificationStandardRequestFrequencyUntilcancelled, Method: sdkgo.NotificationStandardRequestMethodWeb, OwnerId: sdkgo.String( "236", ), OwnerType: 0, Status: sdkgo.Int( 1, ), Target: "https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275", }, }, ) ``` ```csharp Webhook using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.Notification.AddNotificationAsync( new NotificationStandardRequest { Content = new NotificationStandardRequestContent { EventType = NotificationStandardRequestContentEventType.CreatedApplication, }, Frequency = NotificationStandardRequestFrequency.Untilcancelled, Method = NotificationStandardRequestMethod.Web, OwnerId = "236", OwnerType = 0, Status = 1, Target = "https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275", } ); ``` ```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"] = '' 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 HttpResponse response = Unirest.post("https://api-sandbox.payabli.com/api/Notification") .header("requestToken", "") .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 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' => '', ], ]); echo $response->getBody(); ``` ```swift Webhook import Foundation let headers = [ "requestToken": "", "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() ``` ```python ApprovedPayment from payabli import ( NotificationStandardRequest, NotificationStandardRequestContent, payabli, ) client = payabli( api_key="YOUR_API_KEY", ) client.notification.add_notification( request=NotificationStandardRequest( content=NotificationStandardRequestContent( event_type="ApprovedPayment", ), frequency="untilcancelled", method="web", owner_id="236", owner_type=0, status=1, target="https://cfe9dc390ce2.ngrok-free.app/webhook", ), ) ``` ```typescript ApprovedPayment import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.notification.addNotification({ content: { eventType: "ApprovedPayment" }, frequency: "untilcancelled", method: "web", ownerId: "236", ownerType: 0, status: 1, target: "https://cfe9dc390ce2.ngrok-free.app/webhook" }); ``` ```go ApprovedPayment import ( context "context" option "github.com/payabli/sdk-go/option" sdkgo "github.com/payabli/sdk-go" sdkgoclient "github.com/payabli/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "", ), ) response, err := client.Notification.AddNotification( context.TODO(), &sdkgo.AddNotificationRequest{ NotificationStandardRequest: &sdkgo.NotificationStandardRequest{ Content: &sdkgo.NotificationStandardRequestContent{ EventType: sdkgo.NotificationStandardRequestContentEventTypeCreatedApplication, }, Frequency: sdkgo.NotificationStandardRequestFrequencyUntilcancelled, Method: sdkgo.NotificationStandardRequestMethodWeb, OwnerId: sdkgo.String( "236", ), OwnerType: 0, Status: sdkgo.Int( 1, ), Target: "https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275", }, }, ) ``` ```csharp ApprovedPayment using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.Notification.AddNotificationAsync( new NotificationStandardRequest { Content = new NotificationStandardRequestContent { EventType = NotificationStandardRequestContentEventType.ApprovedPayment, }, Frequency = NotificationStandardRequestFrequency.Untilcancelled, Method = NotificationStandardRequestMethod.Web, OwnerId = "236", OwnerType = 0, Status = 1, Target = "https://cfe9dc390ce2.ngrok-free.app/webhook", } ); ``` ```ruby ApprovedPayment 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"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"content\": {\n \"eventType\": \"ApprovedPayment\"\n },\n \"frequency\": \"untilcancelled\",\n \"method\": \"web\",\n \"ownerId\": \"236\",\n \"ownerType\": 0,\n \"status\": 1,\n \"target\": \"https://cfe9dc390ce2.ngrok-free.app/webhook\"\n}" response = http.request(request) puts response.read_body ``` ```java ApprovedPayment HttpResponse response = Unirest.post("https://api-sandbox.payabli.com/api/Notification") .header("requestToken", "") .header("Content-Type", "application/json") .body("{\n \"content\": {\n \"eventType\": \"ApprovedPayment\"\n },\n \"frequency\": \"untilcancelled\",\n \"method\": \"web\",\n \"ownerId\": \"236\",\n \"ownerType\": 0,\n \"status\": 1,\n \"target\": \"https://cfe9dc390ce2.ngrok-free.app/webhook\"\n}") .asString(); ``` ```php ApprovedPayment request('POST', 'https://api-sandbox.payabli.com/api/Notification', [ 'body' => '{ "content": { "eventType": "ApprovedPayment" }, "frequency": "untilcancelled", "method": "web", "ownerId": "236", "ownerType": 0, "status": 1, "target": "https://cfe9dc390ce2.ngrok-free.app/webhook" }', 'headers' => [ 'Content-Type' => 'application/json', 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```swift ApprovedPayment import Foundation let headers = [ "requestToken": "", "Content-Type": "application/json" ] let parameters = [ "content": ["eventType": "ApprovedPayment"], "frequency": "untilcancelled", "method": "web", "ownerId": "236", "ownerType": 0, "status": 1, "target": "https://cfe9dc390ce2.ngrok-free.app/webhook" ] 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() ``` ```python ReportExample from payabli import ( NotificationReportRequest, NotificationReportRequestContent, payabli, ) client = payabli( api_key="YOUR_API_KEY", ) client.notification.add_notification( request=NotificationReportRequest( content=NotificationReportRequestContent( file_format="json", report_name="Transaction", time_zone=-5, transaction_id="0", ), frequency="biweekly", method="report-email", owner_id="236", owner_type=0, status=1, target="admin@example.com", ), ) ``` ```typescript ReportExample import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.notification.addNotification({ 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" }); ``` ```go ReportExample import ( context "context" option "github.com/payabli/sdk-go/option" sdkgo "github.com/payabli/sdk-go" sdkgoclient "github.com/payabli/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "", ), ) response, err := client.Notification.AddNotification( context.TODO(), &sdkgo.AddNotificationRequest{ NotificationStandardRequest: &sdkgo.NotificationStandardRequest{ Content: &sdkgo.NotificationStandardRequestContent{ EventType: sdkgo.NotificationStandardRequestContentEventTypeCreatedApplication, }, Frequency: sdkgo.NotificationStandardRequestFrequencyUntilcancelled, Method: sdkgo.NotificationStandardRequestMethodWeb, OwnerId: sdkgo.String( "236", ), OwnerType: 0, Status: sdkgo.Int( 1, ), Target: "https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275", }, }, ) ``` ```csharp ReportExample using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.Notification.AddNotificationAsync( new NotificationReportRequest { Content = new NotificationReportRequestContent { EventType = "Report", FileFormat = NotificationReportRequestContentFileFormat.Json, ReportName = NotificationReportRequestContentReportName.Transaction, TimeZone = -5, TransactionId = "0", }, Frequency = NotificationReportRequestFrequency.Biweekly, Method = NotificationReportRequestMethod.ReportEmail, OwnerId = "236", OwnerType = 0, Status = 1, Target = "admin@example.com", } ); ``` ```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"] = '' 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 HttpResponse response = Unirest.post("https://api-sandbox.payabli.com/api/Notification") .header("requestToken", "") .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 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' => '', ], ]); echo $response->getBody(); ``` ```swift ReportExample import Foundation let headers = [ "requestToken": "", "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() ```