{
  "openapi": "3.0.0",
  "info": {
    "title": "Email",
    "description": "Everything about sending Emails\n\nWe're no longer offering Transactional Email to new customers. \nFor a great alternative, use our sister company, Mailgun. \nYou can find their best-in-class service here: [https://mailgun.com](https://www.mailgun.com/)\n"
  },
  "servers": [
    {
      "url": "https://rest.clicksend.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    },
    "schemas": {
      "attachment": {
        "type": "object",
        "properties": {
          "file_name": {
            "type": "string",
            "description": "The name of the attached file."
          },
          "content_type": {
            "type": "string",
            "description": "The MIME type of the attached file."
          },
          "content_disposition": {
            "type": "string",
            "description": "The content disposition of the attached file."
          },
          "content_id": {
            "type": "string",
            "description": "The content ID of the attached file."
          },
          "_attachment_file_url": {
            "type": "string",
            "format": "uri",
            "description": "The URL to download the attached file."
          }
        }
      },
      "currency": {
        "type": "object",
        "description": "The parameters related to currency.",
        "properties": {
          "currency_name_short": {
            "type": "string",
            "description": "The currency used for the sender in three-letter format (e.g. USD, EUR, AUD, NZD, etc).",
            "example": "AUD"
          },
          "currency_prefix_d": {
            "type": "string",
            "description": "The symbol used to indicate the currency of the sender (e.g. $ , €, etc).",
            "example": "$"
          },
          "currency_prefix_c": {
            "type": "string",
            "description": "The currency basic unit (e.g. cents).",
            "example": "c"
          },
          "currency_name_long": {
            "type": "string",
            "description": "The full name of the currency.",
            "example": "Australian Dollars"
          },
          "min_recharge_amount": {
            "type": "string",
            "description": "The minimum amount that can be used to recharge the account, in this currency.",
            "example": "20.00"
          },
          "max_recharge_amount": {
            "type": "string",
            "description": "The maximum amount that can be used to recharge the account, in this currency.",
            "example": "10000.00"
          }
        }
      },
      "transactional_email": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "integer",
            "description": "The ID of the user.",
            "example": 1
          },
          "subaccount_id": {
            "type": "integer",
            "description": "The ID of the subaccount.",
            "example": 1
          },
          "from_email_address_id": {
            "type": "integer",
            "description": "The ID of the from email address.",
            "example": 1
          },
          "from_name": {
            "type": "string",
            "description": "The name of the sender.",
            "example": "Joanne Doe"
          },
          "to": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string",
                  "description": "The email address of the recipient."
                },
                "name": {
                  "type": "string",
                  "description": "The name of the recipient."
                }
              }
            },
            "example": [
              {
                "email": "test@clicksend.com",
                "name": "John Doe"
              }
            ]
          },
          "cc": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string",
                  "description": "The email address of the CC recipient."
                },
                "name": {
                  "type": "string",
                  "description": "The name of the CC recipient."
                }
              }
            },
            "example": [
              {
                "email": "test2@clicksend.com",
                "name": "Jane Doe"
              }
            ]
          },
          "bcc": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string",
                  "description": "The email address of the BCC recipient."
                },
                "name": {
                  "type": "string",
                  "description": "The name of the BCC recipient."
                }
              }
            },
            "example": [
              {
                "email": "test3@clicksend.com",
                "name": "Joseph Doe"
              }
            ]
          },
          "subject": {
            "type": "string",
            "description": "The subject of the email.",
            "example": "Test subject"
          },
          "body": {
            "type": "string",
            "description": "The HTML body of the email.",
            "example": "Lorem ipsum"
          },
          "body_plain_text": {
            "type": "string",
            "description": "The plain text body of the email.",
            "example": "Lorem ipsum"
          },
          "schedule": {
            "type": "integer",
            "description": "The timestamp indicating the scheduled time of the email.",
            "example": 1507018182
          },
          "message_id": {
            "type": "string",
            "description": "The ID of the email message.",
            "example": "21C632C1-3FCC-4EFF-8191-6079244F0142"
          },
          "status": {
            "type": "string",
            "description": "The status of the email.",
            "example": "WaitApproval"
          },
          "status_text": {
            "type": "string",
            "description": "The text description of the email status.",
            "example": "Accepted for delivery"
          },
          "soft_bounce_count": {
            "type": "integer",
            "description": "The count of soft bounces.",
            "example": 0
          },
          "hard_bounce_count": {
            "type": "integer",
            "description": "The count of hard bounces.",
            "example": 0
          },
          "price": {
            "type": "string",
            "description": "The price of the email.",
            "example": "0.0050"
          },
          "date_added": {
            "type": "integer",
            "description": "The timestamp indicating when the email was added.",
            "example": 1507018182
          },
          "custom_string": {
            "type": "string",
            "nullable": true,
            "description": "A custom string.",
            "example": null
          },
          "_attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/attachment"
            },
            "example": [
              {
                "file_name": "text.txt",
                "content_type": "text/plain",
                "content_disposition": "attachment",
                "content_id": "text",
                "_attachment_file_url": "https://rest.clicksend.com/files/3C2284DC-7C37-47BA-8C95-3F12A4B987B7.txt"
              }
            ]
          },
          "_currency": {
            "$ref": "#/components/schemas/currency",
            "example": {
              "currency_name_short": "GBP",
              "currency_prefix_d": "£",
              "currency_prefix_c": "p",
              "currency_name_long": "British Pounds"
            }
          }
        }
      },
      "send-email": {
        "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": "Transactional email queued for delivery."
          },
          "data": {
            "$ref": "#/components/schemas/transactional_email"
          }
        }
      },
      "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
          }
        }
      },
      "calculate-email-price": {
        "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's your price."
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/pagination"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/transactional_email"
                }
              }
            ]
          }
        }
      },
      "view-email-history": {
        "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/transactional_email"
                }
              }
            ]
          }
        }
      },
      "export-email-history": {
        "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": "Download your file here."
          },
          "data": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "description": "The URL of the exported file.",
                "example": "https://rest.clicksend.com/files/22D55AF9-6CF0-476D-A8B3-82A998FD2738?filename=export.csv"
              }
            }
          }
        }
      },
      "email_address": {
        "type": "object",
        "properties": {
          "email_address_id": {
            "type": "integer",
            "description": "The unique identifier for the email address.",
            "example": 2
          },
          "email_address": {
            "type": "string",
            "format": "email",
            "description": "The email address.",
            "example": "test2@user.com"
          },
          "verified": {
            "type": "integer",
            "description": "Flag indicating if the email address is verified.",
            "example": 0
          },
          "date_added": {
            "type": "string",
            "description": "The date the email address was added.",
            "example": "1436157486"
          }
        }
      },
      "view-allowed-email-addresses": {
        "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 are your email addresses"
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/pagination"
              },
              {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/email_address"
                    },
                    "example": [
                      {
                        "email_address_id": 2,
                        "email_address": "test@user.com",
                        "verified": 1,
                        "date_added": "1447736880"
                      },
                      {
                        "email_address_id": 3,
                        "email_address": "test2@user.com",
                        "verified": 0,
                        "date_added": "1449042967"
                      }
                    ]
                  }
                }
              }
            ]
          }
        }
      },
      "create-allowed-email-address": {
        "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": "Email address has been created."
          },
          "data": {
            "$ref": "#/components/schemas/email_address"
          }
        }
      },
      "send-email-verification-token": {
        "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": "Verification email has been sent."
          },
          "data": {
            "type": "object",
            "nullable": true,
            "example": null
          }
        }
      },
      "verify-allowed-email-address": {
        "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": "Email address verified."
          },
          "data": {
            "$ref": "#/components/schemas/email_address"
          }
        }
      },
      "view-allowed-email-address": {
        "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 email address."
          },
          "data": {
            "$ref": "#/components/schemas/email_address"
          }
        }
      },
      "delete-allowed-email-address": {
        "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": "Email address deleted."
          },
          "data": {
            "type": "object",
            "nullable": true,
            "example": null
          }
        }
      },
      "email_campaign": {
        "type": "object",
        "properties": {
          "email_campaign_id": {
            "type": "integer",
            "description": "The ID of the email campaign.",
            "example": 64
          },
          "name": {
            "type": "string",
            "description": "The name of the email campaign.",
            "example": "test email"
          },
          "user_id": {
            "type": "integer",
            "description": "The ID of the user who created the email campaign.",
            "example": 1201
          },
          "subaccount_id": {
            "type": "integer",
            "description": "The ID of the subaccount associated with the email campaign.",
            "example": 1038
          },
          "subject": {
            "type": "string",
            "description": "The subject of the email campaign.",
            "example": "My test subject"
          },
          "list_id": {
            "type": "integer",
            "description": "The ID of the email list associated with the campaign.",
            "example": 443
          },
          "from_email_address_id": {
            "type": "integer",
            "description": "The ID of the sender's email address.",
            "example": 2
          },
          "from_name": {
            "type": "string",
            "description": "The name of the sender.",
            "example": "Test name"
          },
          "template_id": {
            "type": "integer",
            "description": "The ID of the email template used in the campaign.",
            "example": 24
          },
          "schedule": {
            "type": "string",
            "description": "The schedule for sending the email campaign.",
            "example": ""
          },
          "status": {
            "type": "string",
            "description": "The status of the email campaign (e.g., Sent, Scheduled, Draft).",
            "example": "Sent"
          },
          "date_added": {
            "type": "string",
            "description": "The date when the email campaign was added.",
            "example": "1455586793"
          },
          "custom_string": {
            "type": "string",
            "description": "A custom string associated with the email campaign.",
            "example": ""
          },
          "send_count": {
            "type": "integer",
            "description": "The count of emails sent in the campaign.",
            "example": 0
          },
          "open_count": {
            "type": "integer",
            "description": "The count of emails opened in the campaign.",
            "example": 5
          },
          "click_count": {
            "type": "integer",
            "description": "The count of links clicked in the campaign.",
            "example": 0
          },
          "hard_bounce_count": {
            "type": "integer",
            "description": "The count of hard bounces in the campaign.",
            "example": 0
          },
          "soft_bounce_count": {
            "type": "integer",
            "description": "The count of soft bounces in the campaign.",
            "example": 0
          },
          "abuse_count": {
            "type": "integer",
            "description": "The count of abuse complaints in the campaign.",
            "example": 0
          },
          "unsubscribe_count": {
            "type": "integer",
            "description": "The count of unsubscribes in the campaign.",
            "example": 0
          },
          "body": {
            "type": "string",
            "description": "The body of the email campaign.",
            "example": "test body"
          },
          "body_plain_text": {
            "type": "string",
            "description": "The plain text body of the email campaign.",
            "example": "test body"
          }
        }
      },
      "send-email-campaign": {
        "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": "Email campaign has been created."
          },
          "data": {
            "type": "object",
            "properties": {
              "totlal_count": {
                "type": "number",
                "example": 1,
                "description": "The total count of the email campaigns."
              },
              "total_price": {
                "type": "string",
                "example": "0.0066",
                "description": "The total price of the email campaigns."
              },
              "queued_count": {
                "type": "number",
                "example": 1,
                "description": "The count of the queued email campaigns."
              },
              "data": {
                "$ref": "#/components/schemas/email_campaign"
              },
              "_currency": {
                "$ref": "#/components/schemas/currency"
              }
            }
          }
        }
      },
      "calculate-email-campaign-price": {
        "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": "Total price for email campaign."
          },
          "data": {
            "type": "object",
            "properties": {
              "total_count": {
                "type": "number",
                "example": 1,
                "description": "The total count of the email campaigns."
              },
              "total_price": {
                "type": "string",
                "example": "0.0066",
                "description": "The total price of the email campaigns."
              },
              "queued_count": {
                "type": "number",
                "example": 2,
                "description": "The count of the queued email campaigns."
              },
              "data": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "John Doe",
                    "description": "Name."
                  },
                  "subject": {
                    "type": "string",
                    "example": "Lorem Ipsum",
                    "description": "Your template subject."
                  },
                  "from_email_address_id": {
                    "type": "number",
                    "example": 2,
                    "description": "The allowed email address id."
                  },
                  "from_name": {
                    "type": "string",
                    "example": "From name",
                    "description": "Your sender name."
                  },
                  "body": {
                    "type": "string",
                    "example": "<p>This is a test</p>",
                    "description": "Your message."
                  },
                  "list_id": {
                    "type": "number",
                    "example": 456,
                    "description": "Your list id."
                  }
                }
              },
              "_currency": {
                "$ref": "#/components/schemas/currency"
              }
            }
          }
        }
      },
      "view-all-email-campaigns": {
        "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 are your email campaigns"
          },
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/pagination"
              },
              {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/email_campaign"
                    },
                    "example": [
                      {
                        "email_campaign_id": 64,
                        "name": "test email",
                        "user_id": 1201,
                        "subaccount_id": 1038,
                        "subject": "My test subject",
                        "list_id": 443,
                        "from_email_address_id": 2,
                        "from_name": "Test name",
                        "template_id": 24,
                        "schedule": "",
                        "status": "Sent",
                        "date_added": "1455586793",
                        "custom_string": "",
                        "send_count": 0,
                        "open_count": 5,
                        "click_count": 0,
                        "hard_bounce_count": 0,
                        "soft_bounce_count": 0,
                        "abuse_count": 0,
                        "unsubscribe_count": 0
                      },
                      {
                        "email_campaign_id": 65,
                        "name": "test email",
                        "user_id": 1201,
                        "subaccount_id": 1038,
                        "subject": "My test subject",
                        "list_id": 443,
                        "from_email_address_id": 2,
                        "from_name": "Test name",
                        "template_id": 24,
                        "schedule": "",
                        "status": "Queued",
                        "date_added": "1455586848",
                        "custom_string": "",
                        "send_count": 0,
                        "open_count": 5,
                        "click_count": 0,
                        "hard_bounce_count": 0,
                        "soft_bounce_count": 0,
                        "abuse_count": 0,
                        "unsubscribe_count": 0
                      }
                    ]
                  }
                }
              }
            ]
          }
        }
      },
      "view-email-campaign": {
        "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 email campaign."
          },
          "data": {
            "$ref": "#/components/schemas/email_campaign"
          }
        }
      },
      "update-email-campaign": {
        "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": "Email campaign has been updated."
          },
          "data": {
            "$ref": "#/components/schemas/email_campaign"
          }
        }
      },
      "cancel-email-campaign": {
        "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": "Email campaign has been cancelled."
          },
          "data": {
            "$ref": "#/components/schemas/email_campaign"
          }
        }
      },
      "email_campaign_history": {
        "type": "object",
        "properties": {
          "email_campaign_id": {
            "type": "integer",
            "description": "The ID of the email campaign.",
            "example": 77
          },
          "from_name": {
            "type": "string",
            "description": "The name of the sender.",
            "example": "test name"
          },
          "from_address": {
            "type": "string",
            "description": "The email address of the sender.",
            "example": "4"
          },
          "to_name": {
            "type": "string",
            "description": "The name of the recipient.",
            "example": "test2@test.com"
          },
          "to_address": {
            "type": "string",
            "description": "The email address of the recipient.",
            "example": "test2@test.com"
          },
          "contact_id": {
            "type": "integer",
            "description": "The ID of the contact associated with the email.",
            "example": 669105
          },
          "subject": {
            "type": "string",
            "description": "The subject of the email.",
            "example": "test subject"
          },
          "message_id": {
            "type": "string",
            "description": "The unique ID of the email message.",
            "example": "7CB3227C-7F8C-4A72-A0CB-36283236D99F"
          },
          "processed_at": {
            "type": "string",
            "nullable": true,
            "description": "The date and time when the email was processed.",
            "example": null
          },
          "status": {
            "type": "string",
            "description": "The status of the email (e.g., SpamReport, Sent).",
            "example": "SpamReport"
          },
          "open_count": {
            "type": "integer",
            "description": "The count of times the email was opened.",
            "example": 0
          },
          "click_count": {
            "type": "integer",
            "description": "The count of times links in the email were clicked.",
            "example": 0
          },
          "hard_bounce_count": {
            "type": "integer",
            "description": "The count of hard bounces for the email.",
            "example": 13
          },
          "soft_bounce_count": {
            "type": "integer",
            "description": "The count of soft bounces for the email.",
            "example": 1
          }
        }
      },
      "view-email-campaign-history": {
        "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": "object",
                "properties": {
                  "data": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/email_campaign_history"
                    },
                    "example": [
                      {
                        "email_campaign_id": 77,
                        "from_name": "test name",
                        "from_address": "4",
                        "to_name": "test2@test.com",
                        "to_address": "test2@test.com",
                        "contact_id": 669105,
                        "subject": "test subject",
                        "message_id": "7CB3227C-7F8C-4A72-A0CB-36283236D99F",
                        "processed_at": null,
                        "status": "SpamReport",
                        "open_count": 0,
                        "click_count": 0,
                        "hard_bounce_count": 13,
                        "soft_bounce_count": 1
                      },
                      {
                        "email_campaign_id": 77,
                        "from_name": "test name",
                        "from_address": "4",
                        "to_name": "test2@test.com",
                        "to_address": "test2@test.com",
                        "contact_id": 669105,
                        "subject": "test subject",
                        "message_id": "603C5349-5A24-40B4-89ED-F7619F7CC8A3",
                        "processed_at": null,
                        "status": null,
                        "open_count": 0,
                        "click_count": 0,
                        "hard_bounce_count": 0,
                        "soft_bounce_count": 0
                      },
                      {
                        "email_campaign_id": 77,
                        "from_name": "test name",
                        "from_address": "4",
                        "to_name": "test2@test.com",
                        "to_address": "test2@test.com",
                        "contact_id": 669105,
                        "subject": "test subject",
                        "message_id": "5C5C0918-B263-42AA-8B5D-9E8ACECC0C64",
                        "processed_at": null,
                        "status": null,
                        "open_count": 0,
                        "click_count": 0,
                        "hard_bounce_count": 0,
                        "soft_bounce_count": 0
                      }
                    ]
                  }
                }
              }
            ]
          }
        }
      },
      "master_email_template": {
        "type": "object",
        "properties": {
          "template_id_master": {
            "type": "integer",
            "description": "The unique identifier for the template.",
            "example": 57
          },
          "template_name": {
            "type": "string",
            "description": "The name of the template.",
            "example": "Welcome Email"
          },
          "date_added": {
            "type": "integer",
            "description": "The date the template was added.",
            "example": 1436157486
          },
          "body": {
            "type": "string",
            "nullable": true,
            "description": "The body of the template.",
            "example": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" ...\n                     </tr>\n                  </tbody>\n               </table>\n            </td>\n         </tr>\n      </tbody>\n   </table>\n</body>\n</html>"
          },
          "thumbnail": {
            "type": "object",
            "properties": {
              "small": {
                "type": "string",
                "description": "The small thumbnail of the template.",
                "example": "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_email-marketing/_templates-master/basic2/thumb-small.jpg"
              },
              "large": {
                "type": "string",
                "description": "The large thumbnail of the template.",
                "example": "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_email-marketing/_templates-master/basic2/thumb-large.jpg"
              }
            }
          }
        }
      },
      "view-master-email-templates": {
        "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": "List of Email Master Templates"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/master_email_template"
            },
            "example": [
              {
                "template_id_master": 57,
                "template_name": "Welcome Email",
                "date_added": "1436157486",
                "thumbnail": {
                  "small": "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_email-marketing/_templates-master/basic2/thumb-small.jpg",
                  "large": "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_email-marketing/_templates-master/basic2/thumb-large.jpg"
                }
              },
              {
                "template_id_master": 1,
                "template_name": "Minty",
                "date_added": "1445848821",
                "thumbnail": {
                  "small": "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_email-marketing/_templates-master/minty/thumb-small.jpg",
                  "large": "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_email-marketing/_templates-master/minty/thumb-large.jpg"
                }
              }
            ]
          }
        }
      },
      "view-master-email-template": {
        "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 email template"
          },
          "data": {
            "$ref": "#/components/schemas/master_email_template"
          }
        }
      },
      "view-template-categories": {
        "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": "List of Email Categories"
          },
          "data": {
            "type": "array",
            "items": {
              "properties": {
                "category_id": {
                  "type": "number",
                  "example": 1,
                  "description": "The ID of the category."
                },
                "category_name": {
                  "type": "string",
                  "example": "Art",
                  "description": "The name of the category."
                }
              }
            },
            "example": [
              {
                "category_id": 2,
                "category_name": "Alerts/Notificartions"
              },
              {
                "category_id": 3,
                "category_name": "Art"
              },
              {
                "category_id": 4,
                "category_name": "Birthday"
              },
              {
                "category_id": 23,
                "category_name": "Blank Template"
              }
            ]
          }
        }
      },
      "view-template-category": {
        "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 are your data."
          },
          "data": {
            "type": "object",
            "properties": {
              "category_id": {
                "type": "number",
                "example": 4,
                "description": "The ID of the category."
              },
              "name": {
                "type": "string",
                "example": "Birthday",
                "description": "The name of the category."
              }
            }
          }
        }
      },
      "view-templates-in-category": {
        "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": "List of Email Templates By Category"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/master_email_template"
            },
            "example": [
              {
                "template_id_master": 1,
                "category_id": 1,
                "template_name": "Minty",
                "body": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" ...\n                     </tr>\n                  </tbody>\n               </table>\n            </td>\n         </tr>\n      </tbody>\n   </table>\n</body>\n</html>",
                "date_added": "1445848821",
                "thumbnail": {
                  "small": "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_email-marketing/_templates-master/basic2/thumb-small.jpg",
                  "large": "https://s3-ap-southeast-2.amazonaws.com/clicksend-api-downloads/_email-marketing/_templates-master/basic2/thumb-large.jpg"
                }
              }
            ]
          }
        }
      },
      "view-email-templates": {
        "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 are your email templates."
          },
          "data": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "example": 2,
                "description": "The total number of records in the response."
              },
              "per_page": {
                "type": "integer",
                "example": 15,
                "description": "The number of records per page."
              },
              "current_page": {
                "type": "integer",
                "example": 1,
                "description": "The current page number."
              },
              "last_page": {
                "type": "integer",
                "example": 1,
                "description": "The last page number."
              },
              "next_page_url": {
                "type": "string",
                "nullable": true,
                "description": "The URL of the next page of records.",
                "example": null
              },
              "prev_page_url": {
                "type": "string",
                "nullable": true,
                "description": "The URL of the previous page of records.",
                "example": null
              },
              "from": {
                "type": "integer",
                "example": 1,
                "description": "The index of the first record in the page."
              },
              "to": {
                "type": "integer",
                "example": 15,
                "description": "The index of the last record in the page."
              },
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "template_id": {
                      "type": "integer",
                      "description": "The ID of the email template."
                    },
                    "template_name": {
                      "type": "string",
                      "description": "The name of the email template."
                    }
                  }
                },
                "example": [
                  {
                    "template_id": 281,
                    "template_name": "Test"
                  },
                  {
                    "template_id": 290,
                    "template_name": "Minions"
                  }
                ]
              }
            }
          }
        }
      },
      "user_email_template": {
        "type": "object",
        "properties": {
          "template_id": {
            "type": "integer",
            "description": "The unique identifier for the template.",
            "example": 292
          },
          "template_id_master": {
            "type": "integer",
            "description": "The unique identifier for the template.",
            "example": 57
          },
          "template_name": {
            "type": "string",
            "description": "The name of the template.",
            "example": "new minion template!"
          },
          "body": {
            "type": "string",
            "description": "The body of the template.",
            "example": "<div id=\"nb_wrapper\"><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"..."
          }
        }
      },
      "create-email-template": {
        "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": "New email template has been saved."
          },
          "data": {
            "$ref": "#/components/schemas/user_email_template"
          }
        }
      },
      "view-email-template": {
        "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 email template."
          },
          "data": {
            "$ref": "#/components/schemas/user_email_template"
          }
        }
      },
      "update-email-template": {
        "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": "Your email template has been updated."
          },
          "data": {
            "$ref": "#/components/schemas/user_email_template"
          }
        }
      },
      "delete-email-template": {
        "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": "Your email template has been deleted."
          },
          "data": {
            "type": "array",
            "items": [],
            "example": []
          }
        }
      }
    }
  },
  "paths": {
    "/v3/email/send": {
      "post": {
        "summary": "Send Email",
        "operationId": "send-email",
        "description": "_Send transactional email_\n\nSend transactional email\n\n### Properties\n\n| Name | Type | Required | Restrictions | Description |\n| --- | --- | --- | --- | --- |\n| to | array | true | none | Array of To Recipient items. (array of names and emails) |\n| cc | array | false | none | Array of Cc Recipient items. (array of names and emails) |\n| bcc | array | false | none | Array of Bcc Recipient items. (array of names and emails) |\n| from | object | true | none | From Email object. (object containing name and email) |\n| body | string | true | none | Body of the email. |\n| attachments | array | false | none | Array of Attachment items. |\n| schedule | number | false | none | Schedule. |\n| name | string | false | none | Name of person email belongs to |\n| email | string | true | none | Email to be used. |\n| content | string | true | none | The base64-encoded contents of the file. |\n| type | string | true | none | The type of file being attached. |\n| filename | string | true | none | The name of the file being attached. |\n| disposition | string | true | none | Inline for content that can be displayed within the email, or attachment for any other files. |\n| content_id | string | true | none | An ID for the content. |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "from": {
                    "type": "object",
                    "properties": {
                      "email_address_id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    }
                  },
                  "subject": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  },
                  "attachments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "content": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "filename": {
                          "type": "string"
                        },
                        "disposition": {
                          "type": "string"
                        },
                        "content_id": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "to": [
                    {
                      "email": "test@test.com",
                      "name": "test from"
                    }
                  ],
                  "from": {
                    "email_address_id": "{{addressId}}",
                    "name": "test"
                  },
                  "subject": "test subject",
                  "body": "test body",
                  "attachments": [
                    {
                      "content": "{{base64EncodedImageFile}}",
                      "type": "image/jpeg",
                      "filename": "test.jpg",
                      "disposition": "inline",
                      "content_id": "test"
                    }
                  ]
                }
              }
            }
          }
        },
        "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/send-email"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n     --request POST \\\n     --header \"Content-Type: application/json\" \\\n     --data-binary \"    {\n       \\\"to\\\":[\n          {\n             \\\"email\\\":\\\"test@clicksend.com\\\",\n             \\\"name\\\":\\\"John Doe\\\"\n          }\n       ],\n       \\\"cc\\\":[\n          {\n             \\\"email\\\":\\\"test2@clicksend.com\\\",\n             \\\"name\\\":\\\"Jane Doe\\\"\n          }\n       ],\n       \\\"bcc\\\":[\n          {\n             \\\"email\\\":\\\"test3@clicksend.com\\\",\n             \\\"name\\\":\\\"Joseph Doe\\\"\n          }\n       ],\n       \\\"from\\\":{\n          \\\"email_address_id\\\":1,\n          \\\"name\\\":\\\"Joanne Doe\\\"\n       },\n       \\\"subject\\\":\\\"Test subject\\\",\n       \\\"body\\\":\\\"Lorem ipsum\\\",\n       \\\"attachments\\\":[\n          {\n             \\\"content\\\":\\\"ZmlsZSBjb250ZW50cw==\\\",\n             \\\"type\\\":\\\"text/plain\\\",\n             \\\"filename\\\":\\\"text.txt\\\",\n             \\\"disposition\\\":\\\"attachment\\\",\n             \\\"content_id\\\":\\\"text\\\"\n          }\n       ]\n    }\" \\\n'https://rest.clicksend.com/v3/email/send'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\TransactionalEmailApi(new GuzzleHttp\\Client(),$config);\n$email = new \\ClickSend\\Model\\Email(); // \\ClickSend\\Model\\Email | Email model\n$email_recipient=new \\ClickSend\\Model\\EmailRecipient();\n$email_recipient->setEmail(\"test@clicksend.com\");\n$email_recipient->setName(\"John Doe\");\n$email_from=new \\ClickSend\\Model\\EmailFrom();\n$email_from->setEmailAddressId(4366);\n$email_from->setName(\"Joanne Doe\");\n$attachment = new \\ClickSend\\Model\\Attachment();\n$attachment->setContent(\"ZmlsZSBjb250ZW50cw==\");\n$attachment->setType(\"text/plain\");\n$attachment->setFilename(\"text.txt\");\n$attachment->setDisposition(\"attachment\");\n$attachment->setContentId(\"text\");\n$email->setTo([$email_recipient]);\n$email->setFrom($email_from);\n$email->setSubject(\"Test subject\");\n$email->setBody(\"Lorem ipsum\");\n\ntry {\n    $result = $apiInstance->emailSendPost($email);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling TransactionalEmailApi->emailSendPost: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "var transactionalEmailApi = new TransactionalEmailApi(configuration);\nvar listOfRecipients = new List<EmailRecipient>();\nlistOfRecipients.Add(new EmailRecipient(\n    email: \"john@doe.com\",\n    name: \"John Doe\"\n));\nvar listOfCC = new List<EmailRecipient>();\nlistOfCC.Add(new EmailRecipient(\n    email: \"john@doe.com\",\n    name: \"John Doe\"\n));\nvar listOfBCC = new List<EmailRecipient>();\nlistOfBCC.Add(new EmailRecipient(\n    email: \"john@doe.com\",\n    name: \"John Doe\"\n));\nvar listOfAttachments = new List<Attachment>();\nlistOfAttachments.Add(new Attachment(\n    content: \"content\",\n    type: \"type\",\n    filename: \"filename\",\n    disposition: \"disposition\",\n    contentId: \"contentId\"\n));\nvar emailFrom = new EmailFrom(\n    emailAddressId: FROM_EMAIL_ID_GOES,\n    name: \"John Doe\"\n);\nvar response = transactionalEmailApi.EmailSendPost(new Email(\n    to: listOfRecipients,\n    cc: listOfCC,\n    bcc: listOfBCC,\n    from: emailFrom,\n    subject: \"Test Subject\",\n    body: \"Test Body\",\n    attachments: listOfAttachments\n));"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport java.math.BigDecimal;\nimport java.util.Arrays;\nimport java.util.List;\nimport ClickSend.Api.TransactionalEmailApi;\nimport ClickSend.Model.Attachment;\nimport ClickSend.Model.Email;\nimport ClickSend.Model.EmailFrom;\nimport ClickSend.Model.EmailRecipient;\n\npublic class send_email {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    TransactionalEmailApi apiInstance = new TransactionalEmailApi(defaultClient);\n    EmailRecipient emailRecipient=new EmailRecipient();\n    emailRecipient.email(\"example@gmail.com\");\n    emailRecipient.name(\"abc\");\n    List<EmailRecipient> emailRecipientList=Arrays.asList(emailRecipient);\n    EmailFrom emailFrom=new EmailFrom();\n    emailFrom.emailAddressId(\"4197\");\n    emailFrom.name(\"abc\");\n    Attachment attachment= new Attachment();\n    attachment.content(\"ZmlsZSBjb250ZW50cw==\");\n    attachment.contentId(\"text\");\n    attachment.disposition(\"attachment\");\n    attachment.type(\"text/plain\");\n    attachment.filename(\"text.txt\");\n    List<Attachment> attachmentList=Arrays.asList(attachment);\n    Email email = new Email(); // Email | Email model\n    email.to(emailRecipientList);\n    email.cc(emailRecipientList);\n    email.bcc(emailRecipientList);\n    email.from(emailFrom);\n    email.subject(\"subject\");\n    email.body(\"body\");\n    email.attachments(attachmentList);\n    email.schedule(new BigDecimal(147258369));\n    try {\n        String result = apiInstance.emailSendPost(email);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling TransactionalEmailApi#emailSendPost\");\n        e.printStackTrace();\n    }\n  }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar emailTransactionalApi = new api.TransactionalEmailApi(\"USERNAME\", \"API_KEY\");\n\nvar emailRecipient = new api.EmailRecipient();\n\nemailRecipient.email = \"test@clicksend.com\";\nemailRecipient.name = \"John doe\";\n\nvar emailFrom = new api.EmailFrom();\n\nemailFrom.emailAddressId = 4197;\nemailFrom.name = \"john\";\n\nvar attachment = new api.Attachment();\n\nattachment.content = \"ZmlsZSBjb250ZW50cw==\";\nattachment.type = \"text/plain\";\nattachment.filename = \"text.txt\";\nattachment.disposition = \"attachment\";\nattachment.contentId = \"text\";\n\nvar email = new api.Email();\n\nemail.to = [emailRecipient];\nemail.cc = [emailRecipient];\nemail.bcc = [emailRecipient];\nemail.from = emailFrom;\nemail.subject = \"subject\";\nemail.body = \"body\";\nemail.attachments = [attachment];\n\nemailTransactionalApi.emailSendPost(email).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::TransactionalEmailApi.new\n\nemail = ClickSendClient::Email.new # Email | Email model\n\nemail.to = [\n  ClickSendClient::EmailRecipient.new(\"name\": \"name\", \"email\": \"email\"),\n  ClickSendClient::EmailRecipient.new(\"name\": \"name\", \"email\": \"email\")\n]\n\nemail.cc = [\n  ClickSendClient::EmailRecipient.new(\"name\": \"name\", \"email\": \"email\"),\n  ClickSendClient::EmailRecipient.new(\"name\": \"name\", \"email\": \"email\")\n]\n\nemail.bcc = [\n  ClickSendClient::EmailRecipient.new(\"name\": \"name\", \"email\": \"email\"),\n  ClickSendClient::EmailRecipient.new(\"name\": \"name\", \"email\": \"email\")\n]\n\nemail.from = ClickSendClient::EmailFrom.new(\n  \"name\": \"name\",\n  \"email_address_id\": 56\n)\n\nemail.attachments = [\n  ClickSendClient::Attachment.new(\n    \"disposition\": \"attachment\",\n    \"filename\": \"text.txt\",\n    \"content_id\": \"text\",\n    \"type\": \"text/plain\",\n    \"content\": \"ZmlsZSBjb250ZW50cw==\"\n  ),\n  ClickSendClient::Attachment.new(\n    \"disposition\": \"attachment\",\n    \"filename\": \"text2.txt\",\n    \"content_id\": \"text2\",\n    \"type\": \"text/plain\",\n    \"content\": \"ZmlsZSBjb250ZW50cw==\"\n  )\n]\n\nemail.subject = \"Subject\"\n\nemail.body = \"Lorem ipsum\"\n\nbegin\n  # Send transactional email\n  result = api_instance.email_send_post(email)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling TransactionalEmailApi->email_send_post: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\nfrom clicksend_client import EmailRecipient\nfrom clicksend_client import EmailFrom\nfrom clicksend_client import Attachment\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.TransactionalEmailApi(clicksend_client.ApiClient(configuration))\nemail_receipient=EmailRecipient(email='example@gmail.com',name='abc')\nemail_from=EmailFrom(email_address_id='4197',name='abc')\nattachment=Attachment(content='ZmlsZSBjb250ZW50cw==',\n                      type='text/plain',\n                      filename='text.txt',\n                      disposition='attachment',\n                      content_id='text')\n# Email | Email model\nemail = clicksend_client.Email(to=[email_receipient],\n                              cc=[email_receipient],\n                              bcc=[email_receipient],\n                              _from=email_from,\n                              subject=\"Test subject\",\n                              body=\"this is body\",\n                              attachments=[attachment],\n                              schedule=14785562325) \n\ntry:\n    # Send transactional email\n    api_response = api_instance.email_send_post(email)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling TransactionalEmailApi->email_send_post: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::TransactionalEmailApi;\nuse WWW::ClickSendClient::Object::Email;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::TransactionalEmailApi->new(username => $username, password => $password);\n\nmy %params = (\n    'to' => [\n        {\n            'name'  => 'test1',\n            'email' => 'test1@test.com',\n        },\n        {\n            'name'  => 'test3',\n            'email' => 'test3@test.com',\n        }\n    ],\n    'cc' => [\n        {\n            'name'  => 'test2',\n            'email' => 'test2@test.com',\n        }\n    ],\n    'bcc' => [\n        {\n            'name'  => 'test3',\n            'email' => 'test3@test.com',\n        }\n    ],\n    'from' => [\n        {\n            'name'  => 'test3',\n            'email' => 'test3@test.com',\n        }\n    ],\n    'body'                  => 'body',\n    'subject'               => 'this is subject',\n    'from.email_address_id' => '1233',\n    'from.name'             => 'From NAME'\n);\n\nmy $email_obj = WWW::ClickSendClient::Object::Email->new(%params);\n\nmy $json_output = $api->email_send_post('email' => $email_obj);\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSTransactionalEmailApi.h\"\n#import \"CSDefaultConfiguration.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n// Configure HTTP basic authorization (authentication scheme: BasicAuth)\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nCSEmailRecipient *emailRecipient = [[CSEmailRecipient alloc] init];\nemailRecipient.email = @\"email\";\nemailRecipient.name = @\"name\";\n\nCSEmailRecipient *ccRecipient = [[CSEmailRecipient alloc] init];\nccRecipient.email = @\"email\";\nccRecipient.name = @\"name\";\n\nCSEmailFrom *emailFrom = [[CSEmailFrom alloc] init];\nemailFrom.emailAddressId = @\"email_addr_id\";\nemailFrom.name = @\"name\";\n\nCSEmail *email = [[CSEmail alloc] init];\nemail.to = [[NSArray alloc] initWithObjects:emailRecipient, nil];\nemail.cc = [[NSArray alloc] initWithObjects:ccRecipient, nil];\nemail.from = emailFrom;\nemail.body = @\"body\";\n\nCSTransactionalEmailApi *transEmailApi = [[CSTransactionalEmailApi alloc] init];\n[transEmailApi emailSendPostWithEmail:email completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\nClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\n\nlet emailRecipient = EmailRecipient(\n    email: \"email\", \n    name: \"name\"\n)\nlet ccRecipient = EmailRecipient(\n    email: \"email\",\n    name: \"name\"\n)\nlet emailFrom = EmailFrom(\n    emailAddressId: \"email_address_id\", \n    name: \"name\"\n)\n\nlet email = Email(\n    to: [emailRecipient], \n    cc: [ccRecipient], \n    bcc: nil, \n    from: emailFrom, \n    subject: \"subject\", \n    body: \"body\", \n    attachments: nil, \n    schedule: nil\n)\n\nTransactionalEmailAPI.emailSendPost(email: email) { (dataString, error) in\n    if let error = error {\n        print(error)\n    } else {\n        if let data = dataString!.data(using: String.Encoding.utf8) {\n            do {\n                if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                    print(dictonary)\n                } else {\n                    print(\"bad json\")\n                }\n                } catch let error as NSError {\n                print(error)\n            }\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/email/price": {
      "post": {
        "summary": "Calculate Email Price",
        "operationId": "calculate-email-price",
        "description": "_Get transactional email price_\n\nGet transactional email price\n\n### Properties\n\n| Name | Type | Required | Restrictions | Description |\n| --- | --- | --- | --- | --- |\n| to | array | true | none | Array of To Recipient items. (array of names and emails) |\n| cc | array | false | none | Array of Cc Recipient items. (array of names and emails) |\n| bcc | array | false | none | Array of Bcc Recipient items. (array of names and emails) |\n| from | object | true | none | From Email object. (object containing name and email) |\n| body | string | true | none | Body of the email. |\n| attachments | array | false | none | Array of Attachment items. |\n| schedule | number | false | none | Schedule. |\n| name | string | false | none | Name of person email belongs to |\n| email | string | true | none | Email to be used. |\n| content | string | true | none | The base64-encoded contents of the file. |\n| type | string | true | none | The type of file being attached. |\n| filename | string | true | none | The name of the file being attached. |\n| disposition | string | true | none | Inline for content that can be displayed within the email, or attachment for any other files. |\n| content_id | string | true | none | An ID for the content. |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "from": {
                    "type": "object",
                    "properties": {
                      "email_address_id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    }
                  },
                  "subject": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  }
                },
                "example": {
                  "to": [
                    {
                      "email": "test@test.com",
                      "name": "test from"
                    }
                  ],
                  "from": {
                    "email_address_id": "{{addressId}}",
                    "name": "test"
                  },
                  "subject": "test subject",
                  "body": "test body"
                }
              }
            }
          }
        },
        "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/calculate-email-price"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n            ->setUsername('USERNAME')\n            ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\TransactionalEmailApi(new GuzzleHttp\\Client(),$config);\n\n$email = new \\ClickSend\\Model\\Email(); // \\ClickSend\\Model\\Email | Email model\n$email_recipient=new \\ClickSend\\Model\\EmailRecipient();\n$email_recipient->setEmail(\"test@clicksend.com\");\n$email_recipient->setName(\"John Doe\");\n$email_from=new \\ClickSend\\Model\\EmailFrom();\n$email_from->setEmailAddressId(4366);\n$email_from->setName(\"Joanne Doe\");\n$attachment= new \\ClickSend\\Model\\Attachment();\n$attachment->setContent(\"ZmlsZSBjb250ZW50cw==\");\n$attachment->setType(\"text/plain\");\n$attachment->setFilename(\"text.txt\");\n$attachment->setDisposition(\"attachment\");\n$attachment->setContentId(\"text\");\n$email->setTo([$email_recipient]);\n$email->setFrom($email_from);\n$email->setSubject(\"Test subject\");\n$email->setBody(\"Lorem ipsum\");\n\ntry {\n    $result = $apiInstance->emailPricePost($email);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling TransactionalEmailApi->emailPricePost: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME,\n    Password = API_KEY\n}; \nvar transactionalEmailApi = new TransactionalEmailApi(configuration);\nvar listOfRecipients = new List<EmailRecipient>();\nlistOfRecipients.Add(new EmailRecipient(\n    email: \"john@doe.com\",\n    name: \"John Doe\"\n));\nvar listOfCC = new List<EmailRecipient>();\nlistOfCC.Add(new EmailRecipient(\n    email: \"john@doe.com\",\n    name: \"John Doe\"\n));\nvar listOfBCC = new List<EmailRecipient>();\nlistOfBCC.Add(new EmailRecipient(\n    email: \"john@doe.com\",\n    name: \"John Doe\"\n));\nvar listOfAttachments = new List<Attachment>();\nlistOfAttachments.Add(new Attachment(\n    content: \"content\",\n    type: \"type\",\n    filename: \"filename\",\n    disposition: \"disposition\",\n    contentId: \"contentId\"\n));\nvar emailFrom = new EmailFrom(\n    emailAddressId: FROM_EMAIL_ID_GOES,\n    name: \"John Doe\"\n);\nvar response = transactionalEmailApi.EmailPricePost(new Email(\n    to: listOfRecipients,\n    cc: listOfCC,\n    bcc: listOfBCC,\n    from: emailFrom,\n    subject: \"Test Subject\",\n    body: \"Test Body\",\n    attachments: listOfAttachments\n));"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport java.math.BigDecimal;\nimport java.util.Arrays;\nimport java.util.List;\nimport ClickSend.Api.TransactionalEmailApi;\nimport ClickSend.Model.Attachment;\nimport ClickSend.Model.Email;\nimport ClickSend.Model.EmailFrom;\nimport ClickSend.Model.EmailRecipient;\n\npublic class calculate_email_price {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    TransactionalEmailApi apiInstance = new TransactionalEmailApi(defaultClient);\n    EmailRecipient emailRecipient=new EmailRecipient();\n    emailRecipient.email(\"example@gmail.com\");\n    emailRecipient.name(\"abc\");\n    List<EmailRecipient> emailRecipientList=Arrays.asList(emailRecipient);\n    EmailFrom emailFrom=new EmailFrom();\n    emailFrom.emailAddressId(\"4197\");\n    emailFrom.name(\"abc\");\n    Attachment attachment= new Attachment();\n    attachment.content(\"ZmlsZSBjb250ZW50cw==\");\n    attachment.contentId(\"text\");\n    attachment.disposition(\"attachment\");\n    attachment.type(\"text/plain\");\n    attachment.filename(\"text.txt\");\n    List<Attachment> attachmentList=Arrays.asList(attachment);\n    Email email = new Email(); // Email | Email model\n    email.to(emailRecipientList);\n    email.cc(emailRecipientList);\n    email.bcc(emailRecipientList);\n    email.from(emailFrom);\n    email.subject(\"subject\");\n    email.body(\"body\");\n    email.attachments(attachmentList);\n    email.schedule(new BigDecimal(147258369));\n    try {\n        String result = apiInstance.emailPricePost(email);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling TransactionalEmailApi#emailPricePost\");\n        e.printStackTrace();\n    }\n  }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar emailTransactionalApi = new api.TransactionalEmailApi(\"USERNAME\", \"API_KEY\");\n\nvar emailRecipient = new api.EmailRecipient();\n\nemailRecipient.email = \"test@clicksend.com\";\nemailRecipient.name = \"John doe\";\n\nvar emailFrom = new api.EmailFrom();\n\nemailFrom.emailAddressId = 4197;\nemailFrom.name = \"john\";\n\nvar attachment = new api.Attachment();\nattachment.content = \"ZmlsZSBjb250ZW50cw==\";\nattachment.type = \"text/plain\";\nattachment.filename = \"text.txt\";\nattachment.disposition = \"attachment\";\nattachment.contentId = \"text\";\n\nvar email = new api.Email();\n\nemail.to = [emailRecipient];\nemail.cc = [emailRecipient];\nemail.bcc = [emailRecipient];\nemail.from = emailFrom;\nemail.subject = \"subject\";\nemail.body = \"body\";\nemail.attachments = [attachment];\n\nemailTransactionalApi.emailPricePost(email).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::TransactionalEmailApi.new\n\nemail = ClickSendClient::Email.new # Email | Email model\n\nemail.to = [\n  ClickSendClient::EmailRecipient.new(\"name\": \"name\", \"email\": \"email\"),\n  ClickSendClient::EmailRecipient.new(\"name\": \"name\", \"email\": \"email\")\n]\n\nemail.cc = [\n  ClickSendClient::EmailRecipient.new(\"name\": \"name\", \"email\": \"email\"),\n  ClickSendClient::EmailRecipient.new(\"name\": \"name\", \"email\": \"email\")\n]\n\nemail.bcc = [\n  ClickSendClient::EmailRecipient.new(\"name\": \"name\", \"email\": \"email\"),\n  ClickSendClient::EmailRecipient.new(\"name\": \"name\", \"email\": \"email\")\n]\n\nemail.from = ClickSendClient::EmailFrom.new(\n  \"name\": \"name\",\n  \"email_address_id\": 56\n)\n\nemail.attachments = [\n  ClickSendClient::Attachment.new(\n    \"disposition\": \"attachment\",\n    \"filename\": \"text.txt\",\n    \"content_id\": \"text\",\n    \"type\": \"text/plain\",\n    \"content\": \"ZmlsZSBjb250ZW50cw==\"\n  ),\n  ClickSendClient::Attachment.new(\n    \"disposition\": \"attachment\",\n    \"filename\": \"text2.txt\",\n    \"content_id\": \"text2\",\n    \"type\": \"text/plain\",\n    \"content\": \"ZmlsZSBjb250ZW50cw==\"\n  )\n]\n\nemail.subject = \"Subject\"\n\nemail.body = \"Lorem ipsum\"\n\nbegin\n  # Get transactional email price\n  result = api_instance.email_price_post(email)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling TransactionalEmailApi->email_price_post: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\nfrom clicksend_client import EmailRecipient\nfrom clicksend_client import EmailFrom\nfrom clicksend_client import Attachment\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.TransactionalEmailApi(clicksend_client.ApiClient(configuration))\nemail_receipient=EmailRecipient(email='example@gmail.com',name='abc')\nemail_from=EmailFrom(email_address_id='4197',name='abc')\nattachment=Attachment(content='ZmlsZSBjb250ZW50cw==',\n                      type='text/plain',\n                      filename='text.txt',\n                      disposition='attachment',\n                      content_id='text')\n# Email | Email model\nemail = clicksend_client.Email(to=[email_receipient],\n                              cc=[email_receipient],\n                              bcc=[email_receipient],\n                              _from=email_from,\n                              subject=\"Test subject\",\n                              body=\"this is body\",\n                              attachments=[attachment],\n                              schedule=14785562325) \n\ntry:\n    # Get transactional email price\n    api_response = api_instance.email_price_post(email)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling TransactionalEmailApi->email_price_post: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::TransactionalEmailApi;\nuse WWW::ClickSendClient::Object::Email;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::TransactionalEmailApi->new(username => $username, password => $password);\n\nmy %params = (\n    'to' => [\n        {\n            'name'  => 'test1',\n            'email' => 'test1@test.com',\n        },\n        {\n            'name'  => 'test3',\n            'email' => 'test3@test.com',\n        }\n    ],\n    'cc' => [\n        {\n            'name'  => 'test2',\n            'email' => 'test2@test.com',\n        }\n    ],\n    'bcc' => [\n        {\n            'name'  => 'test3',\n            'email' => 'test3@test.com',\n        }\n    ],\n    'from' => [\n        {\n            'name'  => 'test3',\n            'email' => 'test3@test.com',\n        }\n    ],\n    'body'                  => 'body',\n    'subject'               => 'this is subject',\n    'from.email_address_id' => '1233',\n    'from.name'             => 'From NAME'\n);\n\nmy $email_obj = WWW::ClickSendClient::Object::Email->new(%params);\n\nmy $json_output = $api->email_price_post('email' => $email_obj);\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSTransactionalEmailApi.h\"\n#import \"CSDefaultConfiguration.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n// Configure HTTP basic authorization (authentication scheme: BasicAuth)\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nCSEmailRecipient *emailRecipient = [[CSEmailRecipient alloc] init];\nemailRecipient.email = @\"email\";\nemailRecipient.name = @\"name\";\n\nCSEmailRecipient *ccRecipient = [[CSEmailRecipient alloc] init];\nccRecipient.email = @\"email\";\nccRecipient.name = @\"name\";\n\nCSEmailFrom *emailFrom = [[CSEmailFrom alloc] init];\nemailFrom.emailAddressId = @\"email_addr_id\";\nemailFrom.name = @\"name\";\n\nCSEmail *email = [[CSEmail alloc] init];\nemail.to = [[NSArray alloc] initWithObjects:emailRecipient, nil];\nemail.cc = [[NSArray alloc] initWithObjects:ccRecipient, nil];\nemail.from = emailFrom;\nemail.body = @\"body\";\n\nCSTransactionalEmailApi *transEmailApi = [[CSTransactionalEmailApi alloc] init];\n[transEmailApi emailPricePostWithEmail:email completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\n\nlet emailRecipient = EmailRecipient(\n                        email: \"email\", \n                        name: \"name\"\n                    )\nlet ccRecipient = EmailRecipient(\n                    email: \"email\", \n                    name: \"name\"\n                )\n\nlet emailFrom = EmailFrom(\n                    emailAddressId: \"email_address_id\", \n                    name: \"name\"\n                )\n\nlet email = Email(\n                to: [emailRecipient], \n                cc: [ccRecipient], \n                bcc: nil, from: \n                emailFrom, \n                subject: \"subject\", \n                body: \"body\", \n                attachments: nil, \n                schedule: nil\n            )\n\nTransactionalEmailAPI.emailPricePost(email: email) { (dataString, error) in\n    if let error = error {\n        print(error)\n    } else {\n        if let data = dataString!.data(using: String.Encoding.utf8) {\n            do {\n                if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                    print(dictonary)\n                } else {\n                    print(\"bad json\")\n                }\n            } catch let error as NSError {\n                print(error)\n            }\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/email/history": {
      "get": {
        "summary": "View Email History",
        "operationId": "view-email-history",
        "description": "_Get all transactional email history_\n\nGet all transactional email history\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| date_from | query | integer(int32) | false | Start date (Unix Timestamp e.g. 1436849372) |\n| date_to | query | integer(int32) | false | End date (Unix Timestamp e.g. 1436879372) |\n| page | query | integer(int32) | false | [Page number](/#pagination) |\n| limit | query | integer(int32) | false | [Number of records per page](/#pagination) |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</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-history"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n'https://rest.clicksend.com/v3/email/history'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\TransactionalEmailApi(new GuzzleHttp\\Client(),$config);\n$date_from = '1436849372'; // int | Start date\n$date_to = '1436879372'; // int | End date\n$page = 1; // int | Page number\n$limit = 10; // int | Number of records per page\n\ntry {\n    $result = $apiInstance->emailHistoryGet($date_from, $date_to, $page, $limit);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling TransactionalEmailApi->emailHistoryGet: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar transactionalEmailApi = new TransactionalEmailApi(configuration);\n\nvar dateFrom = '1546913229';\nvar dateTo = '1546923229';\nvar page = 1;\nvar limit = 10;\n\nvar response = transactionalEmailApi.EmailHistoryGet(dateFrom, dateTo, page, limit);"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.TransactionalEmailApi;\n\npublic class view_email_history {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    TransactionalEmailApi apiInstance = new TransactionalEmailApi(defaultClient);\n    Integer dateFrom = 1546913229; // Integer | Start date\n    Integer dateTo = 1546923229; // Integer | End date\n    Integer page = 1; // Integer | Page number\n    Integer limit = 10; // Integer | Number of records per page\n    try {\n        String result = apiInstance.emailHistoryGet(dateFrom, dateTo, page, limit);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling TransactionalEmailApi#emailHistoryGet\");\n        e.printStackTrace();\n    }\n  }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar emailTransactionalApi = new api.TransactionalEmailApi(\"USERNAME\", \"API_KEY\");\n\nvar dateFrom = '1546913229';\nvar dateTo = '1546923229';\nvar page = 1;\nvar limit = 10;\n\nemailTransactionalApi.emailHistoryGet(dateFrom, dateTo, page, limit).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::TransactionalEmailApi.new\n\nopts = {\n  date_from: 1546913229, # Integer | Start date\n  date_to: 1546923229, # Integer | End date\n  page: 1, # Integer | Page number\n  limit: 10 # Integer | Number of records per page\n}\n\nbegin\n  # Get all transactional email history\n  result = api_instance.email_history_get(opts)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling TransactionalEmailApi->email_history_get: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.TransactionalEmailApi(clicksend_client.ApiClient(configuration))\ndate_from = 1546913229 # int | Start date (optional)\ndate_to = 1546923229 # int | End date (optional)\npage = 1 # int | Page number (optional) (default to 1)\nlimit = 10 # int | Number of records per page (optional) (default to 10)\n\ntry:\n    # Get all transactional email history\n    api_response = api_instance.email_history_get(date_from=date_from, date_to=date_to, page=page, limit=limit)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling TransactionalEmailApi->email_history_get: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::TransactionalEmailApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::TransactionalEmailApi->new(username => $username, password => $password);\n\nmy $json_output = $api->email_history_get(\n    'limit' => '1',\n    'page' => '1',\n    'date_to' => '1546913229',\n    'date_from' => '1546923229'\n );\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSTransactionalEmailApi.h\"\n#import \"CSDefaultConfiguration.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n// Configure HTTP basic authorization (authentication scheme: BasicAuth)\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nNSNumber *fromDate = [NSNumber numberWithInt:1436849372];\nNSNumber *toDate = [NSNumber numberWithInt:1436879372];\n\nCSTransactionalEmailApi *transEmailApi = [[CSTransactionalEmailApi alloc] init];\n[transEmailApi emailHistoryGetWithDateFrom:fromDate dateTo:toDate page:@(1) limit:@(15) completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\n\nTransactionalEmailAPI.emailHistoryGet { (dataString, error) in\n    if let error = error {\n        print(error)\n    } else {\n        if let data = dataString!.data(using: String.Encoding.utf8) {\n            do {\n                if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                    print(dictonary)\n                } else {\n                    print(\"bad json\")\n                }\n            } catch let error as NSError {\n                print(error)\n            }\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/email/history/export": {
      "get": {
        "summary": "Export Email History",
        "operationId": "export-email-history",
        "description": "_Export all Transactional Email history_\n\nExport all Transactional Email history\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| filename | query | string | true | Filename to download history as |\n| date_from | query | integer(int32) | false | Start date (Unix Timestamp e.g. 1436849372) |\n| date_to | query | integer(int32) | false | End date (Unix Timestamp e.g. 1436879372) |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</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/export-email-history"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n'https://rest.clicksend.com/v3/email/history/export?filename={filename}'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\TransactionalEmailApi(new GuzzleHttp\\Client(),$config);\n$filename = \"filename_example\"; // string | Filename to download history as\n$date_from = '1436849372'; // int | Start date\n$date_to = '1436879372'; // int | End date\n\ntry {\n    $result = $apiInstance->emailHistoryExportGet($filename, $date_from, $date_to);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling TransactionalEmailApi->emailHistoryExportGet: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar transactionalEmailApi = new TransactionalEmailApi(configuration);\n\nvar filename = \"filename\";\nvar dateFrom = '1546913229';\nvar dateTo = '1546923229';\n\nvar response = transactionalEmailApi.EmailHistoryExportGet(filename, dateFrom, dateTo);"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.TransactionalEmailApi;\n\npublic class export_email_history {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    TransactionalEmailApi apiInstance = new TransactionalEmailApi(defaultClient);\n    String filename = \"filename_example\"; // String | Filename to download history as\n    Integer dateFrom = 1546913229; // Integer | Start date\n    Integer dateTo = 1546923229; // Integer | End date\n    try {\n        String result = apiInstance.emailHistoryExportGet(filename, dateFrom, dateTo);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling TransactionalEmailApi#emailHistoryExportGet\");\n        e.printStackTrace();\n    }\n  }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar emailTransactionalApi = new api.TransactionalEmailApi(\"USERNAME\", \"API_KEY\");\n\nvar filename = \"filename\";\nvar dateFrom = '1546913229';\nvar dateTo = '1546923229';\n\nemailTransactionalApi.emailHistoryExportGet(filename, dateFrom, dateTo).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::TransactionalEmailApi.new\n\nfilename = \"filename_example\" # String | Filename to download history as\n\nopts = {\n  date_from: 1546913229, # Integer | Start date\n  date_to: 1546923229 # Integer | End date\n}\n\nbegin\n  # Export all Transactional Email history\n  result = api_instance.email_history_export_get(filename, opts)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling TransactionalEmailApi->email_history_export_get: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.TransactionalEmailApi(clicksend_client.ApiClient(configuration))\nfilename = 'filename_example' # str | Filename to download history as\ndate_from = 1546913229 # int | Start date (optional)\ndate_to = 1546923229 # int | End date (optional)\n\ntry:\n    # Export all Transactional Email history\n    api_response = api_instance.email_history_export_get(filename, date_from=date_from, date_to=date_to)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling TransactionalEmailApi->email_history_export_get: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::TransactionalEmailApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::TransactionalEmailApi->new(username => $username, password => $password);\n\nmy $json_output = $api->email_history_export_get('filename' => 'filename','date_to' => '1546913229','date_from' => '1546923229');\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSTransactionalEmailApi.h\"\n#import \"CSDefaultConfiguration.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n// Configure HTTP basic authorization (authentication scheme: BasicAuth)\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nNSNumber *fromDate = [NSNumber numberWithInt:1436849372];\nNSNumber *toDate = [NSNumber numberWithInt:1436879372];\n\nCSTransactionalEmailApi *transEmailApi = [[CSTransactionalEmailApi alloc] init];\n[transEmailApi emailHistoryExportGetWithFilename:@\"filename\" dateFrom:fromDate dateTo:toDate completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\n\nTransactionalEmailAPI.emailHistoryExportGet(filename: \"filename\") { (dataString, error) in\n    if let error = error {\n        print(error)\n    } else {\n        if let data = dataString!.data(using: String.Encoding.utf8) {\n            do {\n                if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                    print(dictonary)\n                } else {\n                    print(\"bad json\")\n                }\n            } catch let error as NSError {\n                print(error)\n            }\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/email/addresses": {
      "get": {
        "summary": "View Allowed Email Addresses",
        "operationId": "view-allowed-email-addresses",
        "description": "_Get all email addresses_\n\nGet all email addresses\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| page | query | integer(int32) | false | Page number |\n| limit | query | integer(int32) | false | Number of records per page |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</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-allowed-email-addresses"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n'https://rest.clicksend.com/v3/email/addresses'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\EmailMarketingApi(new GuzzleHttp\\Client(),$config);\n$page = 1; // int | Page number\n$limit = 10; // int | Number of records per page\n\ntry {\n    $result = $apiInstance->allowedEmailAddressGet($page, $limit);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling EmailMarketingApi->allowedEmailAddressGet: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar emailMarketingApi = new EmailMarketingApi(configuration);\nvar response = emailMarketingApi.AllowedEmailAddressGet();"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.EmailMarketingApi;\n\npublic class view_all_allowed_email_address {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    EmailMarketingApi apiInstance = new EmailMarketingApi(defaultClient);\n    Integer page = 1; // Integer | Page number\n    Integer limit = 10; // Integer | Number of records per page\n    try {\n        String result = apiInstance.allowedEmailAddressGet(page, limit);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling EmailMarketingApi#allowedEmailAddressGet\");\n        e.printStackTrace();\n    }\n  }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar emailMarketingApi = new api.EmailMarketingApi(\"USERNAME\", \"API_KEY\");\n\nvar page = 1;\nvar limit = 10;\n\nemailMarketingApi.allowedEmailAddressGet(page, limit).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::EmailMarketingApi.new\n\nopts = {\n  page: 1,  # Integer | Page number\n  limit: 10 # Integer | Number of records per page\n}\n\nbegin\n  # Get all email addresses\n  result = api_instance.allowed_email_address_get(opts)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling EmailMarketingApi->allowed_email_address_get: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.EmailMarketingApi(clicksend_client.ApiClient(configuration))\npage = 1 # int | Page number (optional) (default to 1)\nlimit = 10 # int | Number of records per page (optional) (default to 10)\n\ntry:\n    # Get all email addresses\n    api_response = api_instance.allowed_email_address_get(page=page, limit=limit)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling EmailMarketingApi->allowed_email_address_get: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::EmailMarketingApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::EmailMarketingApi->new(username => $username, password => $password);\n\nmy $json_output = $api->allowed_email_address_get('page' => '1' ,'limit'  => '');\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSEmailMarketingApi.h\"\n\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nNSNumber *page = [[NSNumber alloc] initWithInt:1];\nNSNumber *limit = [[NSNumber alloc] initWithInt:1];\n\nCSEmailMarketingApi *emailMarketingApiInstance = [[CSEmailMarketingApi alloc] init];\n[emailMarketingApiInstance allowedEmailAddressGetWithPage:page limit:limit completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\nEmailMarketingAPI.allowedEmailAddressGet { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n            print(error)\n        }\n    }\n}"
          }
        ]
      },
      "post": {
        "summary": "Create Allowed Email Address",
        "operationId": "create-allowed-email-address",
        "description": "_Create allowed Email Address_\n\nCreate allowed Email Address\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| body | body | string | true | Email to be allowed. |\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email_address": {
                    "type": "string"
                  }
                },
                "example": {
                  "email_address": "test@test.com"
                }
              }
            }
          }
        },
        "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-allowed-email-address"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n     --request POST \\\n     --header \"Content-Type: application/json\" \\\n     --data-binary \"{\n  \\\"email_address\\\": \\\"johndoe1@user.com\\\",\n  \\\"Body\\\": \\\"\\\"\n}\" \\\n'https://rest.clicksend.com/v3/email/addresses'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\EmailMarketingApi(new GuzzleHttp\\Client(),$config);\n$email_address = new \\ClickSend\\Model\\EmailAddress(); // \\ClickSend\\Model\\EmailAddress |\n$email_address->setEmailAddress(\"xxx@gmail.com\"); \n\ntry {\n    $result = $apiInstance->allowedEmailAddressPost($email_address);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling EmailMarketingApi->allowedEmailAddressPost: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar deliveryIssuesApi = new DeliveryIssuesApi(configuration);\nvar response = emailMarketingApi.AllowedEmailAddressPost(new EmailAddress(\n    emailAddress: \"john@doe.com\"\n));"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.EmailMarketingApi;\nimport ClickSend.Model.EmailAddress;\n\npublic class create_allowed_email_address {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    EmailMarketingApi apiInstance = new EmailMarketingApi(defaultClient);\n    EmailAddress emailAddress = new EmailAddress(); // EmailAddress | \n    emailAddress.emailAddress(\"xxx@gmail.com\");\n    try {\n        String result = apiInstance.allowedEmailAddressPost(emailAddress);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling EmailMarketingApi#allowedEmailAddressPost\");\n        e.printStackTrace();\n    }\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar emailMarketingApi = new api.EmailMarketingApi(\"USERNAME\", \"API_KEY\");\n\nvar emailAddress = new api.EmailAddress();\n\nemailAddress.emailAddress = \"xxx@gmail.com\";\n\nemailMarketingApi.allowedEmailAddressPost(emailAddress).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::EmailMarketingApi.new\n\n# EmailAddress |\nopts = {\n  email_address: ClickSendClient::EmailAddress.new(\n    \"email_address\": \"test@test.com\"\n  )\n}\n\nbegin\n  # Create allowed Email Address\n  result = api_instance.allowed_email_address_post(opts)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling EmailMarketingApi->allowed_email_address_post: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.EmailMarketingApi(clicksend_client.ApiClient(configuration))\n# EmailAddress |  (optional)\nemail_address = clicksend_client.EmailAddress(email_address='abc@gmail.com') \n\ntry:\n    # Create allowed Email Address\n    api_response = api_instance.allowed_email_address_post(email_address=email_address)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling EmailMarketingApi->allowed_email_address_post: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::EmailMarketingApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::EmailMarketingApi->new(username => $username, password => $password);\n\nmy $json_output = $api->allowed_email_address_post('email_address' => 'test2@test.com');\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "CSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nCSEmailMarketingApi *emailMarketingApiInstance = [[CSEmailMarketingApi alloc] init];\n\nCSEmailAddress *emailAddress = [[CSEmailAddress alloc] init];\nemailAddress.emailAddress = @\"\u0010johndoe1@gmail.com\";\n\n[emailMarketingApiInstance allowedEmailAddressPostWithEmailAddress:emailAddress completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\n\nEmailMarketingAPI.allowedEmailAddressPost { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n            print(error)\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/email/address-verify/{email_address_id}/send": {
      "put": {
        "summary": "Send Email Verification Token",
        "operationId": "send-email-verification-token",
        "description": "_Send verification token_\n\nSend verification token\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| email_address_id | path | integer(int32) | true | Allowed email address id |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "string",
                          "format": "email"
                        },
                        "name": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "from": {
                    "type": "object",
                    "properties": {
                      "email_address_id": {
                        "type": "integer"
                      },
                      "name": {
                        "type": "string"
                      }
                    }
                  },
                  "subject": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  }
                },
                "example": {
                  "to": [
                    {
                      "email": "test@test.com",
                      "name": "Test From"
                    }
                  ],
                  "from": {
                    "email_address_id": 2,
                    "name": "Test"
                  },
                  "subject": "Test Subject",
                  "body": "Test Body"
                }
              }
            }
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          },
          {
            "name": "email_address_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/send-email-verification-token"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n     --request PUT \\\n'https://rest.clicksend.com/v3/email/address-verify/{email_address_id}/send'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\EmailMarketingApi(new GuzzleHttp\\Client(),$config);\n$email_address_id = 4366; // int | Allowed email address id\n\ntry {\n    $result = $apiInstance->sendVerificationTokenGet($email_address_id);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling EmailMarketingApi->sendVerificationTokenGet: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar emailMarketingApi = new EmailMarketingApi(configuration);\nvar response = emailMarketingApi.SendVerificationTokenGet(EMAIL_ADDRESS_ID);"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.EmailMarketingApi;\n\npublic class send_email_verification_token {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    EmailMarketingApi apiInstance = new EmailMarketingApi(defaultClient);\n    Integer emailAddressId = 4244; // Integer | Allowed email address id\n    try {\n        String result = apiInstance.sendVerificationTokenGet(emailAddressId);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling EmailMarketingApi#sendVerificationTokenGet\");\n        e.printStackTrace();\n    }\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar emailMarketingApi = new api.EmailMarketingApi(\"USERNAME\", \"API_KEY\");\n\nvar emailAddressId = 4399;\n\nemailMarketingApi.sendVerificationTokenGet(emailAddressId).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::EmailMarketingApi.new\n\nemail_address_id = 56 # Integer | Allowed email address id\n\nbegin\n  # Send verification token\n  result = api_instance.send_verification_token_get(email_address_id)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling EmailMarketingApi->send_verification_token_get: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.EmailMarketingApi(clicksend_client.ApiClient(configuration))\nemail_address_id = 56 # int | Allowed email address id\n\ntry:\n    # Send verification token\n    api_response = api_instance.send_verification_token_get(email_address_id)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling EmailMarketingApi->send_verification_token_get: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::EmailMarketingApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::EmailMarketingApi->new(username => $username, password => $password);\n\nmy $json_output = $api->send_verification_token_put('email_address_id' => '12345');\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSEmailMarketingApi.h\"\n\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nNSNumber *emailId = [[NSNumber alloc] initWithInt:1];\n\nCSEmailMarketingApi *emailMarketingApiInstance = [[CSEmailMarketingApi alloc] init];\n[emailMarketingApiInstance sendVerificationTokenGetWithEmailAddressId:emailId completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\n\nEmailMarketingAPI.sendVerificationTokenGet(emailAddressId: 1) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n            print(error)\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/email/address-verify/{email_address_id}/verify/{activation_token}": {
      "put": {
        "summary": "Verify Allowed Email Address",
        "operationId": "verify-allowed-email-address",
        "description": "_Verify email address using verification token_\n\nVerify email address using verification token\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| email_address_id | path | integer(int32) | true | Allowed email address id |\n| activation_token | path | string | true | Your activation token. |\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "from": {
                    "type": "object",
                    "properties": {
                      "email_address_id": {
                        "type": "integer"
                      },
                      "name": {
                        "type": "string"
                      }
                    }
                  },
                  "subject": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  }
                },
                "example": {
                  "to": [
                    {
                      "email": "test@test.com",
                      "name": "test from"
                    }
                  ],
                  "from": {
                    "email_address_id": 2,
                    "name": "test"
                  },
                  "subject": "test subject",
                  "body": "test body"
                }
              }
            }
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          },
          {
            "name": "email_address_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "activation_token",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/verify-allowed-email-address"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n     --request PUT \\\n'https://rest.clicksend.com/v3/email/address-verify/{email_address_id}/verify/{activation_token}'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\EmailMarketingApi(new GuzzleHttp\\Client(),$config);\n$email_address_id = 4366; // int | Allowed email address id\n$activation_token = \"C3395F04-F2CA-4BD5-A2B5-5A96D598A7F0\"; // string | Your activation token.\n\ntry {\n    $result = $apiInstance->verifyAllowedEmailAddressGet($email_address_id, $activation_token);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling EmailMarketingApi->verifyAllowedEmailAddressGet: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar emailMarketingApi = new EmailMarketingApi(configuration);\nvar response = emailMarketingApi.VerifyAllowedEmailAddressGet(EMAIL_ADDRESS_ID, \"ACTIVATION_CODE\");"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.EmailMarketingApi;\n\npublic class verify_allowed_email_address {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    EmailMarketingApi apiInstance = new EmailMarketingApi(defaultClient);\n    Integer emailAddressId = 4245; // Integer | Allowed email address id\n    // String | Your activation token.\n    String activationToken = \"activation_token_example\"; \n    try {\n        String result = apiInstance.verifyAllowedEmailAddressGet(emailAddressId, activationToken);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling EmailMarketingApi#verifyAllowedEmailAddressGet\");\n        e.printStackTrace();\n    }\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar emailMarketingApi = new api.EmailMarketingApi(\"USERNAME\", \"API_KEY\");\n\nvar emailAddressId = 4400;\nvar activationToken = \"B7A249DE-81EB-47FA-B320-B2F1D9EDAEFA\";\n\nemailMarketingApi.verifyAllowedEmailAddressGet(emailAddressId, activationToken).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::EmailMarketingApi.new\n\nemail_address_id = 56 # Integer | Allowed email address id\n\nactivation_token = \"activation_token\" # String | Your activation token.\n\nbegin\n  # Verify email address using verification token\n  result = api_instance.verify_allowed_email_address_get(email_address_id, activation_token)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling EmailMarketingApi->verify_allowed_email_address_get: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.EmailMarketingApi(clicksend_client.ApiClient(configuration))\nemail_address_id = 56 # int | Allowed email address id\nactivation_token = 'activation_token_example' # str | Your activation token.\n\ntry:\n    # Verify email address using verification token\n    api_response = api_instance.verify_allowed_email_address_get(email_address_id, activation_token)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling EmailMarketingApi->verify_allowed_email_address_get: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::EmailMarketingApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::EmailMarketingApi->new(username => $username, password => $password);\n\nmy $json_output = $api->verify_allowed_email_address_put('email_address_id' => '12345' , 'activation_token' => 'XXXXXXXX-XXXXX-XXXXXX-XXXX-XXXXXXXX');\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSEmailMarketingApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\n\nCSEmailMarketingApi *emailMarketingApiInstance = [[CSEmailMarketingApi alloc] init];\nNSNumber *emailAddressId = [[NSNumber alloc] initWithInt:1];\n\n[emailMarketingApiInstance verifyAllowedEmailAddressGetWithEmailAddressId:emailAddressId activationToken:@\"activation_token\" completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\nClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n\nEmailMarketingAPI.verifyAllowedEmailAddressGet(emailAddressId: 1, activationToken: \"activation_token\") { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n            print(error)\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/email/addresses/{email_address_id}": {
      "get": {
        "summary": "View Allowed Email Address",
        "operationId": "view-allowed-email-address",
        "description": "_Get specific email address_\n\nGet specific email address\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| email_address_id | path | integer(int32) | true | Allowed email address id |\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          },
          {
            "name": "email_address_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/view-allowed-email-address"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n'https://rest.clicksend.com/v3/email/addresses/{email_address_id}'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\EmailMarketingApi(new GuzzleHttp\\Client(),$config);\n$email_address_id = 4366; // int | Allowed email address id\n\ntry {\n    $result = $apiInstance->specificAllowedEmailAddressGet($email_address_id);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling EmailMarketingApi->specificAllowedEmailAddressGet: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar emailMarketingApi = new EmailMarketingApi(configuration);\nvar response = emailMarketingApi.SpecificAllowedEmailAddressGet(EMAIL_ADDRESS_ID);"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.EmailMarketingApi;\n\npublic class view_specific_allowed_email_address {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    EmailMarketingApi apiInstance = new EmailMarketingApi(defaultClient);\n    Integer emailAddressId = 4245; // Integer | Allowed email address id\n    try {\n        String result = apiInstance.specificAllowedEmailAddressGet(emailAddressId);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling EmailMarketingApi#specificAllowedEmailAddressGet\");\n        e.printStackTrace();\n    }\n  }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar emailMarketingApi = new api.EmailMarketingApi(\"USERNAME\", \"API_KEY\");\n\nvar emailAddressId = 4400;\n\nemailMarketingApi.specificAllowedEmailAddressGet(emailAddressId).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::EmailMarketingApi.new\n\nemail_address_id = 56 # Integer | Allowed email address id\n\nbegin\n  # Get specific email address\n  result = api_instance.specific_allowed_email_address_get(email_address_id)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling EmailMarketingApi->specific_allowed_email_address_get: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.EmailMarketingApi(clicksend_client.ApiClient(configuration))\nemail_address_id = 56 # int | Allowed email address id\n\ntry:\n    # Get specific email address\n    api_response = api_instance.specific_allowed_email_address_get(email_address_id)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling EmailMarketingApi->specific_allowed_email_address_get: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::EmailMarketingApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::EmailMarketingApi->new(username => $username, password => $password);\n\nmy $json_output = $api->specific_allowed_email_address_get('email_address_id' => '12345' );\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSEmailMarketingApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nNSNumber *emailId = [[NSNumber alloc] initWithInt:1];\nCSEmailMarketingApi *emailMarketingApiInstance = [[CSEmailMarketingApi alloc] init];\n[emailMarketingApiInstance specificAllowedEmailAddressGetWithEmailAddressId:emailId completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\n\nEmailMarketingAPI.specificAllowedEmailAddressGet(emailAddressId: 1) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n            print(error)\n        }\n    }\n}"
          }
        ]
      },
      "delete": {
        "summary": "Delete Allowed Email Address",
        "operationId": "delete-allowed-email-address",
        "description": "_Delete specific email address_\n\nDelete specific email address\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| email_address_id | path | integer(int32) | true | Allowed email address id |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          },
          {
            "name": "email_address_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/delete-allowed-email-address"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n     --request DELETE \\\n'https://rest.clicksend.com/v3/email/addresses/{email_address_id}'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\EmailMarketingApi(new GuzzleHttp\\Client(),$config);\n$email_address_id = 4245; // int | Allowed email address id\n\ntry {\n    $result = $apiInstance->specificAllowedEmailAddressDelete($email_address_id);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling EmailMarketingApi->specificAllowedEmailAddressDelete: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar emailMarketingApi = new EmailMarketingApi(configuration);\nvar response = emailMarketingApi.SpecificAllowedEmailAddressDelete(EMAIL_ADDRESS_ID);"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.EmailMarketingApi;\n\npublic class delete_allowed_email_address {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    EmailMarketingApi apiInstance = new EmailMarketingApi(defaultClient);\n    Integer emailAddressId = 4244; // Integer | Allowed email address id\n    try {\n        String result = apiInstance.specificAllowedEmailAddressDelete(emailAddressId);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling EmailMarketingApi#specificAllowedEmailAddressDelete\");\n        e.printStackTrace();\n    }\n  }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar emailMarketingApi = new api.EmailMarketingApi(\"USERNAME\", \"API_KEY\");\n\nvar emailAddressId = 4400;\n\nemailMarketingApi.specificAllowedEmailAddressDelete(emailAddressId).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::EmailMarketingApi.new\n\nemail_address_id = 4161 # Integer | Allowed email address id\n\nbegin\n  # Delete specific email address\n  result = api_instance.specific_allowed_email_address_delete(email_address_id)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling EmailMarketingApi->specific_allowed_email_address_delete: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.EmailMarketingApi(clicksend_client.ApiClient(configuration))\nemail_address_id = 56 # int | Allowed email address id\n\ntry:\n    # Delete specific email address\n    api_response = api_instance.specific_allowed_email_address_delete(email_address_id)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling EmailMarketingApi->specific_allowed_email_address_delete: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::EmailMarketingApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::EmailMarketingApi->new(username => $username, password => $password);\n\nmy $json_output = $api->specific_allowed_email_address_delete('email_address_id' => '1111' );\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSEmailMarketingApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nNSNumber *emailId = [[NSNumber alloc] initWithInt:1];\nCSEmailMarketingApi *emailMarketingApiInstance = [[CSEmailMarketingApi alloc] init];\n[emailMarketingApiInstance specificAllowedEmailAddressDeleteWithEmailAddressId:emailId completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\n\nEmailMarketingAPI.specificAllowedEmailAddressDelete(emailAddressId: 1) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n            print(error)\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/email-campaigns/send": {
      "post": {
        "summary": "Send Email Campaign",
        "operationId": "send-email-campaign",
        "description": "_Send email campaign_\n\nSend email campaign\n\n### Properties\n\n| Name | Type | Required | Restrictions | Description |\n| --- | --- | --- | --- | --- |\n| name | string | true | none | Your campaign name. |\n| subject | string | true | none | Your campaign subject. |\n| body | string | true | none | Your campaign message. |\n| from_email_address_id | number | true | none | The allowed email address id. |\n| from_name | string | true | none | Your name or business name. |\n| template_id | number | false | none | Your template id. |\n| list_id | number | true | none | Your contact list id. |\n| schedule | integer(int32) | false | none | Your schedule timestamp. |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "subject": {
                    "type": "string"
                  },
                  "from_email_address_id": {
                    "type": "string"
                  },
                  "template_id": {
                    "type": "string"
                  },
                  "list_id": {
                    "type": "string"
                  },
                  "from_name": {
                    "type": "string"
                  },
                  "draft": {
                    "type": "integer"
                  },
                  "custom_string": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  }
                },
                "example": {
                  "name": "test campaign",
                  "subject": "Test email subject",
                  "from_email_address_id": "{{emailId}}",
                  "template_id": "{{templateId}}",
                  "list_id": "{{listId}}",
                  "from_name": "Test Name",
                  "draft": 0,
                  "custom_string": "test !@#$%^&*()",
                  "body": "<p>it's a test</p>"
                }
              }
            }
          }
        },
        "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/send-email-campaign"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n     --request POST \\\n     --header \"Content-Type: application/json\" \\\n     --data-binary \"{\n  \\\"name\\\" : \\\"John Doe\\\",\n  \\\"subject\\\" : \\\"Lorem Ipsum\\\",\n  \\\"from_email_address_id\\\" : 2,\n  \\\"from_name\\\" : \\\"From name\\\",\n  \\\"template_id\\\" : 31,\n  \\\"body\\\" : \\\"<p>This is a test</p>\\\",\n  \\\"list_id\\\" : 456\n}\" \\\n'https://rest.clicksend.com/v3/email-campaigns/send'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\EmailMarketingApi(new GuzzleHttp\\Client(),$config);\n$email_campaign = new \\ClickSend\\Model\\EmailCampaign(); // \\ClickSend\\Model\\EmailCampaign | Email model\n$email_campaign->setName(\"John Doe\");\n$email_campaign->setSubject(\"Lorem Ipsum\");\n$email_campaign->setBody(\"<p>This is a test</p>\");\n$email_campaign->setFromEmailAddressId(4366);\n$email_campaign->setFromName(\"From name\");\n$email_campaign->setTemplateId(4299);\n$email_campaign->setListId(185161);\n$email_campaign->setSchedule(1577012461);\n\ntry {\n    $result = $apiInstance->emailCampaignPost($email_campaign);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling EmailMarketingApi->emailCampaignPost: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar emailMarketingApi = new EmailMarketingApi(configuration);\nvar emailCampaign = new EmailCampaign(\n    name: \"My Campaign\",\n    subject: \"This is test Subject\",\n    body: \"This is test body\",\n    fromEmailAddressId: FROM_EMAIL_ADDRESS_ID,\n    fromName: \"My Name\",\n    templateId: TEMPLATE_ID,\n    listId: LIST_ID,\n    schedule: 1123123\n);\nvar response = emailMarketingApi.EmailCampaignPost(emailCampaign);"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport java.math.BigDecimal;\nimport ClickSend.Api.EmailMarketingApi;\nimport ClickSend.Model.EmailCampaign;\n\npublic class send_email_campaign {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    EmailMarketingApi apiInstance = new EmailMarketingApi(defaultClient);\n    EmailCampaign emailCampaign = new EmailCampaign(); // EmailCampaign | Email model\n    emailCampaign.name(\"name\");\n    emailCampaign.subject(\"subject\");\n    emailCampaign.body(\"body\");\n    emailCampaign.fromEmailAddressId(new BigDecimal(4245));\n    emailCampaign.fromName(\"name\");\n    emailCampaign.templateId(new BigDecimal(4299));\n    emailCampaign.listId(new BigDecimal(185161));\n    emailCampaign.schedule(new Integer(1545477071));\n    try {\n        String result = apiInstance.emailCampaignPost(emailCampaign);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling EmailMarketingApi#emailCampaignPost\");\n        e.printStackTrace();\n    }\n  }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar emailMarketingApi = new api.EmailMarketingApi(\"USERNAME\", \"API_KEY\");\n\nvar emailCampaign = new api.EmailCampaign();\n\nemailCampaign.name = \"name\";\nemailCampaign.subject = \"subject\";\nemailCampaign.body = \"body\";\nemailCampaign.fromEmailAddressId = 4197;\nemailCampaign.fromName = \"bv\";\nemailCampaign.templateId = 4299;\nemailCampaign.listId = 185161;\n\nemailMarketingApi.emailCampaignPost(emailCampaign).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::EmailMarketingApi.new\n\n# EmailCampaign | Email model\nemail_campaign = ClickSendClient::EmailCampaign.new(\n  \"schedule\": 0,\n  \"list_id\": 123,\n  \"subject\": \"subject\",\n  \"from_email_address_id\": 1234,\n  \"name\": \"name\",\n  \"template_id\": 6.027456183070403,\n  \"body\": \"body\",\n  \"from_name\": \"from_name\"\n)\n\nbegin\n  # Send email campaign\n  result = api_instance.email_campaign_post(email_campaign)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling EmailMarketingApi->email_campaign_post: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.EmailMarketingApi(clicksend_client.ApiClient(configuration))\nemail_campaign = clicksend_client.EmailCampaign(\n                name=\"John Doe\",\n                subject=\"Lorem Ipsum\",\n                from_email_address_id=2,\n                from_name=\"From name\",\n                template_id=31,\n                body=\"<p>This is a test</p>\",\n                list_id=185161) # EmailCampaign | Email model\n\ntry:\n    # Send email campaign\n    api_response = api_instance.email_campaign_post(email_campaign)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling EmailMarketingApi->email_campaign_post: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::EmailMarketingApi;\nuse WWW::ClickSendClient::Object::EmailCampaign;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::EmailMarketingApi->new(username => $username, password => $password);\n\nmy %params = (\n    'name'                  => 'name',\n    'subject'               => 'subject',\n    'body'                  => 'body',\n    'from_email_address_id' => 'from_email_address_id',\n    'from_name'             => 'from_name',\n    'template_id'           => 'template_id',\n    'list_id'               => 'list_id',\n    'schedule'              => 'schedule'\n);\n\nmy $email_campaign_obj = WWW::ClickSendClient::Object::EmailCampaign->new(%params);\nmy $json_output = $api->email_campaign_post('email_campaign' => $email_campaign_obj);\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSEmailToSmsApi.h\"\n#import \"CSEmailMarketingApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nCSEmailMarketingApi *emailMarketingApiInstance = [[CSEmailMarketingApi alloc] init];\nCSEmailCampaign *emailCampaign = [[CSEmailCampaign alloc] init];\nemailCampaign.name = @\"John Doe\";\nemailCampaign.subject = @\"Lerem ipsum\";\nemailCampaign.fromEmailAddressId = @(2);\nemailCampaign.fromName = @\"From Name\";\nemailCampaign.templateId = @(31);\nemailCampaign.body = @\"This is a test\";\nemailCampaign.listId = @(456);\n\n[emailMarketingApiInstance emailCampaignPostWithEmailCampaign:emailCampaign completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\nlet emailCampaign = EmailCampaign(\n                        name: \"name\", \n                        subject: \"string\", \n                        body: \"string\", \n                        fromEmailAddressId: 1, \n                        fromName: \"string\", \n                        templateId: 2, \n                        listId: 1, \n                        schedule: 2\n                    )\nEmailMarketingAPI.emailCampaignPost(emailCampaign: emailCampaign, completion: { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n            print(error)\n        }\n    }\n})"
          }
        ]
      }
    },
    "/v3/email-campaigns/price": {
      "post": {
        "summary": "Calculate Email Campaign Price",
        "operationId": "calculate-email-campaign-price",
        "description": "_Calculate email campaign price_\n\nCalculate email campaign price\n\n### Properties\n\n| Name | Type | Required | Restrictions | Description |\n| --- | --- | --- | --- | --- |\n| name | string | true | none | Your campaign name. |\n| subject | string | true | none | Your campaign subject. |\n| body | string | true | none | Your campaign message. |\n| from_email_address_id | number | true | none | The allowed email address id. |\n| from_name | string | true | none | Your name or business name. |\n| template_id | number | false | none | Your template id. |\n| list_id | number | true | none | Your contact list id. |\n| schedule | integer(int32) | false | none | Your schedule timestamp. |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "subject": {
                    "type": "string"
                  },
                  "from_email_address_id": {
                    "type": "string"
                  },
                  "template_id": {
                    "type": "string"
                  },
                  "list_id": {
                    "type": "string"
                  },
                  "from_name": {
                    "type": "string"
                  },
                  "draft": {
                    "type": "integer"
                  },
                  "schedule": {
                    "type": "string"
                  },
                  "custom_string": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  }
                },
                "example": {
                  "name": "test campaign",
                  "subject": "Test email subject",
                  "from_email_address_id": "{{emailId}}",
                  "template_id": "{{templateId}}",
                  "list_id": "{{listId}}",
                  "from_name": "Test Name",
                  "draft": 0,
                  "schedule": "1250165515",
                  "custom_string": "test !@#$%^&*()",
                  "body": "<p>it's a test</p>"
                }
              }
            }
          }
        },
        "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/calculate-email-campaign-price"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n     --request POST \\\n     --header \"Content-Type: application/json\" \\\n     --data-binary \"{\n  \\\"name\\\" : \\\"John Doe\\\",\n  \\\"subject\\\" : \\\"Lorem Ipsum\\\",\n  \\\"from_email_address_id\\\" : 2,\n  \\\"from_name\\\" : \\\"From name\\\",\n  \\\"template_id\\\" : 31,\n  \\\"body\\\" : \\\"<p>This is a test</p>\\\",\n  \\\"list_id\\\" : 456\n}\" \\\n'https://rest.clicksend.com/v3/email-campaigns/price'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\EmailMarketingApi(new GuzzleHttp\\Client(),$config);\n$email_campaign = new \\ClickSend\\Model\\EmailCampaign(); // \\ClickSend\\Model\\EmailCampaign | Email model\n$email_campaign->setName(\"John Doe\");\n$email_campaign->setSubject(\"Lorem Ipsum\");\n$email_campaign->setBody(\"<p>This is a test</p>\");\n$email_campaign->setFromEmailAddressId(4366);\n$email_campaign->setFromName(\"From name\");\n$email_campaign->setTemplateId(4299);\n$email_campaign->setListId(185161);\n\ntry {\n    $result = $apiInstance->emailCampaignPricePost($email_campaign);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling EmailMarketingApi->emailCampaignPricePost: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar emailMarketingApi = new EmailMarketingApi(configuration);\nvar emailCampaign = new EmailCampaign(\n    name: \"My Campaign\",\n    subject: \"This is test Subject\",\n    body: \"This is test body\",\n    fromEmailAddressId:  FROM_EMAIL_ADDRESS_ID,\n    fromName: \"My Name\",\n    templateId: TEMPLATE_ID,\n    listId: LIST_ID,\n    schedule: 1123123\n);\nvar response = emailMarketingApi.EmailCampaignPricePost(emailCampaign);"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport java.math.BigDecimal;\nimport ClickSend.Api.EmailMarketingApi;\nimport ClickSend.Model.EmailCampaign;\n\npublic class calculate_email_campaign_price {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    EmailMarketingApi apiInstance = new EmailMarketingApi(defaultClient);\n    // EmailCampaign | Email model\n    EmailCampaign emailCampaign = new EmailCampaign(); \n    emailCampaign.name(\"name\");\n    emailCampaign.subject(\"subject\");\n    emailCampaign.body(\"body\");\n    emailCampaign.fromEmailAddressId(new BigDecimal(4245));\n    emailCampaign.fromName(\"name\");\n    emailCampaign.templateId(new BigDecimal(4299));\n    emailCampaign.listId(new BigDecimal(185161));\n    emailCampaign.schedule(new Integer(147852369));\n    try {\n        String result = apiInstance.emailCampaignPricePost(emailCampaign);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling EmailMarketingApi#emailCampaignPricePost\");\n        e.printStackTrace();\n    }\n  }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar emailMarketingApi = new api.EmailMarketingApi(\"USERNAME\", \"API_KEY\");\n\nvar emailCampaign = new api.EmailCampaign();\n\nemailCampaign.name = \"name\";\nemailCampaign.subject = \"subject\";\nemailCampaign.body = \"body\";\nemailCampaign.fromEmailAddressId = 4197;\nemailCampaign.fromName = \"bv\";\nemailCampaign.templateId = 4299;\nemailCampaign.listId = 185161;\nemailCampaign.schedule = 1546167661;\n\nemailMarketingApi.emailCampaignPricePost(emailCampaign).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::EmailMarketingApi.new\n\n# EmailCampaign | Email model\nemail_campaign = ClickSendClient::EmailCampaign.new(\n  \"schedule\": 0,\n  \"list_id\": 123,\n  \"subject\": \"subject\",\n  \"from_email_address_id\": 1234,\n  \"name\": \"name\",\n  \"template_id\": 6.027456183070403,\n  \"body\": \"body\",\n  \"from_name\": \"from_name\"\n)\n\nbegin\n  # Calculate email campaign price\n  result = api_instance.email_campaign_price_post(email_campaign)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling EmailMarketingApi->email_campaign_price_post: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.EmailMarketingApi(clicksend_client.ApiClient(configuration))\nemail_campaign = clicksend_client.EmailCampaign(\n                    name=\"John Doe\",\n                    subject=\"Lorem Ipsum\",\n                    from_email_address_id=2,\n                    from_name=\"From name\",\n                    template_id=31,\n                    body=\"<p>This is a test</p>\",\n                    list_id=185161) # EmailCampaign | Email model\n\ntry:\n    # Calculate email campaign price\n    api_response = api_instance.email_campaign_price_post(email_campaign)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling EmailMarketingApi->email_campaign_price_post: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::EmailMarketingApi;\nuse WWW::ClickSendClient::Object::EmailCampaign;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::EmailMarketingApi->new(username => $username, password => $password);\n\nmy %params = (\n    'name'                  => 'name',\n    'subject'               => '(First Name)(Cust. 2)(Cust. 3)(Cust. 4)(Email Address)',\n    'body'                  => 'body',\n    'from_email_address_id' => 'from_email_address_id',\n    'from_name'             => 'from_name',\n    'template_id'           => 'template_id',\n    'list_id'               => 'list_id',\n    'schedule'              => '0'\n);\n\nmy $email_campaign_obj = WWW::ClickSendClient::Object::EmailCampaign->new(%params);\n\nmy $json_output = $api->email_campaign_price_post('email_campaign' => $email_campaign_obj);\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSEmailMarketingApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nCSEmailCampaign *emailCampaign = [[CSEmailCampaign alloc] init];\nemailCampaign.name = @\"John Doe\";\nemailCampaign.subject = @\"Lerem ipsum\";\nemailCampaign.fromEmailAddressId = @(2);\nemailCampaign.fromName = @\"From Name\";\nemailCampaign.templateId = @(31);\nemailCampaign.body = @\"This is a test\";\nemailCampaign.listId = @(456);\n\nCSEmailMarketingApi *emailMarketingApiInstance = [[CSEmailMarketingApi alloc] init];\n[emailMarketingApiInstance emailCampaignPricePostWithEmailCampaign:emailCampaign \n                                                    completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\n\nlet emailCampaign = EmailCampaign(name: \"tring\", \n                                    subject: \"string\", \n                                    body: \"string\", \n                                    fromEmailAddressId: 1, \n                                    fromName: \"string\", \n                                    templateId: 2, \n                                    listId: 1, \n                                    schedule: 2)\n\nEmailMarketingAPI.emailCampaignPricePost(emailCampaign: emailCampaign) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n            print(error)\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/email-campaigns": {
      "get": {
        "summary": "View All Email Campaigns",
        "operationId": "view-all-email-campaigns",
        "description": "_Get all email campaigns_\n\nGet all email campaigns\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| page | query | integer(int32) | false | Page number |\n| limit | query | integer(int32) | false | Number of records per page |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</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-all-email-campaigns"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n'https://rest.clicksend.com/v3/email-campaigns'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\EmailMarketingApi(new GuzzleHttp\\Client(),$config);\n$page = 1; // int | Page number\n$limit = 10; // int | Number of records per page\n\ntry {\n    $result = $apiInstance->emailCampaignsGet($page, $limit);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling EmailMarketingApi->emailCampaignsGet: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar emailMarketingApi = new EmailMarketingApi(configuration);\nvar response = emailMarketingApi.EmailCampaignsGet();"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.EmailMarketingApi;\n\npublic class view_all_email_campaign {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    EmailMarketingApi apiInstance = new EmailMarketingApi(defaultClient);\n    Integer page = 1; // Integer | Page number\n    Integer limit = 10; // Integer | Number of records per page\n    try {\n        String result = apiInstance.emailCampaignsGet(page, limit);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling EmailMarketingApi#emailCampaignsGet\");\n        e.printStackTrace();\n    }\n  }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar emailMarketingApi = new api.EmailMarketingApi(\"USERNAME\", \"API_KEY\");\n\nvar page = 1;\nvar limit = 10;\n\nemailMarketingApi.emailCampaignsGet(page, limit).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::EmailMarketingApi.new\n\nopts = {\n  page: 1,  # Integer | Page number\n  limit: 10 # Integer | Number of records per page\n}\n\nbegin\n  # Get all email campaigns\n  result = api_instance.email_campaigns_get(opts)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling EmailMarketingApi->email_campaigns_get: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.EmailMarketingApi(clicksend_client.ApiClient(configuration))\npage = 1 # int | Page number (optional) (default to 1)\nlimit = 10 # int | Number of records per page (optional) (default to 10)\n\ntry:\n    # Get all email campaigns\n    api_response = api_instance.email_campaigns_get(page=page, limit=limit)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling EmailMarketingApi->email_campaigns_get: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::EmailMarketingApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::EmailMarketingApi->new(username => $username, password => $password);\n\nmy $json_output = $api->email_campaigns_get('page' => '1', 'limit' => '123');\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSEmailMarketingApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nNSNumber *page = [[NSNumber alloc] initWithInt:1];\nNSNumber *limit =[[NSNumber alloc] initWithInt:15];\nCSEmailMarketingApi *emailMarketingApiInstance = [[CSEmailMarketingApi alloc] init];\n[emailMarketingApiInstance emailCampaignsGetWithPage:page limit:limit completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\nEmailMarketingAPI.emailCampaignsGet(page: 1, limit: 15) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n            print(error)\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/email-campaigns/{email_campaign_id}": {
      "get": {
        "summary": "View Email Campaign",
        "operationId": "view-email-campaign",
        "description": "_Get specific email campaign_\n\nGet specific email campaign\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          },
          {
            "name": "email_campaign_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/view-email-campaign"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n'https://rest.clicksend.com/v3/email-campaigns/{email_campaign_id}'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\EmailMarketingApi(new GuzzleHttp\\Client(),$config);\n$email_campaign_id = 6805; // int | Allowed email campaign id\n\ntry {\n    $result = $apiInstance->emailCampaignGet($email_campaign_id);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling EmailMarketingApi->emailCampaignGet: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar emailMarketingApi = new EmailMarketingApi(configuration);\nvar response = emailMarketingApi.EmailCampaignGet(CAMPAIGN_ID);"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.EmailMarketingApi;\n\npublic class view_specific_email_campaign {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    EmailMarketingApi apiInstance = new EmailMarketingApi(defaultClient);\n    Integer emailCampaignId = 6676; // Integer | Allowed email campaign id\n    try {\n        String result = apiInstance.emailCampaignGet(emailCampaignId);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling EmailMarketingApi#emailCampaignGet\");\n        e.printStackTrace();\n    }\n  }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar emailMarketingApi = new api.EmailMarketingApi(\"USERNAME\", \"API_KEY\");\n\nvar emailCampaignId = 7196;\n\nemailMarketingApi.emailCampaignGet(emailCampaignId).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::EmailMarketingApi.new\n\nemail_campaign_id = 56 # Integer | Allowed email campaign id\n\nbegin\n  # Get specific email campaign\n  result = api_instance.email_campaign_get(email_campaign_id)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling EmailMarketingApi->email_campaign_get: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.EmailMarketingApi(clicksend_client.ApiClient(configuration))\nemail_campaign_id = 56 # int | Allowed email campaign id\n\ntry:\n    # Get specific email campaign\n    api_response = api_instance.email_campaign_get(email_campaign_id)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling EmailMarketingApi->email_campaign_get: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::EmailMarketingApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::EmailMarketingApi->new(username => $username, password => $password);\n\nmy $json_output = $api->email_campaign_get('email_campaign_id' => '123');\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSEmailMarketingApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nNSNumber *emailCampaignId = [[NSNumber alloc] initWithInt:1];\nCSEmailMarketingApi *emailMarketingApiInstance = [[CSEmailMarketingApi alloc] init];\n[emailMarketingApiInstance emailCampaignGetWithEmailCampaignId:emailCampaignId completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\n\nEmailMarketingAPI.emailCampaignGet(emailCampaignId: 1) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n            print(error)\n        }\n    }\n}"
          }
        ]
      },
      "put": {
        "summary": "Update Email Campaign",
        "operationId": "update-email-campaign",
        "description": "_Edit email campaign_\n\nEdit email campaign\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| email_campaign_id | path | integer(int32) | true | Allowed email campaign id |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "schedule": {
                    "type": "integer"
                  },
                  "list_id": {
                    "type": "integer"
                  },
                  "subject": {
                    "type": "string"
                  },
                  "from_email_address_id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  },
                  "template_id": {
                    "type": "integer"
                  },
                  "body": {
                    "type": "string"
                  },
                  "from_name": {
                    "type": "string"
                  }
                },
                "example": {
                  "schedule": 0,
                  "list_id": 123,
                  "subject": "subject",
                  "from_email_address_id": 4062,
                  "name": "name",
                  "template_id": 4077,
                  "body": "body",
                  "from_name": "from_name"
                }
              }
            }
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          },
          {
            "name": "email_campaign_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/update-email-campaign"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n     --request PUT \\\n     --header \"Content-Type: application/json\" \\\n     --data-binary \"{\n  \\\"name\\\" : \\\"John Doe\\\",\n  \\\"subject\\\" : \\\"Lorem Ipsum\\\",\n  \\\"from_email_address_id\\\" : 2,\n  \\\"from_name\\\" : \\\"From name\\\",\n  \\\"template_id\\\" : 31,\n  \\\"body\\\" : \\\"<p>This is a test</p>\\\",\n  \\\"list_id\\\" : 456\n}\" \\\n'https://rest.clicksend.com/v3/email-campaigns/{email_campaign_id}'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\EmailMarketingApi(new GuzzleHttp\\Client(),$config);\n$email_campaign_id = 7538; // int | Allowed email campaign id\n$email_campaign = new \\ClickSend\\Model\\EmailCampaign(); // \\ClickSend\\Model\\EmailCampaign | Email model\n$email_campaign->setName(\"John Doe\");\n$email_campaign->setSubject(\"Lorem Ipsum\");\n$email_campaign->setBody(\"<p>This is a test</p>\");\n$email_campaign->setFromEmailAddressId(4366);\n$email_campaign->setFromName(\"From name\");\n$email_campaign->setTemplateId(4299);\n$email_campaign->setListId(185161);\n\ntry {\n    $result = $apiInstance->emailCampaignPut($email_campaign_id, $email_campaign);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling EmailMarketingApi->emailCampaignPut: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar emailMarketingApi = new EmailMarketingApi(configuration);\nvar emailCampaign = new EmailCampaign(\n    name: \"My Campaign\",\n    subject: \"This is test Subject\",\n    body: \"This is test body\",\n    fromEmailAddressId:  FROM_EMAIL_ADDRESS_ID,\n    fromName: \"My Name\",\n    templateId: TEMPLATE_ID,\n    listId: LIST_ID,\n    schedule: 1123123\n);\nvar response = emailMarketingApi.EmailCampaignPut(CAMPAIGN_ID, emailCampaign);"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport java.math.BigDecimal;\nimport ClickSend.Api.EmailMarketingApi;\nimport ClickSend.Model.EmailCampaign;\n\npublic class update_email_campaign {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    EmailMarketingApi apiInstance = new EmailMarketingApi(defaultClient);\n    Integer emailCampaignId = 6804; // Integer | Allowed email campaign id\n    // EmailCampaign | Email model\n    EmailCampaign emailCampaign = new EmailCampaign(); \n    emailCampaign.name(\"name\");\n    emailCampaign.subject(\"subject\");\n    emailCampaign.body(\"body\");\n    emailCampaign.fromEmailAddressId(new BigDecimal(4245));\n    emailCampaign.fromName(\"name\");\n    emailCampaign.templateId(new BigDecimal(4299));\n    emailCampaign.listId(new BigDecimal(185161));\n    emailCampaign.schedule(new Integer(147852369));\n    try {\n        String result = apiInstance.emailCampaignPut(emailCampaignId, emailCampaign);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling EmailMarketingApi#emailCampaignPut\");\n        e.printStackTrace();\n    }\n  }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar emailMarketingApi = new api.EmailMarketingApi(\"USERNAME\", \"API_KEY\");\n\nvar emailCampaignId = 7197;\n\nvar emailCampaign = new api.EmailCampaign();\n\nemailCampaign.name = \"name\";\nemailCampaign.subject = \"subject\";\nemailCampaign.body = \"body\";\nemailCampaign.fromEmailAddressId = 4197;\nemailCampaign.fromName = \"bv\";\nemailCampaign.templateId = 4299;\nemailCampaign.listId = 185161;\n\nemailMarketingApi.emailCampaignPut(emailCampaignId, emailCampaign).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::EmailMarketingApi.new\n\nemail_campaign_id = 56 # Integer | Allowed email campaign id\n\n# EmailCampaign | Email model\nemail_campaign = ClickSendClient::EmailCampaign.new(\n  \"schedule\": 0,\n  \"list_id\": 123,\n  \"subject\": \"subject\",\n  \"from_email_address_id\": 4062,\n  \"name\": \"name\",\n  \"template_id\": 4077,\n  \"body\": \"body\",\n  \"from_name\": \"from_name\"\n)\n\nbegin\n  # Edit email campaign\n  result = api_instance.email_campaign_put(email_campaign_id, email_campaign)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling EmailMarketingApi->email_campaign_put: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.EmailMarketingApi(clicksend_client.ApiClient(configuration))\nemail_campaign_id = 56 # int | Allowed email campaign id\nemail_campaign = clicksend_client.EmailCampaign(\n                name=\"John Doe\",\n                subject=\"Lorem Ipsum\",\n                from_email_address_id=2,\n                from_name=\"From name\",\n                template_id=31,\n                body=\"<p>This is a test</p>\",\n                list_id=185161) # EmailCampaign | Email model\n\ntry:\n    # Edit email campaign\n    api_response = api_instance.email_campaign_put(email_campaign_id, email_campaign)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling EmailMarketingApi->email_campaign_put: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::EmailMarketingApi;\nuse WWW::ClickSendClient::Object::EmailCampaign;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::EmailMarketingApi->new(username => $username, password => $password);\n\nmy %params = (\n    'name'                  => 'name',\n    'subject'               => 'subject',\n    'body'                  => 'body',\n    'from_email_address_id' => 'from_email_address_id',\n    'from_name'             => 'from_name',\n    'template_id'           => 'template_id',\n    'list_id'               => 'list_id',\n    'schedule'              => '0'\n);\n\nmy $email_campaign_obj = WWW::ClickSendClient::Object::EmailCampaign->new(%params);\nmy $json_output = $api->email_campaign_put('email_campaign_id' => '1234', 'email_campaign' => $email_campaign_obj);\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSEmailMarketingApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nNSNumber *emailId = [[NSNumber alloc] initWithInt:1];\nCSEmailCampaign *emailCampaign = [[CSEmailCampaign alloc] init];\nemailCampaign.name = @\"John Doe\";\nemailCampaign.subject = @\"Lerem ipsum\";\nemailCampaign.fromEmailAddressId = @(2);\nemailCampaign.fromName = @\"From Name\";\nemailCampaign.templateId = @(31);\nemailCampaign.body = @\"This is a test\";\nemailCampaign.listId = @(456);\n\nCSEmailMarketingApi *emailMarketingApiInstance = [[CSEmailMarketingApi alloc] init];\n[emailMarketingApiInstance emailCampaignPutWithEmailCampaignId:emailId emailCampaign:emailCampaign  completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\n\nlet emailCampaign = EmailCampaign(\n                        name: \"John Doe\", \n                        subject: \"Lerem ipsum\", \n                        body: \"Lerem ipsum\", \n                        fromEmailAddressId: 2, \n                        fromName: \"string\", \n                        templateId: 2, \n                        listId: 1, \n                        schedule: 2\n                    )\nEmailMarketingAPI.emailCampaignPut(emailCampaignId: 1, emailCampaign: emailCampaign) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n            print(error)\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/email-campaigns/{email_campaign_id}/cancel": {
      "put": {
        "summary": "Cancel Email Campaign",
        "operationId": "cancel-email-campaign",
        "description": "_Cancel email campaign_\n\nCancel email campaign\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| email_campaign_id | path | integer(int32) | true | Allowed email campaign id |\n| date_from | query | integer(int32) | false | Start date (Unix Timestamp e.g. 1436849372) |\n| date_to | query | integer(int32) | false | End date (Unix Timestamp e.g. 1436879372) |\n| page | query | integer(int32) | false | [Page number](/#pagination) |\n| limit | query | integer(int32) | false | [Number of records per page](/#pagination) |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "subject": {
                    "type": "string"
                  },
                  "from_email_address_id": {
                    "type": "integer"
                  },
                  "template_id": {
                    "type": "integer"
                  },
                  "list_id": {
                    "type": "integer"
                  },
                  "from_name": {
                    "type": "string"
                  },
                  "draft": {
                    "type": "integer"
                  },
                  "schedule": {
                    "type": "string"
                  },
                  "custom_string": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  }
                },
                "example": {
                  "name": "test campaign",
                  "subject": "Test email subject",
                  "from_email_address_id": 1,
                  "template_id": 67,
                  "list_id": 285,
                  "from_name": "Test Name",
                  "draft": 0,
                  "schedule": "1250165515",
                  "custom_string": "test !@#$%^&*()",
                  "body": "<p>it's a test</p>"
                }
              }
            }
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          },
          {
            "name": "email_campaign_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/cancel-email-campaign"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n     --request PUT \\\n'https://rest.clicksend.com/v3/email-campaigns/{email_campaign_id}/cancel'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\EmailMarketingApi(new GuzzleHttp\\Client(),$config);\n$email_campaign_id = 7103; // int | Allowed email campaign id\n\ntry {\n    $result = $apiInstance->cancelEmailCampaignPut($email_campaign_id);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling EmailMarketingApi->cancelEmailCampaignPut: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar emailMarketingApi = new EmailMarketingApi(configuration);\nvar response = emailMarketingApi.CancelEmailCampaignPut(EMAIL_CAMPAIGN_ID);"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.EmailMarketingApi;\n\npublic class cancel_email_campaign {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    EmailMarketingApi apiInstance = new EmailMarketingApi(defaultClient);\n    Integer emailCampaignId = 6805; // Integer | Allowed email campaign id\n    try {\n        String result = apiInstance.cancelEmailCampaignPut(emailCampaignId);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling EmailMarketingApi#cancelEmailCampaignPut\");\n        e.printStackTrace();\n    }\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar emailMarketingApi = new api.EmailMarketingApi(\"USERNAME\", \"API_KEY\");\n\nvar emailCampaignId = 7197;\n\nemailMarketingApi.cancelEmailCampaignPut(emailCampaignId).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::EmailMarketingApi.new\n\nemail_campaign_id = 56 # Integer | Allowed email campaign id\n\nbegin\n  # Cancel email campaign\n  result = api_instance.cancel_email_campaign_put(email_campaign_id)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling EmailMarketingApi->cancel_email_campaign_put: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.EmailMarketingApi(clicksend_client.ApiClient(configuration))\nemail_campaign_id = 56 # int | Allowed email campaign id\n\ntry:\n    # Cancel email campaign\n    api_response = api_instance.cancel_email_campaign_put(email_campaign_id)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling EmailMarketingApi->cancel_email_campaign_put: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::EmailMarketingApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::EmailMarketingApi->new(username => $username, password => $password);\n\nmy $json_output = $api->cancel_email_campaign_put('email_campaign_id' => '1234');\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSEmailMarketingApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nNSNumber *emailCampaignId =[[NSNumber alloc] initWithInt:1];\nCSEmailMarketingApi *emailMarketingApiInstance = [[CSEmailMarketingApi alloc] init];\n[emailMarketingApiInstance cancelEmailCampaignPutWithEmailCampaignId:emailCampaignId \n                                                    completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\nEmailMarketingAPI.cancelEmailCampaignPut(emailCampaignId: 1) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n            print(error)\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/email-campaigns/{email_campaign_id}/history": {
      "get": {
        "summary": "View Email Campaign History",
        "operationId": "view-email-campaign-history",
        "description": "_Get specific email campaign history_\n\nGet specific email campaign history\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          },
          {
            "name": "email_campaign_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/view-email-campaign-history"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n'https://rest.clicksend.com/v3/email-campaigns/{campaign_id}/history'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\EmailMarketingApi(new GuzzleHttp\\Client(),$config);\n$email_campaign_id = 7102; // int | Allowed email campaign id\n$date_from = '1436849372'; // int | Start date\n$date_to = '1436899372'; // int | End date\n$page = 1; // int | Page number\n$limit = 10; // int | Number of records per page\n\ntry {\n    $result = $apiInstance->emailCampaignHistoryGet($email_campaign_id, $date_from, $date_to, $page, $limit);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling EmailMarketingApi->emailCampaignHistoryGet: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar emailMarketingApi = new EmailMarketingApi(configuration);\nvar response = emailMarketingApi.EmailCampaignHistoryGet(EMAIL_CAMPAIGN_ID);"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.EmailMarketingApi;\n\npublic class view_email_campaign_history {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    EmailMarketingApi apiInstance = new EmailMarketingApi(defaultClient);\n    Integer emailCampaignId = 6804; // Integer | Allowed email campaign id\n    Integer dateFrom = 1436849372; // Integer | Start date\n    Integer dateTo = 1436879372; // Integer | End date\n    Integer page = 1; // Integer | Page number\n    Integer limit = 10; // Integer | Number of records per page\n    try {\n        String result = apiInstance.emailCampaignHistoryGet(emailCampaignId, dateFrom, dateTo, page, limit);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling EmailMarketingApi#emailCampaignHistoryGet\");\n        e.printStackTrace();\n    }\n  }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar emailMarketingApi = new api.EmailMarketingApi(\"USERNAME\", \"API_KEY\");\n\nvar emailCampaignId = 7196;\nvar dateFrom = '1436479372';\nvar dateTo = '1436879372';\nvar page = 1;\nvar limit = 10;\n\nemailMarketingApi.emailCampaignHistoryGet(emailCampaignId, dateFrom, dateTo, page, limit).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::EmailMarketingApi.new\n\nemail_campaign_id = 6594 # Integer | Allowed email campaign id\n\nopts = {\n  date_from: 1436849372, # Integer | Start date\n  date_to: 1436879372,   # Integer | End date\n  page: 1,       # Integer | Page number\n  limit: 10      # Integer | Number of records per page\n}\n\nbegin\n  # Get specific email campaign history\n  result = api_instance.email_campaign_history_get(email_campaign_id, opts)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling EmailMarketingApi->email_campaign_history_get: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.EmailMarketingApi(clicksend_client.ApiClient(configuration))\nemail_campaign_id = 56 # int | Allowed email campaign id\ndate_from = 1436849372 # int | Start date (optional)\ndate_to = 1436879372 # int | End date (optional)\npage = 1 # int | Page number (optional) (default to 1)\nlimit = 10 # int | Number of records per page (optional) (default to 10)\n\ntry:\n    # Get specific email campaign history\n    api_response = api_instance.email_campaign_history_get(email_campaign_id, date_from=date_from, date_to=date_to, page=page, limit=limit)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling EmailMarketingApi->email_campaign_history_get: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::EmailMarketingApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::EmailMarketingApi->new(username => $username, password => $password);\nmy $json_output = $api->email_campaign_history_get('email_campaign_id' => '123' ,'date_from'  => '' ,'date_to' => '','page' => '' ,'limit' => '' );\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSEmailMarketingApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nNSNumber *emailId = [[NSNumber alloc] initWithInt:1];\nNSNumber *dateFrom = [[NSNumber alloc] initWithInt:1436849372];\nNSNumber *dateTo = [[NSNumber alloc] initWithInt:1436879372];\nNSNumber *page = [[NSNumber alloc] initWithInt:15];\nNSNumber *limit = [[NSNumber alloc] initWithInt:0];\n\nCSEmailMarketingApi *emailMarketingApiInstance = [[CSEmailMarketingApi alloc] init];\n[emailMarketingApiInstance emailCampaignHistoryGetWithEmailCampaignId:emailId  \n                                                            dateFrom:dateFrom \n                                                            dateTo:dateTo \n                                                            page:page \n                                                            limit:limit \n                                                            completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\n\nEmailMarketingAPI.emailCampaignHistoryGet(emailCampaignId: 1, \n                                            dateFrom: 1436849372, \n                                            dateTo: 1436879372, \n                                            page: 1, \n                                            limit: 15) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n            print(error)\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/email-campaigns/{email_campaign_id}/history/export": {
      "get": {
        "summary": "Export Email Campaign History",
        "operationId": "export-email-campaign-history",
        "description": "_Export specific email campaign history_\n\nExport specific email campaign history\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| email_campaign_id | path | integer(int32) | true | Allowed email campaign id |\n| date_from | query | integer(int32) | false | Start date (Unix Timestamp e.g. 1436849372) |\n| date_to | query | integer(int32) | false | End date (Unix Timestamp e.g. 1436879372) |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          },
          {
            "name": "email_campaign_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {}
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n'https://rest.clicksend.com/v3/email-campaigns/{campaign_id}/history/export'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\EmailMarketingApi(new GuzzleHttp\\Client(),$config);\n$email_campaign_id = 7102; // int | Allowed email campaign id\n$date_from = '1436849372'; // int | Start date\n$date_to = '1436879372'; // int | End date\n\ntry {\n    $result = $apiInstance->emailCampaignHistoryExportGet($email_campaign_id, $date_from, $date_to);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling EmailMarketingApi->emailCampaignHistoryExportGet: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar emailMarketingApi = new EmailMarketingApi(configuration);\nvar response = emailMarketingApi.EmailCampaignHistoryExportGet(CAMPAIGN_ID);"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.EmailMarketingApi;\n\npublic class export_email_campaign_history {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    EmailMarketingApi apiInstance = new EmailMarketingApi(defaultClient);\n    Integer emailCampaignId = 6804; // Integer | Allowed email campaign id\n    Integer dateFrom = 1436849372; // Integer | Start date\n    Integer dateTo = 1436879372; // Integer | End date\n    try {\n        String result = apiInstance.emailCampaignHistoryExportGet(emailCampaignId, dateFrom, dateTo);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling EmailMarketingApi#emailCampaignHistoryExportGet\");\n        e.printStackTrace();\n    }\n  }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar emailMarketingApi = new api.EmailMarketingApi(\"USERNAME\", \"API_KEY\");\n\nvar emailCampaignId = 7196;\nvar dateFrom = '1436849372';\nvar dateTo = '1436879372';\nvar page = 1;\nvar limit = 10;\n\nemailMarketingApi.emailCampaignHistoryExportGet(emailCampaignId, dateFrom, dateTo, page, limit).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::EmailMarketingApi.new\n\nemail_campaign_id = 56 # Integer | Allowed email campaign id\n\nopts = {\n  date_from: 1436849372, # Integer | Start date\n  date_to: 1436879372    # Integer | End date\n}\n\nbegin\n  # Export specific email campaign history\n  result = api_instance.email_campaign_history_export_get(email_campaign_id, opts)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling EmailMarketingApi->email_campaign_history_export_get: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.EmailMarketingApi(clicksend_client.ApiClient(configuration))\nemail_campaign_id = 56 # int | Allowed email campaign id\ndate_from = 1436849372 # int | Start date (optional)\ndate_to = 1436879372 # int | End date (optional)\n\ntry:\n    # Export specific email campaign history\n    api_response = api_instance.email_campaign_history_export_get(email_campaign_id, date_from=date_from, date_to=date_to)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling EmailMarketingApi->email_campaign_history_export_get: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::EmailMarketingApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::EmailMarketingApi->new(username => $username, password => $password);\n\nmy $json_output = $api->email_campaign_history_export_get('email_campaign_id' => '1234' ,'date_from'  => '' ,'date_to' => '' );\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSEmailMarketingApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nNSNumber *emailId = [[NSNumber alloc] initWithInt:1];\nNSNumber *dateFrom = [[NSNumber alloc] initWithInt:1436849372];\nNSNumber *dateTo = [[NSNumber alloc] initWithInt:1436879372];\n\nCSEmailMarketingApi *emailMarketingApiInstance = [[CSEmailMarketingApi alloc] init];\n[emailMarketingApiInstance emailCampaignHistoryExportGetWithEmailCampaignId:emailId dateFrom:dateFrom dateTo:dateTo completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\n\nEmailMarketingAPI.emailCampaignHistoryExportGet(emailCampaignId: 1) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n        if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n            print(error)\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/email/master-templates": {
      "get": {
        "summary": "View Master Email Templates",
        "operationId": "view-master-email-templates",
        "description": "_Get all master email templates._\n\nGet all master email templates.\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| page | query | integer(int32) | false | Page number |\n| limit | query | integer(int32) | false | Number of records per page |\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</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-master-email-templates"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n'https://rest.clicksend.com/v3/email/master-templates'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\MasterEmailTemplatesApi(new GuzzleHttp\\Client(),$config);\n$page = 1; // int | Page number\n$limit = 10; // int | Number of records per page\n\ntry {\n    $result = $apiInstance->masterEmailTemplatesGet($page, $limit);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling MasterEmailTemplatesApi->masterEmailTemplatesGet: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar masterEmailTemplatesApi = new MasterEmailTemplatesApi(configuration);\nvar response = masterEmailTemplatesApi.MasterEmailTemplatesGet();"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.MasterEmailTemplatesApi;\n\npublic class view_all_master_email_template {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    MasterEmailTemplatesApi apiInstance = new MasterEmailTemplatesApi(defaultClient);\n    Integer page = 1; // Integer | Page number\n    Integer limit = 10; // Integer | Number of records per page\n    try {\n        String result = apiInstance.masterEmailTemplatesGet(page, limit);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling MasterEmailTemplatesApi#masterEmailTemplatesGet\");\n        e.printStackTrace();\n    }\n  }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar masterEmailTemplateApi = new api.MasterEmailTemplatesApi(\"USERNAME\", \"API_KEY\");\n\nvar page = 1;\nvar limit = 10;\n\nmasterEmailTemplateApi.masterEmailTemplatesGet(page, limit).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::MasterEmailTemplatesApi.new\n\nopts = {\n  page: 1, # Integer | Page number\n  limit: 10 # Integer | Number of records per page\n}\n\nbegin\n  # Get all master email templates\n  result = api_instance.master_email_templates_get(opts)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling MasterEmailTemplatesApi->master_email_templates_get: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.MasterEmailTemplatesApi(clicksend_client.ApiClient(configuration))\npage = 1 # int | Page number (optional) (default to 1)\nlimit = 10 # int | Number of records per page (optional) (default to 10)\n\ntry:\n    # Get all master email templates\n    api_response = api_instance.master_email_templates_get(page=page, limit=limit)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling MasterEmailTemplatesApi->master_email_templates_get: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::MasterEmailTemplatesApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::MasterEmailTemplatesApi->new(username => $username, password => $password);\n\nmy $json_output = $api->master_email_templates_get('page' => '1','limit' => '1');\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSMasterEmailTemplatesApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nNSNumber *page = [[NSNumber alloc] initWithInt:1];\nNSNumber *limit = [[NSNumber alloc] initWithInt:15];\n\nCSMasterEmailTemplatesApi *masterEmailTemplatesApiInstance = [[CSMasterEmailTemplatesApi alloc] init];\n[masterEmailTemplatesApiInstance masterEmailTemplatesGetWithPage:page limit:limit completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\nMasterEmailTemplatesAPI.masterEmailTemplatesGet(page: 1, limit: 15) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n            print(error)\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/email/master-templates/{template_id}": {
      "get": {
        "summary": "View Master Email Template",
        "operationId": "view-master-email-template",
        "description": "_Get specific master email template_\n\nGet specific master email template\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| template_id | path | integer(int32) | true | Email template id |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          },
          {
            "name": "template_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/view-master-email-template"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n'https://rest.clicksend.com/v3/email/master-templates/{template_id}'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\MasterEmailTemplatesApi(new GuzzleHttp\\Client(),$config);\n$template_id = 62; // int | Email template id\n\ntry {\n    $result = $apiInstance->masterEmailTemplateGet($template_id);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling MasterEmailTemplatesApi->masterEmailTemplateGet: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar masterEmailTemplatesApi = new MasterEmailTemplatesApi(configuration);\nvar response = masterEmailTemplatesApi.MasterEmailTemplateGet(TEMPLATE_ID);"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.MasterEmailTemplatesApi;\n\npublic class view_specific_master_email_template {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    MasterEmailTemplatesApi apiInstance = new MasterEmailTemplatesApi(defaultClient);\n    Integer templateId = 63; // Integer | Email template id\n    try {\n        String result = apiInstance.masterEmailTemplateGet(templateId);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling MasterEmailTemplatesApi#masterEmailTemplateGet\");\n        e.printStackTrace();\n    }\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar masterEmailTemplateApi = new api.MasterEmailTemplatesApi(\"USERNAME\", \"API_KEY\");\n\nvar templateId = 1;\n\nmasterEmailTemplateApi.masterEmailTemplateGet(templateId).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::MasterEmailTemplatesApi.new\n\ntemplate_id = 56 # Integer | Email template id\n\nbegin\n  # Get specific master email template\n  result = api_instance.master_email_template_get(template_id)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling MasterEmailTemplatesApi->master_email_template_get: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.MasterEmailTemplatesApi(clicksend_client.ApiClient(configuration))\ntemplate_id = 61 # int | Email template id\n\ntry:\n    # Get specific master email template\n    api_response = api_instance.master_email_template_get(template_id)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling MasterEmailTemplatesApi->master_email_template_get: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::MasterEmailTemplatesApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::MasterEmailTemplatesApi->new(username => $username, password => $password);\n\nmy $json_output = $api->master_email_template_get('template_id' => '123');\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSMasterEmailTemplatesApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nNSNumber *templateId = [[NSNumber alloc] initWithInt:1];\n\nCSMasterEmailTemplatesApi *masterEmailTemplatesApiInstance = [[CSMasterEmailTemplatesApi alloc] init];\n[masterEmailTemplatesApiInstance masterEmailTemplateGetWithTemplateId:templateId completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\nMasterEmailTemplatesAPI.masterEmailTemplateGet(templateId: 1) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n            print(error)\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/email/master-templates-categories": {
      "get": {
        "summary": "View Template Categories",
        "operationId": "view-template-categories",
        "description": "_Get all master email template categories_\n\nGet all master email template categories\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| page | query | integer(int32) | false | Page number |\n| limit | query | integer(int32) | false | Number of records per page |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</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-template-categories"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n'https://rest.clicksend.com/v3/email/master-templates-categories'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\MasterEmailTemplatesApi(new GuzzleHttp\\Client(),$config);\n$page = 1; // int | Page number\n$limit = 10; // int | Number of records per page\n\ntry {\n    $result = $apiInstance->masterEmailTemplateCategoriesGet($page, $limit);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling MasterEmailTemplatesApi->masterEmailTemplateCategoriesGet: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar masterEmailTemplatesApi = new MasterEmailTemplatesApi(configuration);\nvar response = masterEmailTemplatesApi.MasterEmailTemplateCategoriesGet();"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.MasterEmailTemplatesApi;\n\npublic class view_all_template_categories {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    MasterEmailTemplatesApi apiInstance = new MasterEmailTemplatesApi(defaultClient);\n    Integer page = 1; // Integer | Page number\n    Integer limit = 10; // Integer | Number of records per page\n    try {\n        String result = apiInstance.masterEmailTemplateCategoriesGet(page, limit);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling MasterEmailTemplatesApi#masterEmailTemplateCategoriesGet\");\n        e.printStackTrace();\n    }\n  }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar masterEmailTemplateApi = new api.MasterEmailTemplatesApi(\"USERNAME\", \"API_KEY\");\n\nvar page = 1;\nvar limit = 10;\n\nmasterEmailTemplateApi.masterEmailTemplateCategoriesGet(page, limit).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::MasterEmailTemplatesApi.new\n\nopts = {\n  page: 1,  # Integer | Page number\n  limit: 10 # Integer | Number of records per page\n}\n\nbegin\n  # Get all master email template categories\n  result = api_instance.master_email_template_categories_get(opts)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling MasterEmailTemplatesApi->master_email_template_categories_get: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.MasterEmailTemplatesApi(clicksend_client.ApiClient(configuration))\npage = 1 # int | Page number (optional) (default to 1)\nlimit = 10 # int | Number of records per page (optional) (default to 10)\n\ntry:\n    # Get all master email template categories\n    api_response = api_instance.master_email_template_categories_get(page=page, limit=limit)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling MasterEmailTemplatesApi->master_email_template_categories_get: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::MasterEmailTemplatesApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::MasterEmailTemplatesApi->new(username => $username, password => $password);\n\nmy $json_output = $api->master_email_template_categories_get('page' => '1','limit' => '1');\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSMasterEmailTemplatesApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nNSNumber *categoryId = [[NSNumber alloc] initWithInt:1];\nNSNumber *page = [[NSNumber alloc] initWithInt:1];\nNSNumber *limit = [[NSNumber alloc] initWithInt:15];\n\nCSMasterEmailTemplatesApi *masterEmailTemplatesApiInstance = [[CSMasterEmailTemplatesApi alloc] init];\n[masterEmailTemplatesApiInstance masterEmailTemplatesInCategoryGetWithCategoryId:categoryId page:page limit:limit completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\n\nMasterEmailTemplatesAPI.masterEmailTemplatesInCategoryGet(categoryId: 1, page: 15, limit: nil) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n        print(error)\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/email/master-templates-categories/{category_id}": {
      "get": {
        "summary": "View Template Category",
        "operationId": "view-template-category",
        "description": "_Get specific master email template category_\n\nGet specific master email template category\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| category_id | path | integer(int32) | true | Email category id |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          },
          {
            "name": "category_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/view-template-category"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n'https://rest.clicksend.com/v3/email/master-templates-categories/{category_id}'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\MasterEmailTemplatesApi(new GuzzleHttp\\Client(),$config);\n$category_id = 4; // int | Email category id\n\ntry {\n    $result = $apiInstance->masterEmailTemplateCategoryGet($category_id);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling MasterEmailTemplatesApi->masterEmailTemplateCategoryGet: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar masterEmailTemplatesApi = new MasterEmailTemplatesApi(configuration);\nvar response = masterEmailTemplatesApi.MasterEmailTemplateCategoryGet(CATEGORY_ID);"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.MasterEmailTemplatesApi;\n\npublic class view_specific_template_category {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    MasterEmailTemplatesApi apiInstance = new MasterEmailTemplatesApi(defaultClient);\n    Integer categoryId = 2; // Integer | Email category id\n    try {\n        String result = apiInstance.masterEmailTemplateCategoryGet(categoryId);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling MasterEmailTemplatesApi#masterEmailTemplateCategoryGet\");\n        e.printStackTrace();\n    }\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar masterEmailTemplateApi = new api.MasterEmailTemplatesApi(\"USERNAME\", \"API_KEY\");\n\nvar categoryId = 2;\n\nmasterEmailTemplateApi.masterEmailTemplateCategoryGet(categoryId).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::MasterEmailTemplatesApi.new\n\ncategory_id = 56 # Integer | Email category id\n\nbegin\n  # Get specific master email template category\n  result = api_instance.master_email_template_category_get(category_id)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling MasterEmailTemplatesApi->master_email_template_category_get: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.MasterEmailTemplatesApi(clicksend_client.ApiClient(configuration))\ncategory_id = 16 # int | Email category id\n\ntry:\n    # Get specific master email template category\n    api_response = api_instance.master_email_template_category_get(category_id)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling MasterEmailTemplatesApi->master_email_template_category_get: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::MasterEmailTemplatesApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::MasterEmailTemplatesApi->new(username => $username, password => $password);\n\nmy $json_output = $api->master_email_template_category_get('category_id' => '1');\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSMasterEmailTemplatesApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nNSNumber *categoryId = [[NSNumber alloc] initWithInt:1];\nNSNumber *page = [[NSNumber alloc] initWithInt:1];\nNSNumber *limit = [[NSNumber alloc] initWithInt:15];\n\nCSMasterEmailTemplatesApi *masterEmailTemplatesApiInstance = [[CSMasterEmailTemplatesApi alloc] init];\n[masterEmailTemplatesApiInstance masterEmailTemplatesInCategoryGetWithCategoryId:categoryId page:page limit:limit completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\n\nMasterEmailTemplatesAPI.masterEmailTemplatesInCategoryGet(categoryId: 1) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n        print(error)\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/email/master-templates-categories/{category_id}/master-templates": {
      "get": {
        "summary": "View Templates in Category",
        "operationId": "view-templates-in-category",
        "description": "_Get all master email templates in a category_\n\nGet all master email templates in a category\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| category_id | path | integer(int32) | true | Email category id |\n| page | query | integer(int32) | false | Page number |\n| limit | query | integer(int32) | false | Number of records per page |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          },
          {
            "name": "category_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/view-templates-in-category"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n'https://rest.clicksend.com/v3/email/master-templates-categories/{category_id}/master-templates'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\MasterEmailTemplatesApi(new GuzzleHttp\\Client(),$config);\n$category_id = 4; // int | Email category id\n$page = 1; // int | Page number\n$limit = 10; // int | Number of records per page\n\ntry {\n    $result = $apiInstance->masterEmailTemplatesInCategoryGet($category_id, $page, $limit);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling MasterEmailTemplatesApi->masterEmailTemplatesInCategoryGet: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar masterEmailTemplatesApi = new MasterEmailTemplatesApi(configuration);\nvar response = masterEmailTemplatesApi.MasterEmailTemplatesInCategoryGet(CATEGORY_ID);"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.MasterEmailTemplatesApi;\n\npublic class view_template_in_category {\n  public static void main(String[] args) {\n    ApiClient defaultClient = new ApiClient();\n    defaultClient.setUsername(\"USERNAME\");\n    defaultClient.setPassword(\"API_KEY\");\n    MasterEmailTemplatesApi apiInstance = new MasterEmailTemplatesApi(defaultClient);\n    Integer categoryId = 2; // Integer | Email category id\n    Integer page = 1; // Integer | Page number\n    Integer limit = 10; // Integer | Number of records per page\n    try {\n        String result = apiInstance.masterEmailTemplatesInCategoryGet(categoryId, page, limit);\n        System.out.println(result);\n    } catch (ApiException e) {\n        System.err.println(\"Exception when calling MasterEmailTemplatesApi#masterEmailTemplatesInCategoryGet\");\n        e.printStackTrace();\n    }\n  }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar masterEmailTemplateApi = new api.MasterEmailTemplatesApi(\"USERNAME\", \"API_KEY\");\n\nvar categoryId = 2;\nvar page = 1;\nvar limit = 10;\n\nmasterEmailTemplateApi.masterEmailTemplatesInCategoryGet(categoryId, page, limit).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::MasterEmailTemplatesApi.new\n\ncategory_id = 4 # Integer | Email category id\n\nopts = {\n  page: 1, # Integer | Page number\n  limit: 10 # Integer | Number of records per page\n}\n\nbegin\n  # Get all master email templates in a category\n  result = api_instance.master_email_templates_in_category_get(category_id, opts)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling MasterEmailTemplatesApi->master_email_templates_in_category_get: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.MasterEmailTemplatesApi(clicksend_client.ApiClient(configuration))\ncategory_id = 13 # int | Email category id\npage = 1 # int | Page number (optional) (default to 1)\nlimit = 10 # int | Number of records per page (optional) (default to 10)\n\ntry:\n    # Get all master email templates in a category\n    api_response = api_instance.master_email_templates_in_category_get(category_id, page=page, limit=limit)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling MasterEmailTemplatesApi->master_email_templates_in_category_get: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::MasterEmailTemplatesApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::MasterEmailTemplatesApi->new(username => $username, password => $password);\n\nmy $json_output = $api->master_email_templates_in_category_get('category_id' => '123', 'page' => '1' ,'limit' => '10' );\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSMasterEmailTemplatesApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nNSNumber *categoryId = [[NSNumber alloc] initWithInt:1];\nNSNumber *page = [[NSNumber alloc] initWithInt:1];\nNSNumber *limit = [[NSNumber alloc] initWithInt:15];\n\nCSMasterEmailTemplatesApi *masterEmailTemplatesApiInstance = [[CSMasterEmailTemplatesApi alloc] init];\n[masterEmailTemplatesApiInstance masterEmailTemplatesInCategoryGetWithCategoryId:categoryId page:page limit:limit completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\nMasterEmailTemplatesAPI.masterEmailTemplatesInCategoryGet(categoryId: 1) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n        print(error)\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/email/templates": {
      "get": {
        "summary": "View Email Templates",
        "operationId": "view-email-templates",
        "description": "_Get all user email templates_\n\nGet all user email templates\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| page | query | integer(int32) | false | Page number |\n| limit | query | integer(int32) | false | Number of records per page |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</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-templates"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n'https://rest.clicksend.com/v3/email/templates'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\UserEmailTemplatesApi(new GuzzleHttp\\Client(),$config);\n$page = 1; // int | Page number\n$limit = 10; // int | Number of records per page\n\ntry {\n    $result = $apiInstance->emailTemplatesGet($page, $limit);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling UserEmailTemplatesApi->emailTemplatesGet: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar userEmailTemplatesApi = new UserEmailTemplatesApi(configuration);\nvar response = userEmailTemplatesApi.EmailTemplatesGet();"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.UserEmailTemplatesApi;\n\npublic class view_all_email_template {\n   public static void main(String[] args) {\n      ApiClient defaultClient = new ApiClient();\n      defaultClient.setUsername(\"USERNAME\");\n      defaultClient.setPassword(\"API_KEY\");\n      UserEmailTemplatesApi apiInstance = new UserEmailTemplatesApi(defaultClient);\n      Integer page = 1; // Integer | Page number\n      Integer limit = 10; // Integer | Number of records per page\n      try {\n          String result = apiInstance.emailTemplatesGet(page, limit);\n          System.out.println(result);\n      } catch (ApiException e) {\n          System.err.println(\"Exception when calling UserEmailTemplatesApi#emailTemplatesGet\");\n          e.printStackTrace();\n      }\n   }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar userEmailTemplateApi = new api.UserEmailTemplatesApi(\"USERNAME\", \"API_KEY\");\n\nvar page = 1;\nvar limit = 10;\n\nuserEmailTemplateApi.emailTemplatesGet(page, limit).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::UserEmailTemplatesApi.new\n\nopts = {\n  page: 1,  # Integer | Page number\n  limit: 10 # Integer | Number of records per page\n}\n\nbegin\n  # Get all user email templates\n  result = api_instance.email_templates_get(opts)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling UserEmailTemplatesApi->email_templates_get: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.UserEmailTemplatesApi(clicksend_client.ApiClient(configuration))\npage = 1 # int | Page number (optional) (default to 1)\nlimit = 10 # int | Number of records per page (optional) (default to 10)\n\ntry:\n    # Get all user email templates\n    api_response = api_instance.email_templates_get(page=page, limit=limit)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling UserEmailTemplatesApi->email_templates_get: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::UserEmailTemplatesApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::UserEmailTemplatesApi->new(username => $username, password => $password);\n\nmy $json_output = $api->email_templates_get('page' => '1' ,'limit' => '10' );\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSUserEmailTemplatesApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nNSNumber *page = [[NSNumber alloc] initWithInt:1];\nNSNumber *limit = [[NSNumber alloc] initWithInt:15];\n\nCSUserEmailTemplatesApi *userEmailTemplatesApiInstance = [[CSUserEmailTemplatesApi alloc] init];\n[userEmailTemplatesApiInstance emailTemplatesGetWithPage:page limit:limit completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\nUserEmailTemplatesAPI.emailTemplatesGet(page: 1, limit: 15) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n            print(error)\n        }\n    }\n}"
          }
        ]
      },
      "post": {
        "summary": "Create Email Template",
        "operationId": "create-email-template",
        "description": "_Create email template_\n\nCreate email template\n\n### Properties\n\n| Name | Type | Required | Restrictions | Description |\n| --- | --- | --- | --- | --- |\n| template_name | string | true | none | The intended name for the new template. |\n| template_id_master | number | true | none | The ID of the master template you want to base on. |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "template_id_master": {
                    "type": "integer"
                  },
                  "template_name": {
                    "type": "string"
                  }
                },
                "example": {
                  "template_id_master": 1,
                  "template_name": "bitpolypmus"
                }
              }
            }
          }
        },
        "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-template"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n     --request POST \\\n     --header \"Content-Type: application/json\" \\\n     --data-binary \"{\n  \\\"template_name\\\": \\\"Minions\\\",\n  \\\"template_id_master\\\": 57\n}\" \\\n'https://rest.clicksend.com/v3/email/templates'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\UserEmailTemplatesApi(new GuzzleHttp\\Client(),$config);\n// \\ClickSend\\Model\\EmailTemplateNew | Email template model\n$email_template = new \\ClickSend\\Model\\EmailTemplateNew(); \n$email_template->setTemplateName(\"template\");\n$email_template->setTemplateIdMaster(57);\n\ntry {\n    $result = $apiInstance->emailTemplatePost($email_template);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling UserEmailTemplatesApi->emailTemplatePost: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar userEmailTemplatesApi = new UserEmailTemplatesApi(configuration);\nvar response = userEmailTemplatesApi.EmailTemplatePost(new EmailTemplateNew( \n    templateName: \"Template Name\",\n    templateIdMaster: TEMPLATE_MASTER_ID\n));"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport java.math.BigDecimal;\nimport ClickSend.Api.UserEmailTemplatesApi;\nimport ClickSend.Model.EmailTemplateNew;\n\npublic class create_email_template {\n   public static void main(String[] args) {\n      ApiClient defaultClient = new ApiClient();\n      defaultClient.setUsername(\"USERNAME\");\n      defaultClient.setPassword(\"API_KEY\");\n      UserEmailTemplatesApi apiInstance = new UserEmailTemplatesApi(defaultClient);\n      EmailTemplateNew emailTemplate = new EmailTemplateNew(); // EmailTemplateNew | Email template model\n      emailTemplate.templateName(\"java template\");\n      emailTemplate.templateIdMaster(new BigDecimal(57));\n      try {\n          String result = apiInstance.emailTemplatePost(emailTemplate);\n          System.out.println(result);\n      } catch (ApiException e) {\n          System.err.println(\"Exception when calling UserEmailTemplatesApi#emailTemplatePost\");\n          e.printStackTrace();\n      }\n   }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar userEmailTemplateApi = new api.UserEmailTemplatesApi(\"USERNAME\", \"API_KEY\");\n\nvar emailTemplate = new api.EmailTemplateNew();\n\nemailTemplate.templateName = \"templateName\";\nemailTemplate.templateIdMaster = 56;\n\nuserEmailTemplateApi.emailTemplatePost(emailTemplate).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::UserEmailTemplatesApi.new\n\n# EmailTemplateNew | Email template model\nemail_template = ClickSendClient::EmailTemplateNew.new(\n  \"template_name\": \"template_name\",\n  \"template_id_master\": 10115\n)\n\nbegin\n  # Create email template\n  result = api_instance.email_template_post(email_template)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling UserEmailTemplatesApi->email_template_post: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.UserEmailTemplatesApi(clicksend_client.ApiClient(configuration))\nemail_template = clicksend_client.EmailTemplateNew(\n                  template_name='test_template',\n                  template_id_master=57) # EmailTemplateNew | Email template model\n\ntry:\n    # Create email template\n    api_response = api_instance.email_template_post(email_template)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling UserEmailTemplatesApi->email_template_post: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::UserEmailTemplatesApi;\nuse WWW::ClickSendClient::Object::EmailTemplateNew;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::UserEmailTemplatesApi->new(username => $username, password => $password);\n\nmy %params = (\n    'template_name'      => 'template_name',\n    'template_id_master' => '1234'\n);\n\nmy $email_template_obj = WWW::ClickSendClient::Object::EmailTemplateNew->new(%params);\nmy $json_output = $api->email_template_post('email_template' => $email_template_obj);\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSUserEmailTemplatesApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nCSEmailTemplateNew *emailTemplateNew = [[CSEmailTemplateNew alloc] init];\nemailTemplateNew.templateName = @\"string\";\nemailTemplateNew.templateIdMaster = 0;\nCSUserEmailTemplatesApi *userEmailTemplatesApiInstance = [[CSUserEmailTemplatesApi alloc] init];\n[userEmailTemplatesApiInstance emailTemplatePostWithEmailTemplate:emailTemplateNew completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\nlet emailTemplate = EmailTemplateNew(templateName: \"String\", templateIdMaster: 1);\nUserEmailTemplatesAPI.emailTemplatePost(emailTemplate: emailTemplate) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n        print(error)\n        }\n    }\n}"
          }
        ]
      }
    },
    "/v3/email/templates/{template_id}": {
      "get": {
        "summary": "View Email Template",
        "operationId": "view-email-template",
        "description": "_Get specific user email template_\n\nGet specific user email templates\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| template_id | path | integer(int32) | true | Email template id |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          },
          {
            "name": "template_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/view-email-template"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n'https://rest.clicksend.com/v3/email/templates/{template_id}'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\UserEmailTemplatesApi(new GuzzleHttp\\Client(),$config);\n$template_id = 4609; // int | Email template id\n\ntry {\n    $result = $apiInstance->emailTemplateGet($template_id);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling UserEmailTemplatesApi->emailTemplateGet: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar userEmailTemplatesApi = new UserEmailTemplatesApi(configuration);\nvar response = userEmailTemplatesApi.EmailTemplateGet(TEMPLATE_ID);"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.UserEmailTemplatesApi;\n\npublic class view_specific_email_template {\n   public static void main(String[] args) {\n      ApiClient defaultClient = new ApiClient();\n      defaultClient.setUsername(\"USERNAME\");\n      defaultClient.setPassword(\"API_KEY\");\n      UserEmailTemplatesApi apiInstance = new UserEmailTemplatesApi(defaultClient);\n      Integer templateId = 4227; // Integer | Email template id\n      try {\n          String result = apiInstance.emailTemplateGet(templateId);\n          System.out.println(result);\n      } catch (ApiException e) {\n          System.err.println(\"Exception when calling UserEmailTemplatesApi#emailTemplateGet\");\n          e.printStackTrace();\n      }\n   }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar userEmailTemplateApi = new api.UserEmailTemplatesApi(\"USERNAME\", \"API_KEY\");\n\nvar templateId = 4471;\n\nuserEmailTemplateApi.emailTemplateGet(templateId).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::UserEmailTemplatesApi.new\n\ntemplate_id = 56 # Integer | Email template id\n\nbegin\n  # Get specific user email template\n  result = api_instance.email_template_get(template_id)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling UserEmailTemplatesApi->email_template_get: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.UserEmailTemplatesApi(clicksend_client.ApiClient(configuration))\ntemplate_id = 4085 # int | Email template id\n\ntry:\n    # Get specific user email template\n    api_response = api_instance.email_template_get(template_id)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling UserEmailTemplatesApi->email_template_get: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::UserEmailTemplatesApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::UserEmailTemplatesApi->new(username => $username, password => $password);\n\nmy $json_output = $api->email_template_get('template_id' => '1234');\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSUserEmailTemplatesApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nNSNumber *templateId = [[NSNumber alloc] initWithInt:1];\n\nCSUserEmailTemplatesApi *userEmailTemplatesApiInstance = [[CSUserEmailTemplatesApi alloc] init];\n[userEmailTemplatesApiInstance emailTemplateGetWithTemplateId:templateId completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\nUserEmailTemplatesAPI.emailTemplateGet(templateId: 1) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n    print(error)\n        }   \n    }\n}"
          }
        ]
      },
      "put": {
        "summary": "Update Email Template",
        "operationId": "update-email-template",
        "description": "_Update email template_\n\nUpdate email template\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| template_id | path | integer(int32) | true | Email template id |\n\n### Properties\n\n| Name | Type | Required | Restrictions | Description |\n| --- | --- | --- | --- | --- |\n| template_name | string | false | none | The intended name for the template. |\n| body | string | true | none | Your template body. |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string"
                  }
                },
                "example": {
                  "body": "Test"
                }
              }
            }
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          },
          {
            "name": "template_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/update-email-template"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n     --request PUT \\\n\n     --data-binary \"    {\n        \\\"template_name\\\":\\\"Minions\\\",\n        \\\"body\\\":\\\"This is a sample content: Sc0KNWgSMG for this template.\\\"\n    }\" \\\n'https://rest.clicksend.com/v3/email/templates/{template_id}'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\UserEmailTemplatesApi(new GuzzleHttp\\Client(),$config);\n$template_id = 4609; // int | Email template id\n// \\ClickSend\\Model\\EmailTemplateUpdate | Email template model\n$email_template = new \\ClickSend\\Model\\EmailTemplateUpdate(); \n$email_template->setTemplateName(\"template\");\n$email_template->setBody(\"template body\");\n\ntry {\n    $result = $apiInstance->emailTemplatePut($template_id, $email_template);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling UserEmailTemplatesApi->emailTemplatePut: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar userEmailTemplatesApi = new UserEmailTemplatesApi(configuration);\nvar response = userEmailTemplatesApi.EmailTemplatePut(TEMPLATE_ID, new EmailTemplateUpdate(\n    templateName: \"New Name\",\n    body: \"Body\"\n));"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.UserEmailTemplatesApi;\nimport ClickSend.Model.EmailTemplateUpdate;\n\npublic class update_email_template {\n   public static void main(String[] args) {\n      ApiClient defaultClient = new ApiClient();\n      defaultClient.setUsername(\"USERNAME\");\n      defaultClient.setPassword(\"API_KEY\");\n      UserEmailTemplatesApi apiInstance = new UserEmailTemplatesApi(defaultClient);\n      Integer templateId = 4227; // Integer | Email template id\n      EmailTemplateUpdate emailTemplate = new EmailTemplateUpdate(); // EmailTemplateUpdate | Email template model\n      emailTemplate.templateName(\"java template\");\n      emailTemplate.body(\"update template content\");\n      try {\n          String result = apiInstance.emailTemplatePut(templateId, emailTemplate);\n          System.out.println(result);\n      } catch (ApiException e) {\n          System.err.println(\"Exception when calling UserEmailTemplatesApi#emailTemplatePut\");\n          e.printStackTrace();\n      }\n   }\n}"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar userEmailTemplateApi = new api.UserEmailTemplatesApi(\"USERNAME\", \"API_KEY\");\n\nvar templateId = 4471;\n\nvar emailTemplate = new api.EmailTemplateUpdate();\n\nemailTemplate.templateName = \"templateName\";\nemailTemplate.body = \"body\";\n\nuserEmailTemplateApi.emailTemplatePut(templateId, emailTemplate).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::UserEmailTemplatesApi.new\n\ntemplate_id = 56 # Integer | Email template id\n\n# EmailTemplateUpdate | Email template model\nemail_template = ClickSendClient::EmailTemplateUpdate.new(\n  \"template_name\": \"template_name\",\n  \"body\": \"body\"\n)\n\nbegin\n  # Update email template\n  result = api_instance.email_template_put(template_id, email_template)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling UserEmailTemplatesApi->email_template_put: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.UserEmailTemplatesApi(clicksend_client.ApiClient(configuration))\ntemplate_id = 4086 # int | Email template id\n# EmailTemplateUpdate | Email template model\nemail_template = clicksend_client.EmailTemplateUpdate(\n                  template_name='update_template',\n                  body='hey template updated now') \n\ntry:\n    # Update email template\n    api_response = api_instance.email_template_put(template_id, email_template)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling UserEmailTemplatesApi->email_template_put: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::UserEmailTemplatesApi;\nuse WWW::ClickSendClient::Object::EmailTemplateUpdate;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::UserEmailTemplatesApi->new(username => $username, password => $password);\n\nmy %params = (\n    'template_name' => 'template_name',\n    'body'          => 'body'\n);\n\nmy $email_templ_update_obj = WWW::ClickSendClient::Object::EmailTemplateUpdate->new(%params);\n\nmy $json_output = $api->email_template_put('template_id' => '1234' ,'email_template' => $email_templ_update_obj);\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSUserEmailTemplatesApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nCSEmailTemplateNew *emailTemplateNew = [[CSEmailTemplateNew alloc] init];\nemailTemplateNew.templateName = @\"string\";\nemailTemplateNew.templateIdMaster =0;\nCSUserEmailTemplatesApi *userEmailTemplatesApiInstance = [[CSUserEmailTemplatesApi alloc] init];\n[userEmailTemplatesApiInstance emailTemplatePostWithEmailTemplate:emailTemplateNew completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\n\nlet emailTemplate = EmailTemplateNew(\n                            templateName: \"templateName\", \n                            templateIdMaster: 1\n                    )\nUserEmailTemplatesAPI.emailTemplatePost(emailTemplate: emailTemplate) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n        print(error)\n        }\n    }\n}"
          }
        ]
      },
      "delete": {
        "summary": "Delete Email Template",
        "operationId": "delete-email-template",
        "description": "_Delete user email template_\n\nDelete user email template\n\n### Parameters\n\n| Parameter | In | Type | Required | Description |\n| --- | --- | --- | --- | --- |\n| template_id | path | integer(int32) | true | Email template id |\n\n\nRefer to [Status Codes](/#status-codes) for definitions of HTTP status code responses.\n\n\n<div style=\"background-color: #FF6A4B; padding: 10px; border-radius: 8px;\">\n  <span style=\"color: white;\">This endpoint requires authentication,</span> \n  <a href=\"/docs/#authentication\" style=\"color: white; text-decoration: underline;\">more info...</a>\n</div>",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          },
          {
            "name": "template_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/delete-email-template"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "source": "curl --include \\\n     --header \"Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==\"  \\\n     --request DELETE \\\n'https://rest.clicksend.com/v3/email/templates/{template_id}'"
          },
          {
            "lang": "PHP",
            "source": "<?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure HTTP basic authorization: BasicAuth\n$config = ClickSend\\Configuration::getDefaultConfiguration()\n              ->setUsername('USERNAME')\n              ->setPassword('API_KEY');\n\n$apiInstance = new ClickSend\\Api\\UserEmailTemplatesApi(new GuzzleHttp\\Client(),$config);\n$template_id = 4609; // int | Email template id\n\ntry {\n    $result = $apiInstance->emailTemplateDelete($template_id);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling UserEmailTemplatesApi->emailTemplateDelete: ', $e->getMessage(), PHP_EOL;\n}\n?>"
          },
          {
            "lang": "C#",
            "source": "using IO.ClickSend.ClickSend.Api;\nusing IO.ClickSend.Client;\nusing IO.ClickSend.ClickSend.Model;\n\nvar configuration = new Configuration()\n{\n    Username = USERNAME, \n    Password = API_KEY  \n};\nvar userEmailTemplatesApi = new UserEmailTemplatesApi(configuration);\nvar response = userEmailTemplatesApi.EmailTemplateDelete(TEMPLATE_ID);"
          },
          {
            "lang": "Java",
            "source": "package ClickSend;\n\nimport ClickSend.Api.UserEmailTemplatesApi;\n\npublic class delete_email_template {\n   public static void main(String[] args) {\n      ApiClient defaultClient = new ApiClient();\n      defaultClient.setUsername(\"USERNAME\");\n      defaultClient.setPassword(\"API_KEY\");\n      UserEmailTemplatesApi apiInstance = new UserEmailTemplatesApi(defaultClient);\n      Integer templateId = 4259; // Integer | Email template id\n      try {\n          String result = apiInstance.emailTemplateDelete(templateId);\n          System.out.println(result);\n      } catch (ApiException e) {\n          System.err.println(\"Exception when calling UserEmailTemplatesApi#emailTemplateDelete\");\n          e.printStackTrace();\n      }\n   }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "var api = require('./api.js');\n\nvar userEmailTemplateApi = new api.UserEmailTemplatesApi(\"USERNAME\", \"API_KEY\");\n\nvar templateId = 4471;\n\nuserEmailTemplateApi.emailTemplateDelete(templateId).then(function(response) {\n  console.log(response.body);\n}).catch(function(err){\n  console.error(err.body);\n});"
          },
          {
            "lang": "Ruby",
            "source": "# load the gem\nrequire 'clicksend_client'\nrequire 'json'\n\n# setup authorization\nClickSendClient.configure do |config|\n  # Configure HTTP basic authorization: BasicAuth\n  config.username = 'USERNAME'\n  config.password = 'API_KEY'\nend\n\napi_instance = ClickSendClient::UserEmailTemplatesApi.new\n\ntemplate_id = 56 # Integer | Email template id\n\nbegin\n  # Delete user email template\n  result = api_instance.email_template_delete(template_id)\n  p JSON.parse(result)\nrescue ClickSendClient::ApiError => e\n  puts \"Exception when calling UserEmailTemplatesApi->email_template_delete: #{e.response_body}\"\nend"
          },
          {
            "lang": "Python",
            "source": "from __future__ import print_function\nimport clicksend_client\nfrom clicksend_client.rest import ApiException\n\n# Configure HTTP basic authorization: BasicAuth\nconfiguration = clicksend_client.Configuration()\nconfiguration.username = 'USERNAME'\nconfiguration.password = 'API_KEY'\n\n# create an instance of the API class\napi_instance = clicksend_client.UserEmailTemplatesApi(clicksend_client.ApiClient(configuration))\ntemplate_id = 4085 # int | Email template id\n\ntry:\n    # Delete user email template\n    api_response = api_instance.email_template_delete(template_id)\n    print(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling UserEmailTemplatesApi->email_template_delete: %s\\n\" % e)"
          },
          {
            "lang": "perl",
            "source": "use WWW::ClickSendClient::UserEmailTemplatesApi;\n\nmy $username = 'YOUR_API_USER_NAME';\nmy $password = 'YOUR_API_PASSWORD';\n\nmy $api = WWW::ClickSendClient::UserEmailTemplatesApi->new(username => $username, password => $password);\n\nmy $json_output = $api->email_template_delete('template_id' => '1234');\n\nprint $json_output;"
          },
          {
            "lang": "objc",
            "source": "#import \"CSUserEmailTemplatesApi.h\"\n\nCSDefaultConfiguration *apiConfig = [CSDefaultConfiguration sharedConfig];\n[apiConfig setUsername:@\"USERNAME\"];\n[apiConfig setPassword:@\"PASSWORD\"];\n\nNSNumber *templateId = [[NSNumber alloc] initWithInt:1];\n\nCSUserEmailTemplatesApi *userEmailTemplatesApiInstance = [[CSUserEmailTemplatesApi alloc] init];\n[userEmailTemplatesApiInstance emailTemplateDeleteWithTemplateId:templateId completionHandler:^(NSString *output, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@\", output);\n    }\n}];"
          },
          {
            "lang": "swift",
            "source": "import Alamofire\n\nif let authHeader = Request.authorizationHeader(user: \"USERNAME\", password: \"PASSWORD\") {\n    ClickSendClientAPI.customHeaders = [authHeader.key : authHeader.value]\n}\n\nUserEmailTemplatesAPI.emailTemplateDelete(templateId: 1) { (dataString, error) in\n    guard let dataString = dataString else {\n        print(error!)\n        return\n    }\n    if let data = dataString.data(using: String.Encoding.utf8) {\n        do {\n            if let dictonary = try (JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary) {\n                print(dictonary)\n            } else {\n                print(\"Cannot convert the String value to JSON\")\n            }\n        } catch let error as NSError {\n            print(error)\n        }\n    }\n}"
          }
        ]
      }
    }
  }
}