openapi: 3.0.0
info:
  title: Email
  description: Everything about Email Delivery Receipt Automations
servers:
  - url: https://rest.clicksend.com
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
  schemas:
    pagination:
      type: object
      properties:
        total:
          type: integer
          description: The total number of items available for viewing.
          example: 2
        per_page:
          type: integer
          description: >-
            The number of items returned per page. This is specified in the
            limit parameter. You can have 100 items at maximum, and 15 at
            minimum.
          example: 15
        current_page:
          type: integer
          description: The current page number.
          example: 1
        last_page:
          type: integer
          description: The last page number.
          example: 1
        next_page_url:
          type: string
          nullable: true
          description: >-
            A URL of the next page. It will return **null** if there’s no next
            page.
          example: null
        prev_page_url:
          type: string
          nullable: true
          description: >-
            A URL of the previous page. It will return **null** if there’s no
            previous page.
          example: null
        from:
          type: integer
          description: The number of the first result in the current page.
          example: 1
        to:
          type: integer
          description: The number of the last result in the current page.
          example: 2
    email_delivery_receipt_rule:
      type: object
      properties:
        receipt_rule_id:
          type: integer
          description: The ID of the receipt rule.
          example: 1
        rule_name:
          type: string
          description: The name of the receipt rule.
          example: Email Test Rule
        match_type:
          type: integer
          description: The type of match for the rule.
          example: 0
        action:
          type: string
          description: The action to be taken by the rule.
          example: URL
        action_address:
          type: string
          description: The address associated with the action.
          example: http://yourdomain.com
        enabled:
          type: integer
          description: Indicates whether the rule is enabled.
          example: 1
    view-email-delivery-receipt-rules:
      type: object
      properties:
        http_code:
          type: integer
          description: The HTTP status code of the response.
          example: 200
        response_code:
          type: string
          description: The response code indicating the status of the operation.
          example: SUCCESS
        response_msg:
          type: string
          description: A message describing the outcome of the operation.
          example: Here is your result.
        data:
          allOf:
            - $ref: '#/components/schemas/pagination'
            - type: array
              items:
                $ref: '#/components/schemas/email_delivery_receipt_rule'
    create-email-delivery-receipt-rule:
      type: object
      properties:
        http_code:
          type: integer
          description: The HTTP status code of the response.
          example: 200
        response_code:
          type: string
          description: The response code indicating the status of the operation.
          example: SUCCESS
        response_msg:
          type: string
          description: A message describing the outcome of the operation.
          example: Automation email receipt rule has been created.
        data:
          $ref: '#/components/schemas/email_delivery_receipt_rule'
    view-email-delivery-receipt-rule:
      type: object
      properties:
        http_code:
          type: integer
          description: The HTTP status code of the response.
          example: 200
        response_code:
          type: string
          description: The response code indicating the status of the operation.
          example: SUCCESS
        response_msg:
          type: string
          description: A message describing the outcome of the operation.
          example: Here is your result.
        data:
          $ref: '#/components/schemas/email_delivery_receipt_rule'
    update-email-delivery-receipt-rule:
      type: object
      properties:
        http_code:
          type: integer
          description: The HTTP status code of the response.
          example: 200
        response_code:
          type: string
          description: The response code indicating the status of the operation.
          example: SUCCESS
        response_msg:
          type: string
          description: A message describing the outcome of the operation.
          example: Automation email receipt rule has been updated.
        data:
          $ref: '#/components/schemas/email_delivery_receipt_rule'
    delete-email-delivery-receipt-rule:
      type: object
      properties:
        http_code:
          type: integer
          description: The HTTP status code of the response.
          example: 200
        response_code:
          type: string
          description: The response code indicating the status of the operation.
          example: SUCCESS
        response_msg:
          type: string
          description: A message describing the outcome of the operation.
          example: Automation email receipt rule has been deleted.
        data:
          type: boolean
          example: true
paths:
  /v3/automations/email/receipts:
    get:
      summary: View Email Delivery Receipt Rules
      operationId: view-email-delivery-receipt-rules
      description: >-
        _Get all email delivery receipt automations_


        Get all email delivery receipt automations


        ### Parameters


        | Parameter | In | Type | Required | Description |

        | --- | --- | --- | --- | --- |

        | page | query | integer(int32) | false | Page number |

        | limit | query | integer(int32) | false | Number of records per page |



        Refer to [Status Codes](/#status-codes) for definitions of HTTP status
        code responses.



        <div style="background-color: #FF6A4B; padding: 10px; border-radius:
        8px;">
          <span style="color: white;">This endpoint requires authentication,</span> 
          <a href="/docs/#authentication" style="color: white; text-decoration: underline;">more info...</a>
        </div>
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/view-email-delivery-receipt-rules'
      x-codeSamples:
        - lang: curl
          source: |-
            curl --include \
                 --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
            'https://rest.clicksend.com/v3/automations/email/receipt'
        - lang: PHP
          source: >-
            <?php

            require_once(__DIR__ . '/vendor/autoload.php');


            // Configure HTTP basic authorization: BasicAuth

            $config = ClickSend\Configuration::getDefaultConfiguration()
                          ->setUsername('USERNAME')
                          ->setPassword('API_KEY');

            $apiInstance = new ClickSend\Api\EmailDeliveryReceiptRulesApi(new
            GuzzleHttp\Client(),$config);

            $q = "q_example"; // string | Your keyword or query.

            $page = 1; // int | Page number

            $limit = 10; // int | Number of records per page


            try {
                $result = $apiInstance->emailDeliveryReceiptAutomationsGet($q, $page, $limit);
                print_r($result);
            } catch (Exception $e) {
                echo 'Exception when calling EmailDeliveryReceiptRulesApi->emailDeliveryReceiptAutomationsGet: ', $e->getMessage(), PHP_EOL;
            }

            ?>
        - lang: C#
          source: >-
            using IO.ClickSend.ClickSend.Api;

            using IO.ClickSend.Client;

            using IO.ClickSend.ClickSend.Model;


            var configuration = new Configuration()

            {
                Username = USERNAME, 
                Password = API_KEY  
            };

            var emailDeliveryReceiptRulesApi = new
            EmailDeliveryReceiptRulesApi(configuration);

            var response =
            emailDeliveryReceiptRulesApi.EmailDeliveryReceiptAutomationsGet();
        - lang: Java
          source: |-
            package ClickSend;

            import ClickSend.Api.EmailDeliveryReceiptRulesApi;

            public class view_all_email_delivery_receipt_rule {
              public static void main(String[] args) {
                ApiClient defaultClient = new ApiClient();
                defaultClient.setUsername("USERNAME");
                defaultClient.setPassword("API_KEY");
                EmailDeliveryReceiptRulesApi apiInstance = new EmailDeliveryReceiptRulesApi(defaultClient);
                String q = "q_example"; // String | Your keyword or query.
                Integer page = 1; // Integer | Page number
                Integer limit = 10; // Integer | Number of records per page
                try {
                  String result = apiInstance.emailDeliveryReceiptAutomationsGet(q, page, limit);
                    System.out.println(result);
                } catch (ApiException e) {
                    System.err.println("Exception when calling EmailDeliveryReceiptRulesApi#emailDeliveryReceiptAutomationsGet");
                    e.printStackTrace();
                }
              }
            }
        - lang: Node.js
          source: >-
            var api = require('./api.js');


            var emailDeliveryApi = new
            api.EmailDeliveryReceiptRulesApi("USERNAME", "API_KEY");


            var q = "q_example";

            var page = 1;

            var limit = 10;


            emailDeliveryApi.emailDeliveryReceiptAutomationsGet(q, page,
            limit).then(function(response) {
              console.log(response.body);
            }).catch(function(err){
              console.error(err.body);
            });
        - lang: Ruby
          source: |-
            # load the gem
            require 'clicksend_client'
            require 'json'

            # setup authorization
            ClickSendClient.configure do |config|
              # Configure HTTP basic authorization: BasicAuth
              config.username = 'USERNAME'
              config.password = 'API_KEY'
            end

            api_instance = ClickSendClient::EmailDeliveryReceiptRulesApi.new

            opts = {
              page: 1,  # Integer | Page number
              limit: 10 # Integer | Number of records per page
            }

            begin
              # Get all email delivery receipt automations
              result = api_instance.email_delivery_receipt_automations_get(opts)
              p JSON.parse(result)
            rescue ClickSendClient::ApiError => e
              puts "Exception when calling EmailDeliveryReceiptRulesApi->email_delivery_receipt_automations_get: #{e.response_body}"
            end
        - lang: Python
          source: >-
            from __future__ import print_function

            import clicksend_client

            from clicksend_client.rest import ApiException


            # Configure HTTP basic authorization: BasicAuth

            configuration = clicksend_client.Configuration()

            configuration.username = 'USERNAME'

            configuration.password = 'API_KEY'


            # create an instance of the API class

            api_instance =
            clicksend_client.EmailDeliveryReceiptRulesApi(clicksend_client.ApiClient(configuration))

            page = 1 # int | Page number (optional) (default to 1)

            limit = 10 # int | Number of records per page (optional) (default to
            10)


            try:
                # Get all email delivery receipt automations
                api_response = api_instance.email_delivery_receipt_automations_get(page=page, limit=limit)
                print(api_response)
            except ApiException as e:
                print("Exception when calling EmailDeliveryReceiptRulesApi->email_delivery_receipt_automations_get: %s\n" % e)
        - lang: perl
          source: >-
            use WWW::ClickSendClient::SMSDeliveryReceiptRulesApi;


            my $username = 'YOUR_API_USER_NAME';

            my $password = 'YOUR_API_PASSWORD';


            my $api =
            WWW::ClickSendClient::SMSDeliveryReceiptRulesApi->new(username =>
            $username, password => $password);


            my $json_output = $api->sms_delivery_receipt_automations_get('page'
            => '1' ,'limit' => '10');


            print $json_output;
        - lang: objc
          source: >-
            #import "CSEmailDeliveryReceiptRulesApi.h"


            CSDefaultConfiguration *apiConfig = [CSDefaultConfiguration
            sharedConfig];

            [apiConfig setUsername:@"USERNAME"];

            [apiConfig setPassword:@"PASSWORD"];


            NSNumber *page = [[NSNumber alloc] initWithInt:1];

            NSNumber *limit = [[NSNumber alloc] initWithInt:15];


            CSEmailDeliveryReceiptRulesApi *emailDeliveryReceiptApiInstance =
            [[CSEmailDeliveryReceiptRulesApi alloc] init];

            [emailDeliveryReceiptApiInstance
            emailDeliveryReceiptAutomationsGetWithQ:@"string" page:page
            limit:limit completionHandler:^(NSString *output, NSError *error) {
                if (error) {
                    NSLog(@"Error: %@", error);
                } else {
                    NSLog(@"%@", output);
                }
            }];
        - lang: swift
          source: >-
            import Alamofire


            if let authHeader = Request.authorizationHeader(user: "USERNAME",
            password: "PASSWORD") {
                ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]
            }


            EmailDeliveryReceiptRulesAPI.emailDeliveryReceiptAutomationsGet(q:
            "string", page: 1, limit: 15) { (dataString, error) in
                guard let dataString = dataString else {
                    print(error!)
                    return
                }
                if let data = dataString.data(using: String.Encoding.utf8) {
                    do {
                        if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {
                            print(dictonary)
                        } else {
                            print("Cannot convert the String value to JSON")
                        }
                    } catch let error as NSError {
                        print(error)
                    }
                }
            }
    post:
      summary: Create Email Delivery Receipt Rule
      operationId: create-email-delivery-receipt-rule
      description: >-
        _Create email delivery receipt automations_


        Create email delivery receipt automations


        ### Properties


        | Name | Type | Required | Restrictions | Description |

        | --- | --- | --- | --- | --- |

        | rule_name | string | true | none | Rule Name. |

        | match_type | number | true | none | Match Type. 0=All reports. |

        | action | string | true | none | Action to be taken (AUTO_REPLY,
        EMAIL_USER, EMAIL_FIXED, URL, SMS, POLL, GROUP_SMS, MOVE_CONTACT,
        CREATE_CONTACT, CREATE_CONTACT_PLUS_EMAIL,
        CREATE_CONTACT_PLUS_NAME_EMAIL CREATE_CONTACT_PLUS_NAME, SMPP, NONE). |

        | action_address | string | true | none | Action address. |

        | enabled | number | true | none | Enabled: Disabled=0 or Enabled=1. |



        Refer to [Status Codes](/#status-codes) for definitions of HTTP status
        code responses.



        <div style="background-color: #FF6A4B; padding: 10px; border-radius:
        8px;">
          <span style="color: white;">This endpoint requires authentication,</span> 
          <a href="/docs/#authentication" style="color: white; text-decoration: underline;">more info...</a>
        </div>
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                rule_name:
                  type: string
                match_type:
                  type: integer
                action:
                  type: string
                action_address:
                  type: string
                enabled:
                  type: integer
              example:
                rule_name: My Rule
                match_type: 0
                action: URL
                action_address: http://test.com?test=1234
                enabled: 1
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/create-email-delivery-receipt-rule'
      x-codeSamples:
        - lang: curl
          source: |-
            curl --include \
                 --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
                 --request POST \
                 --header "Content-Type: application/json" \
                 --data-binary "    {
                    \"rule_name\":\"My Rule\",
                    \"match_type\": 0,
                    \"action\":\"URL\",
                    \"action_address\":\"http://yourdomain.com\",
                    \"enabled\":1
                }" \
            'https://rest.clicksend.com/v3/automations/email/receipt'
        - lang: PHP
          source: >-
            <?php

            require_once(__DIR__ . '/vendor/autoload.php');


            // Configure HTTP basic authorization: BasicAuth

            $config = ClickSend\Configuration::getDefaultConfiguration()
                          ->setUsername('USERNAME')
                          ->setPassword('API_KEY');

            $apiInstance = new ClickSend\Api\EmailDeliveryReceiptRulesApi(new
            GuzzleHttp\Client(),$config);

            // \ClickSend\Model\DeliveryReceiptRule | Email delivery receipt
            rule model

            $delivery_receipt_rule = new
            \ClickSend\Model\DeliveryReceiptRule(); 

            $delivery_receipt_rule->setRuleName("my rule");

            $delivery_receipt_rule->setMatchType(0);

            $delivery_receipt_rule->setAction("URL");

            $delivery_receipt_rule->setActionAddress("http://example.com");

            $delivery_receipt_rule->setEnabled(1);


            try {
                $result = $apiInstance->emailDeliveryReceiptAutomationPost($delivery_receipt_rule);
                print_r($result);
            } catch (Exception $e) {
                echo 'Exception when calling EmailDeliveryReceiptRulesApi->emailDeliveryReceiptAutomationPost: ', $e->getMessage(), PHP_EOL;
            }

            ?>
        - lang: C#
          source: >-
            using IO.ClickSend.ClickSend.Api;

            using IO.ClickSend.Client;

            using IO.ClickSend.ClickSend.Model;


            var configuration = new Configuration()

            {
                Username = USERNAME, 
                Password = API_KEY  
            };

            var deliveryIssuesApi = new DeliveryIssuesApi(configuration);

            var response =
            emailDeliveryReceiptRulesApi.EmailDeliveryReceiptAutomationPost(new
            DeliveryReceiptRule(
                ruleName: "RULE_NAME",
                matchType: 0,
                action: "URL",
                actionAddress: "http://yourdomain.com",
                enabled: 1
            ));
        - lang: Java
          source: |-
            package ClickSend;

            import java.math.BigDecimal;
            import ClickSend.Api.EmailDeliveryReceiptRulesApi;
            import ClickSend.Model.DeliveryReceiptRule;

            public class create_email_delivery_receipt_rule {
              public static void main(String[] args) {
                ApiClient defaultClient = new ApiClient();
                defaultClient.setUsername("USERNAME");
                defaultClient.setPassword("API_KEY");
                EmailDeliveryReceiptRulesApi apiInstance = new EmailDeliveryReceiptRulesApi(defaultClient);
                // DeliveryReceiptRule | Email delivery receipt rule model
                DeliveryReceiptRule deliveryReceiptRule = new DeliveryReceiptRule();
                deliveryReceiptRule.ruleName("rulename");
                deliveryReceiptRule.matchType(new BigDecimal(0));
                deliveryReceiptRule.action("URL");
                deliveryReceiptRule.actionAddress("http://yourdomain.com");
                deliveryReceiptRule.enabled(new BigDecimal(1));
                try {
                    String result = apiInstance.emailDeliveryReceiptAutomationPost(deliveryReceiptRule);
                    System.out.println(result);
                } catch (ApiException e) {
                    System.err.println("Exception when calling EmailDeliveryReceiptRulesApi#emailDeliveryReceiptAutomationPost");
                    e.printStackTrace();
                }
              }
            }
        - lang: Node.js
          source: >-
            var api = require('./api.js');


            var emailDeliveryApi = new
            api.EmailDeliveryReceiptRulesApi("USERNAME", "API_KEY");


            var deliveryReceiptRule = new api.DeliveryReceiptRule();


            deliveryReceiptRule.ruleName = "My Rule";

            deliveryReceiptRule.matchType = 0;

            deliveryReceiptRule.actionAddress = "http://example.com";

            deliveryReceiptRule.action = "URL";

            deliveryReceiptRule.enabled = 1;


            emailDeliveryApi.emailDeliveryReceiptAutomationPost(deliveryReceiptRule).then(function(response)
            {
              console.log(response.body);
            }).catch(function(err){
              console.error(err.body);
            });
        - lang: Ruby
          source: |-
            # load the gem
            require 'clicksend_client'
            require 'json'

            # setup authorization
            ClickSendClient.configure do |config|
              # Configure HTTP basic authorization: BasicAuth
              config.username = 'USERNAME'
              config.password = 'API_KEY'
            end

            api_instance = ClickSendClient::EmailDeliveryReceiptRulesApi.new

            # DeliveryReceiptRule | fax delivery receipt rule model
            delivery_receipt_rule = ClickSendClient::DeliveryReceiptRule.new(
              "rule_name": "rule_name",
              "match_type": 1,
              "action": "action",
              "action_address": "action_address",
              "enabled": 1

            begin
              # Create email delivery receipt automations
              result = api_instance.email_delivery_receipt_automation_post(delivery_receipt_rule)
              p JSON.parse(result)
            rescue ClickSendClient::ApiError => e
              puts "Exception when calling EmailDeliveryReceiptRulesApi->email_delivery_receipt_automation_post: #{e.response_body}"
            end
        - lang: Python
          source: >-
            from __future__ import print_function

            import clicksend_client

            from clicksend_client.rest import ApiException


            # Configure HTTP basic authorization: BasicAuth

            configuration = clicksend_client.Configuration()

            configuration.username = 'USERNAME'

            configuration.password = 'API_KEY'


            # create an instance of the API class

            api_instance =
            clicksend_client.EmailDeliveryReceiptRulesApi(clicksend_client.ApiClient(configuration))

            # DeliveryReceiptRule | Email delivery receipt rule model

            delivery_receipt_rule = clicksend_client.DeliveryReceiptRule(
                                    rule_name="My Rule",
                                    match_type=0,
                                    action="URL",
                                    action_address="http://yourdomain.com",
                                    enabled=1) 
            try:
                # Create email delivery receipt automations
                api_response = api_instance.email_delivery_receipt_automation_post(delivery_receipt_rule)
                print(api_response)
            except ApiException as e:
                print("Exception when calling EmailDeliveryReceiptRulesApi->email_delivery_receipt_automation_post: %s\n" % e)
        - lang: perl
          source: >-
            use WWW::ClickSendClient::SMSDeliveryReceiptRulesApi;

            use WWW::ClickSendClient::Object::DeliveryReceiptRule;


            my $username = 'YOUR_API_USER_NAME';

            my $password = 'YOUR_API_PASSWORD';


            my $api =
            WWW::ClickSendClient::SMSDeliveryReceiptRulesApi->new(username =>
            $username, password => $password);


            my %params = (
                'rule_name'      => 'rule_name',
                'match_type'     => '1',
                'action'         => 'EMAIL_FIXED',
                'action_address' => 'test1@test.com',
                'enabled'        => '0'
            );


            my $sms_delivery_obj =
            WWW::ClickSendClient::Object::DeliveryReceiptRule->new(%params);

            my $json_output =
            $api->sms_delivery_receipt_automation_post('delivery_receipt_rule'
            => $sms_delivery_obj);


            print $json_output;
        - lang: objc
          source: >-
            #import "CSEmailDeliveryReceiptRulesApi.h"

            #import "CSDeliveryReceiptRule.h"


            CSDefaultConfiguration *apiConfig = [CSDefaultConfiguration
            sharedConfig];

            [apiConfig setUsername:@"USERNAME"];

            [apiConfig setPassword:@"PASSWORD"];



            CSDeliveryReceiptRule *deliveryReceiptRule = [[CSDeliveryReceiptRule
            alloc] init];

            deliveryReceiptRule.ruleName = @"rule_name";

            deliveryReceiptRule.action = @"SMS";

            deliveryReceiptRule.actionAddress = @"action_anddress";

            deliveryReceiptRule.enabled = @"1";


            "

            CSEmailDeliveryReceiptRulesApi *emailDeliveryReceiptApiInstance =
            [[CSEmailDeliveryReceiptRulesApi alloc] init];

            [emailDeliveryReceiptApiInstance
            emailDeliveryReceiptAutomationPostWithDeliveryReceiptRule:deliveryReceiptRule
            completionHandler:^(NSString *output, NSError *error) {
                if (error) {
                    NSLog(@"Error: %@", error);
                } else {
                    NSLog(@"%@", output);
                }
            }];
        - lang: swift
          source: >-
            import Alamofire


            if let authHeader = Request.authorizationHeader(user: "USERNAME",
            password: "PASSWORD") {
                ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]
            }

            let deliveryReceiptRule = DeliveryReceiptRule(
                                            ruleName: "rulename", 
                                            matchType: 1, 
                                            action: "action", 
                                            actionAddress: "actionAddress", 
                                            enabled: 1
                                        )

            EmailDeliveryReceiptRulesAPI.emailDeliveryReceiptAutomationPost(deliveryReceiptRule:
            deliveryReceiptRule) { (dataString, error) in
                guard let dataString = dataString else {
                    print(error!)
                    return
                }
                if let data = dataString.data(using: String.Encoding.utf8) {
                    do {
                        if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {
                            print(dictonary)
                        } else {
                            print("Cannot convert the String value to JSON")
                        }
                    } catch let error as NSError {
                        print(error)
                    }
                }
            }
  /v3/automations/email/receipts/{receipt_rule_id}:
    get:
      summary: View Email Delivery Receipt Rule
      operationId: view-email-delivery-receipt-rule
      description: >-
        _Get specific email delivery receipt automation_


        Get specific email delivery receipt automation


        ### Parameters


        | Parameter | In | Type | Required | Description |

        | --- | --- | --- | --- | --- |

        | receipt_rule_id | path | integer(int32) | true | Receipt rule id |


        Refer to [Status Codes](/#status-codes) for definitions of HTTP status
        code responses.


        <div style="background-color: #FF6A4B; padding: 10px; border-radius:
        8px;">
          <span style="color: white;">This endpoint requires authentication,</span> 
          <a href="/docs/#authentication" style="color: white; text-decoration: underline;">more info...</a>
        </div>
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: receipt_rule_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/view-email-delivery-receipt-rule'
      x-codeSamples:
        - lang: curl
          source: |-
            curl --include \
                 --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
            'https://rest.clicksend.com/v3/automations/email/receipt/{rule_id}'
        - lang: PHP
          source: >-
            <?php

            require_once(__DIR__ . '/vendor/autoload.php');


            // Configure HTTP basic authorization: BasicAuth

            $config = ClickSend\Configuration::getDefaultConfiguration()
                          ->setUsername('USERNAME')
                          ->setPassword('API_KEY');

            $apiInstance = new ClickSend\Api\EmailDeliveryReceiptRulesApi(new
            GuzzleHttp\Client(),$config);

            $receipt_rule_id = 27; // int | Receipt rule id


            try {
                $result = $apiInstance->emailDeliveryReceiptAutomationGet($receipt_rule_id);
                print_r($result);
            } catch (Exception $e) {
                echo 'Exception when calling EmailDeliveryReceiptRulesApi->emailDeliveryReceiptAutomationGet: ', $e->getMessage(), PHP_EOL;
            }

            ?>
        - lang: C#
          source: >-
            using IO.ClickSend.ClickSend.Api;

            using IO.ClickSend.Client;

            using IO.ClickSend.ClickSend.Model;


            var configuration = new Configuration()

            {
                Username = USERNAME, 
                Password = API_KEY  
            };

            var emailDeliveryReceiptRulesApi = new
            EmailDeliveryReceiptRulesApi(configuration);

            var response =
            emailDeliveryReceiptRulesApi.EmailDeliveryReceiptAutomationGet(RULE_ID);
        - lang: Java
          source: |-
            package ClickSend;

            import ClickSend.Api.EmailDeliveryReceiptRulesApi;

            public class view_specific_email_delivery_receipt_rule {
              public static void main(String[] args) {
                ApiClient defaultClient = new ApiClient();
                defaultClient.setUsername("USERNAME");
                defaultClient.setPassword("API_KEY");
                EmailDeliveryReceiptRulesApi apiInstance = new EmailDeliveryReceiptRulesApi(defaultClient);
                Integer receiptRuleId = 21; // Integer | Receipt rule id
                try {
                    String result = apiInstance.emailDeliveryReceiptAutomationGet(receiptRuleId);
                    System.out.println(result);
                } catch (ApiException e) {
                    System.err.println("Exception when calling EmailDeliveryReceiptRulesApi#emailDeliveryReceiptAutomationGet");
                    e.printStackTrace();
                }
              }
            }
        - lang: Node.js
          source: >-
            var api = require('./api.js');


            var emailDeliveryApi = new
            api.EmailDeliveryReceiptRulesApi("USERNAME", "API_KEY");


            var receiptRuleId = 27;


            emailDeliveryApi.emailDeliveryReceiptAutomationGet(receiptRuleId).then(function(response)
            {
              console.log(response.body);
            }).catch(function(err){
              console.error(err.body);
            });
        - lang: Ruby
          source: |-
            # load the gem
            require 'clicksend_client'
            require 'json'

            # setup authorization
            ClickSendClient.configure do |config|
              # Configure HTTP basic authorization: BasicAuth
              config.username = 'USERNAME'
              config.password = 'API_KEY'
            end

            api_instance = ClickSendClient::EmailDeliveryReceiptRulesApi.new

            receipt_rule_id = 56 # Integer | Receipt rule id

            begin
              # Get specific email delivery receipt automation
              result = api_instance.email_delivery_receipt_automation_get(receipt_rule_id)
              p JSON.parse(result)
            rescue ClickSendClient::ApiError => e
              puts "Exception when calling EmailDeliveryReceiptRulesApi->email_delivery_receipt_automation_get: #{e.response_body}"
            end
        - lang: Python
          source: >-
            from __future__ import print_function

            import clicksend_client

            from clicksend_client.rest import ApiException


            # Configure HTTP basic authorization: BasicAuth

            configuration = clicksend_client.Configuration()

            configuration.username = 'USERNAME'

            configuration.password = 'API_KEY'


            # create an instance of the API class

            api_instance =
            clicksend_client.EmailDeliveryReceiptRulesApi(clicksend_client.ApiClient(configuration))

            receipt_rule_id = 20 # int | Receipt rule id


            try:
                # Get specific email delivery receipt automation
                api_response = api_instance.email_delivery_receipt_automation_get(receipt_rule_id)
                print(api_response)
            except ApiException as e:
                print("Exception when calling EmailDeliveryReceiptRulesApi->email_delivery_receipt_automation_get: %s\n" % e)
        - lang: perl
          source: >-
            use WWW::ClickSendClient::EmailDeliveryReceiptRulesApi;


            my $username = 'YOUR_API_USER_NAME';

            my $password = 'YOUR_API_PASSWORD';


            my $api =
            WWW::ClickSendClient::emailDeliveryReceiptRulesApi->new(username =>
            $username, password => $password);


            my $json_output =
            $api->email_delivery_receipt_automation_get('receipt_rule_id' =>
            '1234');


            print $json_output;
        - lang: objc
          source: >-
            #import "CSEmailDeliveryReceiptRulesApi.h"


            CSDefaultConfiguration *apiConfig = [CSDefaultConfiguration
            sharedConfig];

            [apiConfig setUsername:@"USERNAME"];

            [apiConfig setPassword:@"PASSWORD"];


            NSNumber *receiptRuleId = [[NSNumber alloc] initWithInt:1];


            CSEmailDeliveryReceiptRulesApi *emailDeliveryReceiptApiInstance =
            [[CSEmailDeliveryReceiptRulesApi alloc] init];

            [emailDeliveryReceiptApiInstance
            emailDeliveryReceiptAutomationGetWithReceiptRuleId:receiptRuleId
            completionHandler:^(NSString *output, NSError *error) {
                if (error) {
                    NSLog(@"Error: %@", error);
                } else {
                    NSLog(@"%@", output);
                }
            }];
        - lang: swift
          source: >-
            import Alamofire


            if let authHeader = Request.authorizationHeader(user: "USERNAME",
            password: "PASSWORD") {
                ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]
            }


            EmailDeliveryReceiptRulesAPI.emailDeliveryReceiptAutomationGet(receiptRuleId:
            1) { (dataString, error) in
                guard let dataString = dataString else {
                    print(error!)
                    return
                }
                if let data = dataString.data(using: String.Encoding.utf8) {
                    do {
                        if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {
                            print(dictonary)
                        } else {
                            print("Cannot convert the String value to JSON")
                        }
                    } catch let error as NSError {
                    print(error)
                    }
                }
            }
    put:
      summary: Update Email Delivery Receipt Rule
      operationId: update-email-delivery-receipt-rule
      description: >-
        _Update email delivery receipt automation_


        Update email delivery receipt automation


        ### Parameters


        | Parameter | In | Type | Required | Description |

        | --- | --- | --- | --- | --- |

        | receipt_rule_id | path | integer(int32) | true | Receipt rule id |


        ### Properties


        | Name | Type | Required | Restrictions | Description |

        | --- | --- | --- | --- | --- |

        | rule_name | string | true | none | Rule Name. |

        | match_type | number | true | none | Match Type. 0=All reports. |

        | action | string | true | none | Action to be taken (AUTO_REPLY,
        EMAIL_USER, EMAIL_FIXED, URL, SMS, POLL, GROUP_SMS, MOVE_CONTACT,
        CREATE_CONTACT, CREATE_CONTACT_PLUS_EMAIL,
        CREATE_CONTACT_PLUS_NAME_EMAIL CREATE_CONTACT_PLUS_NAME, SMPP, NONE). |

        | action_address | string | true | none | Action address. |

        | enabled | number | true | none | Enabled: Disabled=0 or Enabled=1. |


        Refer to [Status Codes](/#status-codes) for definitions of HTTP status
        code responses.


        <div style="background-color: #FF6A4B; padding: 10px; border-radius:
        8px;">
          <span style="color: white;">This endpoint requires authentication,</span> 
          <a href="/docs/#authentication" style="color: white; text-decoration: underline;">more info...</a>
        </div>
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                rule_name:
                  type: string
                match_type:
                  type: integer
                action:
                  type: string
                action_address:
                  type: string
                enabled:
                  type: integer
              example:
                rule_name: My Rule
                match_type: 0
                action: URL
                action_address: http://test.com?test=1234
                enabled: 1
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: receipt_rule_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-email-delivery-receipt-rule'
      x-codeSamples:
        - lang: curl
          source: |-
            curl --include \
                 --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
                 --request PUT \
                 --header "Content-Type: application/json" \
                 --data-binary "    {
                    \"rule_name\":\"My Rule\",
                    \"match_type\": 0,
                    \"action\":\"URL\",
                    \"action_address\":\"http://yourdomain.com\",
                    \"enabled\":1
                }" \
            'https://rest.clicksend.com/v3/automations/email/receipt/{rule_id}'
        - lang: PHP
          source: >-
            <?php

            require_once(__DIR__ . '/vendor/autoload.php');


            // Configure HTTP basic authorization: BasicAuth

            $config = ClickSend\Configuration::getDefaultConfiguration()
                          ->setUsername('USERNAME')
                          ->setPassword('API_KEY');

            $apiInstance = new ClickSend\Api\EmailDeliveryReceiptRulesApi(new
            GuzzleHttp\Client(),$config);

            $receipt_rule_id = 27; // int | Receipt rule id

            // \ClickSend\Model\DeliveryReceiptRule | Delivery receipt rule
            model

            $delivery_receipt_rule = new
            \ClickSend\Model\DeliveryReceiptRule(); 

            $delivery_receipt_rule->setRuleName("my rule");

            $delivery_receipt_rule->setMatchType(0);

            $delivery_receipt_rule->setAction("URL");

            $delivery_receipt_rule->setActionAddress("http://example.com");

            $delivery_receipt_rule->setEnabled(1);


            try {
                $result = $apiInstance->emailDeliveryReceiptAutomationPut($receipt_rule_id, $delivery_receipt_rule);
                print_r($result);
            } catch (Exception $e) {
                echo 'Exception when calling EmailDeliveryReceiptRulesApi->emailDeliveryReceiptAutomationPut: ', $e->getMessage(), PHP_EOL;
            }

            ?>
        - lang: C#
          source: >-
            using IO.ClickSend.ClickSend.Api;

            using IO.ClickSend.Client;

            using IO.ClickSend.ClickSend.Model;


            var configuration = new Configuration()

            {
                Username = USERNAME, 
                Password = API_KEY  
            };

            var emailDeliveryReceiptRulesApi = new
            EmailDeliveryReceiptRulesApi(configuration);

            var response =
            emailDeliveryReceiptRulesApi.EmailDeliveryReceiptAutomationPut(RULE_ID,new
            DeliveryReceiptRule(
                ruleName: "New Name",
                matchType:  0,
                action: "URL",
                actionAddress: "https://someaddress.com",
                enabled: 1
            ));
        - lang: Java
          source: |-
            package ClickSend;

            import java.math.BigDecimal;
            import ClickSend.Api.EmailDeliveryReceiptRulesApi;
            import ClickSend.Model.DeliveryReceiptRule;

            public class update_email_delivery_receipt_rule {
              public static void main(String[] args) {
                ApiClient defaultClient = new ApiClient();
                defaultClient.setUsername("USERNAME");
                defaultClient.setPassword("API_KEY");
                EmailDeliveryReceiptRulesApi apiInstance = new EmailDeliveryReceiptRulesApi(defaultClient);
                Integer receiptRuleId = 22; // Integer | Receipt rule id
                // DeliveryReceiptRule | Delivery receipt rule model
                DeliveryReceiptRule deliveryReceiptRule = new DeliveryReceiptRule(); 
                deliveryReceiptRule.ruleName("rulename");
                deliveryReceiptRule.matchType(new BigDecimal(0));
                deliveryReceiptRule.action("URL");
                deliveryReceiptRule.actionAddress("http://yourdomain.com");
                deliveryReceiptRule.enabled(new BigDecimal(1));
                try {
                    String result = apiInstance.emailDeliveryReceiptAutomationPut(receiptRuleId, deliveryReceiptRule);
                    System.out.println(result);
                } catch (ApiException e) {
                    System.err.println("Exception when calling EmailDeliveryReceiptRulesApi#emailDeliveryReceiptAutomationPut");
                    e.printStackTrace();
                }
              }
            }
        - lang: Node.js
          source: >-
            var api = require('./api.js');


            var emailDeliveryApi = new
            api.EmailDeliveryReceiptRulesApi("USERNAME", "API_KEY");


            var deliveryReceiptRule = new api.DeliveryReceiptRule();


            deliveryReceiptRule.ruleName = "My Rule";

            deliveryReceiptRule.matchType = 0;

            deliveryReceiptRule.actionAddress = "http://example.com";

            deliveryReceiptRule.action = "URL";

            deliveryReceiptRule.enabled = 1;


            var receiptRuleId = 26;


            emailDeliveryApi.emailDeliveryReceiptAutomationPut(receiptRuleId,
            deliveryReceiptRule).then(function(response) {
              console.log(response.body);
            }).catch(function(err){
              console.error(err.body);
            });
        - lang: Ruby
          source: |-
            # load the gem
            require 'clicksend_client'
            require 'json'

            # setup authorization
            ClickSendClient.configure do |config|
              # Configure HTTP basic authorization: BasicAuth
              config.username = 'USERNAME'
              config.password = 'API_KEY'
            end

            api_instance = ClickSendClient::EmailDeliveryReceiptRulesApi.new

            receipt_rule_id = 18 # Integer | Receipt rule id

            # DeliveryReceiptRule | fax delivery receipt rule model
            delivery_receipt_rule = ClickSendClient::DeliveryReceiptRule.new(
              "rule_name": "rule_name",
              "match_type": 1,
              "action": "action",
              "action_address": "action_address",
              "enabled": 1
            )

            begin
              # Update email delivery receipt automation
              result = api_instance.email_delivery_receipt_automation_put(receipt_rule_id, delivery_receipt_rule)
              p JSON.parse(result)
            rescue ClickSendClient::ApiError => e
              puts "Exception when calling EmailDeliveryReceiptRulesApi->email_delivery_receipt_automation_put: #{e.response_body}"
            end
        - lang: Python
          source: >-
            from __future__ import print_function

            import clicksend_client

            from clicksend_client.rest import ApiException


            # Configure HTTP basic authorization: BasicAuth

            configuration = clicksend_client.Configuration()

            configuration.username = 'USERNAME'

            configuration.password = 'API_KEY'


            # create an instance of the API class

            api_instance =
            clicksend_client.EmailDeliveryReceiptRulesApi(clicksend_client.ApiClient(configuration))

            receipt_rule_id = 20 # int | Receipt rule id

            # DeliveryReceiptRule | Delivery receipt rule model

            delivery_receipt_rule = clicksend_client.DeliveryReceiptRule(
                                    rule_name="My Updated Rule",
                                    match_type=0,
                                    action="URL",
                                    action_address="http://yourdomain.com",
                                    enabled=1) 

            try:
                # Update email delivery receipt automation
                api_response = api_instance.email_delivery_receipt_automation_put(receipt_rule_id, delivery_receipt_rule)
                print(api_response)
            except ApiException as e:
                print("Exception when calling EmailDeliveryReceiptRulesApi->email_delivery_receipt_automation_put: %s\n" % e)
        - lang: perl
          source: >-
            use WWW::ClickSendClient::SMSDeliveryReceiptRulesApi;

            use WWW::ClickSendClient::Object::DeliveryReceiptRule;


            my $username = 'YOUR_API_USER_NAME';

            my $password = 'YOUR_API_PASSWORD';


            my $api =
            WWW::ClickSendClient::SMSDeliveryReceiptRulesApi->new(username =>
            $username, password => $password);


            my %params = (
                'rule_name'      => 'rule_name',
                'match_type'     => '1',
                'action'         => 'EMAIL_FIXED',
                'action_address' => 'test1@test.com',
                'enabled'        => '0'
            );


            my $sms_delivery_obj =
            WWW::ClickSendClient::Object::DeliveryReceiptRule->new(%params);


            my $json_output =
            $api->sms_delivery_receipt_automation_put('receipt_rule_id' =>
            '1234','delivery_receipt_rule' => $sms_delivery_obj);


            print $json_output;
        - lang: objc
          source: >-
            #import "CSEmailDeliveryReceiptRulesApi.h"


            CSDefaultConfiguration *apiConfig = [CSDefaultConfiguration
            sharedConfig];

            [apiConfig setUsername:@"USERNAME"];

            [apiConfig setPassword:@"PASSWORD"];


            NSNumber *ruleId = [[NSNumber alloc] initWithInt:1];


            CSDeliveryReceiptRule *deliveryReceiptRule = [[CSDeliveryReceiptRule
            alloc] init];

            deliveryReceiptRule.ruleName = @"rule_name";

            deliveryReceiptRule.action = @"SMS";

            deliveryReceiptRule.actionAddress = @"action_anddress";

            deliveryReceiptRule.enabled = @"1";



            CSEmailDeliveryReceiptRulesApi *emailDeliveryReceiptApiInstance =
            [[CSEmailDeliveryReceiptRulesApi alloc] init];

            [emailDeliveryReceiptApiInstance
            emailDeliveryReceiptAutomationPutWithReceiptRuleId:ruleId
            deliveryReceiptRule:deliveryReceiptRule completionHandler:^(NSString
            *output, NSError *error) {
                if (error) {
                    NSLog(@"Error: %@", error);
                } else {
                    NSLog(@"%@", output);
                }
            }];
        - lang: swift
          source: >-
            import Alamofire


            if let authHeader = Request.authorizationHeader(user: "USERNAME",
            password: "PASSWORD") {
                ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]
            }

            let deliveryReceiptRule = DeliveryReceiptRule(
                                        ruleName: "rulename", 
                                        matchType: 1, 
                                        action: "action", 
                                        actionAddress: "actionAddress", 
                                        enabled: 1
                                    )

            EmailDeliveryReceiptRulesAPI.emailDeliveryReceiptAutomationPut(receiptRuleId:
            1, deliveryReceiptRule: deliveryReceiptRule) { (dataString, error)
            in
                guard let dataString = dataString else {
                    print(error!)
                    return
                }
                if let data = dataString.data(using: String.Encoding.utf8) {
                    do {
                        if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {
                            print(dictonary)
                        } else {
                            print("Cannot convert the String value to JSON")
                        }
                    } catch let error as NSError {
                        print(error)
                    }
                }
            }
    delete:
      summary: Delete Email Delivery Receipt Rule
      operationId: delete-email-delivery-receipt-rule
      description: >-
        _Delete email delivery receipt automation_


        Delete email delivery receipt automation


        ### Parameters


        | Parameter | In | Type | Required | Description |

        | --- | --- | --- | --- | --- |

        | receipt_rule_id | path | integer(int32) | true | Receipt rule id |


        Refer to [Status Codes](/#status-codes) for definitions of HTTP status
        code responses.


        This endpoint requires authentication, [more info...](/#authentication)



        Refer to [Status Codes](/#status-codes) for definitions of HTTP status
        code responses.



        <div style="background-color: #FF6A4B; padding: 10px; border-radius:
        8px;">
          <span style="color: white;">This endpoint requires authentication,</span> 
          <a href="/docs/#authentication" style="color: white; text-decoration: underline;">more info...</a>
        </div>
      security:
        - basicAuth: []
      parameters:
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: receipt_rule_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-email-delivery-receipt-rule'
      x-codeSamples:
        - lang: curl
          source: |-
            curl --include \
                 --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
                 --request DELETE \
            'https://rest.clicksend.com/v3/automations/email/receipt/{rule_id}'
        - lang: PHP
          source: >-
            <?php

            require_once(__DIR__ . '/vendor/autoload.php');


            // Configure HTTP basic authorization: BasicAuth

            $config = ClickSend\Configuration::getDefaultConfiguration()
                          ->setUsername('USERNAME')
                          ->setPassword('API_KEY');

            $apiInstance = new ClickSend\Api\EmailDeliveryReceiptRulesApi(new
            GuzzleHttp\Client(),$config);

            $receipt_rule_id = 27; // int | Receipt rule id


            try {
                $result = $apiInstance->emailDeliveryReceiptAutomationDelete($receipt_rule_id);
                print_r($result);
            } catch (Exception $e) {
                echo 'Exception when calling EmailDeliveryReceiptRulesApi->emailDeliveryReceiptAutomationDelete: ', $e->getMessage(), PHP_EOL;
            }

            ?>
        - lang: C#
          source: >-
            using IO.ClickSend.ClickSend.Api;

            using IO.ClickSend.Client;

            using IO.ClickSend.ClickSend.Model;


            var configuration = new Configuration()

            {
                Username = USERNAME, 
                Password = API_KEY  
            };

            var emailDeliveryReceiptRulesApi = new
            EmailDeliveryReceiptRulesApi(configuration);

            var response =
            emailDeliveryReceiptRulesApi.EmailDeliveryReceiptAutomationDelete(RULE_ID);
        - lang: Java
          source: |-
            package ClickSend;

            import ClickSend.Api.EmailDeliveryReceiptRulesApi;

            public class delete_email_delivery_receipt_rule {
              public static void main(String[] args) {
                ApiClient defaultClient = new ApiClient();
                defaultClient.setUsername("USERNAME");
                defaultClient.setPassword("API_KEY");
                EmailDeliveryReceiptRulesApi apiInstance = new EmailDeliveryReceiptRulesApi(defaultClient);
                Integer receiptRuleId = 21; // Integer | Receipt rule id
                try {
                    String result = apiInstance.emailDeliveryReceiptAutomationDelete(receiptRuleId);
                    System.out.println(result);
                } catch (ApiException e) {
                    System.err.println("Exception when calling EmailDeliveryReceiptRulesApi#emailDeliveryReceiptAutomationDelete");
                    e.printStackTrace();
                }
              }
            }
        - lang: Node.js
          source: >-
            var api = require('./api.js');


            var emailDeliveryApi = new
            api.EmailDeliveryReceiptRulesApi("USERNAME", "API_KEY");


            var receiptRuleId = 26;


            emailDeliveryApi.emailDeliveryReceiptAutomationDelete(receiptRuleId).then(function(response)
            {
              console.log(response.body);
            }).catch(function(err){
              console.error(err.body);
            });
        - lang: Ruby
          source: |-
            # load the gem
            require 'clicksend_client'
            require 'json'

            # setup authorization
            ClickSendClient.configure do |config|
              # Configure HTTP basic authorization: BasicAuth
              config.username = 'USERNAME'
              config.password = 'API_KEY'
            end

            api_instance = ClickSendClient::EmailDeliveryReceiptRulesApi.new

            receipt_rule_id = 56 # Integer | Receipt rule id

            begin
              # Delete email delivery receipt automation
              result = api_instance.email_delivery_receipt_automation_delete(receipt_rule_id)
              p JSON.parse(result)
            rescue ClickSendClient::ApiError => e
              puts "Exception when calling EmailDeliveryReceiptRulesApi->email_delivery_receipt_automation_delete: #{e.response_body}"
            end
        - lang: Python
          source: >-
            from __future__ import print_function

            import clicksend_client

            from clicksend_client.rest import ApiException


            # Configure HTTP basic authorization: BasicAuth

            configuration = clicksend_client.Configuration()

            configuration.username = 'USERNAME'

            configuration.password = 'API_KEY'


            # create an instance of the API class

            api_instance =
            clicksend_client.EmailDeliveryReceiptRulesApi(clicksend_client.ApiClient(configuration))

            receipt_rule_id = 20 # int | Receipt rule id


            try:
                # Delete email delivery receipt automation
                api_response = api_instance.email_delivery_receipt_automation_delete(receipt_rule_id)
                print(api_response)
            except ApiException as e:
                print("Exception when calling EmailDeliveryReceiptRulesApi->email_delivery_receipt_automation_delete: %s\n" % e)
        - lang: perl
          source: >-
            use WWW::ClickSendClient::SMSDeliveryReceiptRulesApi;


            my $username = 'YOUR_API_USER_NAME';

            my $password = 'YOUR_API_PASSWORD';


            my $api =
            WWW::ClickSendClient::SMSDeliveryReceiptRulesApi->new(username =>
            $username, password => $password);


            my $json_output =
            $api->sms_delivery_receipt_automation_delete('receipt_rule_id' =>
            '1234');


            print $json_output;
        - lang: objc
          source: >-
            #import "CSEmailDeliveryReceiptRulesApi.h"


            CSDefaultConfiguration *apiConfig = [CSDefaultConfiguration
            sharedConfig];

            [apiConfig setUsername:@"USERNAME"];

            [apiConfig setPassword:@"PASSWORD"];


            NSNumber *ruleId = [[NSNumber alloc] initWithInt:1];

            CSEmailDeliveryReceiptRulesApi *emailDeliveryReceiptApiInstance =
            [[CSEmailDeliveryReceiptRulesApi alloc] init];

            [emailDeliveryReceiptApiInstance
            emailDeliveryReceiptAutomationDeleteWithReceiptRuleId:ruleId
            completionHandler:^(NSString *output, NSError *error) {
                if (error) {
                    NSLog(@"Error: %@", error);
                } else {
                    NSLog(@"%@", output);
                }
            }];
        - lang: swift
          source: >-
            import Alamofire


            if let authHeader = Request.authorizationHeader(user: "USERNAME",
            password: "PASSWORD") {
                ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]
            }

            EmailDeliveryReceiptRulesAPI.emailDeliveryReceiptAutomationDelete(receiptRuleId:
            1) { (dataString, error) in
                guard let dataString = dataString else {
                    print(error!)
                    return
                }
                if let data = dataString.data(using: String.Encoding.utf8) {
                    do {
                        if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {
                            print(dictonary)
                        } else {
                            print("Cannot convert the String value to JSON")
                        }
                    } catch let error as NSError {
                        print(error)
                    }
                }
            }
