{
  "openapi": "3.0.0",
  "servers": [
    {
      "description": "UniOne API-server instance",
      "url": "https://api.unione.io/en/transactional/api/v1"
    }
  ],
  "info": {
    "description": "All UniOne API methods require HTTPS connection. UniOne accepts HTTP POST requests in JSON format up to 10 megabytes long and returns HTTP response also in JSON. API endpoint (or base URL) depends on which datacenter the user is registered at. <br> The preferred way is to use https://api.unione.io/en/transactional/api/v1 endpoint, but also you can use https://eu1.unione.io/en/transactional/api/v1 or https://us1.unione.io/en/transactional/api/v1 directly, depending on the host your account was registered at.\n",
    "version": "1.87",
    "title": "Web API",
    "termsOfService": "https://unione.io/terms.html",
    "contact": {
      "url": "https://cp.unione.io/en/support"
    }
  },
  "security": [
    {
      "apiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Email",
      "description": "This group of methods is related with email sending."
    },
    {
      "name": "Email-validation",
      "description": "Email validation methods. As a result of the check, you’ll get detailed information on email validity. It will help eliminate nonexistent emails, decrease the number of complaints, clean up the subscribers list and eventually enhance your sender reputation score. For example, you may add validation to a subscription form on your site to let users know they’ve just entered an invalid address."
    },
    {
      "name": "Template",
      "description": "You have the option of storing a template on the UniOne side and then using it by id, which is highly recommended for sending repetitive messages or high volume traffic. UniOne supports two different [template engines](https://docs.unione.io/en/template-engines)."
    },
    {
      "name": "Webhook",
      "description": "UniOne lets you recieve notifications about email status changes or spam blocks. You provide an URL and every time a watched event occurs we will notify you by submitting a request with JSON data to this URL.\n\nYou can configure the format of webhook calls (JSON or gzipped JSON), which events you want to be notified of, whether or not you let us groups several events in one request, do you want to receive extra details like SMTP answer or recipient's user agent, etc.\n\nPlease note that your webhook handler should be able to process at least 5 parallel requests, up to 100 events each (but you can configure the maximum number of parallel connections up to 100, which is recommended).\n\nIf the URL of your webhook handler is not available (the response is not HTTP 200 OK within 3 seconds timeout), the system will repeat requests each 10 minutes during 24 hours, passing extra parameter retry_count. If there were at least 10 events during last 24 hours and all the webhook requests about these events have failed then we consider webhook handler broken and change it's status to inactive automatically. A notification about that is sent to an email [configured in control panel](https://cp.unione.io/en/user/alerting/technical/). \n\nThe format of webhook request and details of each event are described [here](#callback-format).\n"
    },
    {
      "name": "Suppression",
      "description": "Methods for managing suppression lists. An email can be added to suppression list because of unsubscription, bounce or complain."
    },
    {
      "name": "Domain",
      "description": "You can use these methods to setup sender domains and check their statuses. They might be useful in case you want to automate adding domains for your own clients.\n\nTo add new sender domain thru API you should take following steps:\n- Get DNS records with [domain/get-dns-records](#domain-get-dns-records) method and add them to your DNS provider.\n- Every 5-10 minutes call [domain/list](#domain-list) method for your domain (or several domains) and check verification-record.status and dkim.status in the response. You can call it more often if you like, but please not more than once per minute.\n- If verification-record.status=\"unconfirmed\" then you should call [domain/validate-verification-record](#domain-validate-verification-record) to trigger verification record validation.\n- If dkim.status=\"inactive\" then start DKIM checking by calling [domain/validate-dkim](#domain-validate-dkim) (UniOne itself checks  DKIM every 30 minutes also)\n- When you get verification-record.status=\"confirmed\" and dkim.status=\"active\" for the domain then you can stop checking it's status with domain/list and start using it as a sender domain.\n"
    },
    {
      "name": "Event-dump",
      "description": "These methods are used to obtain a list of events for a given period of time. The data is stored for up to 45 days, depending on your tariff, i. e. you may fetch all event data starting from 00:00:00 31 days ago and up to current time. For custom tarifs with big sending volumes event dumps are available only for the last 7 days."
    },
    {
      "name": "Tag",
      "description": "This family of methods is used to manage user-defined tags. Tags are used to categorize letters based on your own criteria, e. g. to create a distinction between marketing and transactional letters or group together all notifications for a particular order type. UniOne allows you to assign tags to all outgoing emails, and the tags you’ve set may then be used to filter and analyze delivery statistics."
    },
    {
      "name": "Project",
      "description": "Projects allow you to group several independent domains, webhooks, templates, and unsubscription lists together. It's very useful if you have your own clients and manage their data from a single UniOne account. Each project receives its own API key, and all API calls with that API key only deal with the data of that project. This way, you can assign a separate project for each client and be sure that they won't conflict; e.g. unsubscribing from one project won't affect another.\n\nProjects methods are disabled by default due to antispam measures. To enable them, [contact support](https://cp.unione.io/en/support).\n\nPlease note that sending domains are confirmed and used on per-project basis by default. But it's possible to allow projects to send emails from domains confirmed for main account - just [ask support](https://cp.unione.io/en/support) to enable it.\n"
    },
    {
      "name": "System",
      "description": "System operations."
    },
    {
      "name": "Obsolete",
      "description": "Obsolete methods dealing with unsubscribes. We recommend using the more flexible [suppression](#suppression) methods instead. Note that you can't resubscribe an unsubscribed recipient using WebAPI, but you can send him an email with subscription link using email/subscribe method."
    }
  ],
  "paths": {
    "/email/send.json": {
      "post": {
        "operationId": "email-send",
        "x-render-on-readme": true,
        "tags": [
          "Email"
        ],
        "summary": "Sends an email or a bunch of emails",
        "description": "While sending you can provide substitutions (merge tags), use a template, turn on read or click tracking, etc.\n\nRestrictions:\n* maximum request size is 10 MB\n* maximum number of recipients is 500\n* The symbol '/' is not allowed in attachment names\n\nIf the list of recipients contains invalid, non-existent, duplicate, or unsubscribed emails, those emails will be returned in the output parameter failed_emails, and the email will be sent to all other valid emails addresses. If all the emails addresses fall into failed_emails, sending will not be carried out and API error 204 will be returned.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "message"
                ],
                "properties": {
                  "message": {
                    "$ref": "#/components/schemas/MessageObject"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Email successfully accepted for sending.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "job_id"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "job_id": {
                      "type": "string",
                      "example": "1ZymBc-00041N-9X",
                      "description": "Job identifier, might be useful for investigating errors."
                    },
                    "emails": {
                      "type": "array",
                      "description": "Array of recipients emails successfully accepted for sending.",
                      "items": {
                        "type": "string",
                        "format": "email"
                      }
                    },
                    "failed_emails": {
                      "type": "object",
                      "description": "Object with emails rejected for sending as property names and their statuses as property values, e.g.: {\"email1@gmail.com\": \"temporary_unavailable\"}. Possible statuses:<ul><li>__unsubscribed__ - specified email is unsubscribed;<li>__invalid__ - the email does not exist or has been entered incorrectly;<li>__duplicate__ - the email already exists in the request, email duplicating is prevented;<li>__temporary_unavailable__ - the email address is unavailable. This means that over the next three days sending to this address will return an error. Email may be temporarily unavailable due to several reasons, e.g.: <ol><li>a previous email has been rejected by the recipient's server for spam;<li>the recipient's mailbox is full or is not used;<li>recipient's domain does not accept mail;<li>sending server was rejected due to blacklisting;</ol><li>__permanent_unavailable__ - the email address is permanently unavailable or unsubscribed globally.<li>__complained__ -  the recipient reported spam in the previous emails;<li>__blocked__ -  sending to the email is prohibited by administration of UniOne.</ul>We may added new statuses in the future.\n",
                      "items": {
                        "type": "string",
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      "example": {
                        "email1@gmail.com": "temporary_unavailable",
                        "bad@address": "invalid",
                        "email@example.com": "duplicate",
                        "root@example.org": "permanent_unavailable",
                        "olduser@example.net": "unsubscribed"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/email/subscribe.json": {
      "post": {
        "operationId": "email-subscribe",
        "tags": [
          "Email"
        ],
        "summary": "Sends an email with (re)subscribe link.",
        "description": "This method allows subscription renewal by a former subscriber who has previously unsubscribed, or who is blocked because of complaints. This method sends an email with a new subscription link to a former subscriber. Once the recipient clicks the link, their subscription status is restored.\nThere is a default restriction that limits this method to being used once a day. If you need to resubscribe more often, please ask support about it.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "from_email",
                  "from_name",
                  "to_email"
                ],
                "properties": {
                  "from_email": {
                    "type": "string",
                    "format": "email",
                    "example": "email@example.com",
                    "description": "Sender’s email. (Field alias \"email_address_from\" is supported, too)."
                  },
                  "from_name": {
                    "type": "string",
                    "example": "Example",
                    "description": "Sender’s name. (Field alias \"name_from\" is supported, too)."
                  },
                  "to_email": {
                    "type": "string",
                    "format": "email",
                    "example": "email@example.com",
                    "description": "Recipient’s email. (Field alias \"email_address_to\" is supported, too)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Email successfully accepted for sending.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/template/set.json": {
      "post": {
        "operationId": "template-set",
        "tags": [
          "Template"
        ],
        "summary": "Creates or updates an email template.",
        "description": "Restrictions:\n* The maximum request size is 10 MB.\n* The number of templates is limited to 10000.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Object with all the properties of the template.",
                "required": [
                  "template"
                ],
                "properties": {
                  "template": {
                    "$ref": "#/components/schemas/TemplateObject"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Template set successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "template"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "template": {
                      "$ref": "#/components/schemas/TemplateObject"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/template/get.json": {
      "post": {
        "operationId": "template-get",
        "tags": [
          "Template"
        ],
        "summary": "Gets template properties by it's id.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "example": "00000000-0000-0000-0000-000000000000",
                    "description": "Template id."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Template returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "template"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "template": {
                      "$ref": "#/components/schemas/TemplateObject"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/template/list.json": {
      "post": {
        "operationId": "template-list",
        "tags": [
          "Template"
        ],
        "summary": "Returns the list of all or some templates of the account.",
        "description": "You can iterate thru large list using \"offset\" and \"limit\" parameters. When less than \"limit\" templates are returned then the end of list is reached.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "default": 50,
                    "description": "Limits the number of templates returned, default is 50."
                  },
                  "offset": {
                    "type": "integer",
                    "default": 0,
                    "description": "Index of the first template in the list, starting with 0."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Template list returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "templates"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "templates": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TemplateListObject"
                      },
                      "description": "Array of template objects."
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/template/delete.json": {
      "post": {
        "operationId": "template-delete",
        "tags": [
          "Template"
        ],
        "summary": "Deletes a template by id.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "example": "00000000-0000-0000-0000-000000000000",
                    "description": "Template id."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Template deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/webhook/set.json": {
      "post": {
        "operationId": "webhook-set",
        "tags": [
          "Webhook"
        ],
        "summary": "Sets or edits a [webhook](#webhook), i.e. an event notification handler.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "example": "https://yourhost.example.com/unione-webhook",
                    "description": "URL that will receive the notification when an event occurs. The URL should be unique for a user or a project. Only ASCII characters are supported for now in URL, please convert to [Punycode](https://en.wikipedia.org/wiki/Punycode) if you need to use non-ASCII characters."
                  },
                  "status": {
                    "$ref": "#/components/schemas/WebhookStatusString"
                  },
                  "event_format": {
                    "$ref": "#/components/schemas/WebhookEventFormatString"
                  },
                  "delivery_info": {
                    "$ref": "#/components/schemas/WebhookDeliveryInfoInteger"
                  },
                  "single_event": {
                    "$ref": "#/components/schemas/WebhookSingleEventInteger"
                  },
                  "max_parallel": {
                    "$ref": "#/components/schemas/WebhookMaxParallelInteger"
                  },
                  "events": {
                    "$ref": "#/components/schemas/WebhookEventsObject"
                  }
                }
              }
            }
          }
        },
        "callbacks": {
          "callback-format": {
            "{$request.body#/url}": {
              "post": {
                "summary": "Webhook callback format description.",
                "x-code-samples": [
                  {
                    "lang": "php",
                    "source": "See HTTP sample"
                  },
                  {
                    "lang": "python",
                    "source": "See HTTP sample"
                  },
                  {
                    "lang": "ruby",
                    "source": "See HTTP sample"
                  },
                  {
                    "lang": "csharp",
                    "source": "See HTTP sample"
                  },
                  {
                    "lang": "java",
                    "source": "See HTTP sample"
                  },
                  {
                    "lang": "javascript",
                    "source": "See HTTP sample"
                  },
                  {
                    "lang": "http",
                    "source": "POST https://yourhost.example.com/unione-webhook HTTP/1.1\nHost: yourhost.example.com\nContent-Type: application/json\n\n{\n   \"auth\":\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n   \"events_by_user\":\n   [  \n      { \n        \"user_id\":456,\n        \"project_id\":\"6432890213745872\",\n        \"project_name\":\"MyProject\",\n        \"events\":\n        [  \n          {  \n            \"event_name\":\"transactional_email_status\",\n            \"event_data\":\n            {  \n              \"job_id\":\"1a3Q2V-0000OZ-S0\",\n              \"metadata\":\n              {\n                \"key1\":\"val1\",\n                \"key2\":\"val2\"\n              },\n              \"email\":\"recipient.email@example.com\",\n              \"status\":\"sent\",\n              \"event_time\":\"2015-11-30 15:09:42\",\n              \"url\":\"http://some.url.com\",\n              \"delivery_info\": \n              {\n                \"delivery_status\": \"err_delivery_failed\",\n                \"destination_response\": \"550 Spam rejected\",\n                \"user_agent\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36\",\n                \"ip\":\"111.111.111.111\",\n                \"country_code\":\"DE\",\n                \"country\":\"Germany\",\n                \"city\":\"Berlin\",\n                \"sender_ip\":\"192.0.2.10\"\n              }\n            }\n          },\n          {\n            \"event_name\":\"transactional_spam_block\",\n            \"event_data\":\n            {\n              \"block_time\":\"YYYY-MM-DD HH:MM:SS\",\n              \"block_type\":\"one_smtp\",\n              \"domain\":\"domain_name\", \n              \"SMTP_blocks_count\":8,\n              \"domain_status\":\"blocked\"\n            }\n          }\n        ]\n      }\n   ]\n}\n"
                  }
                ],
                "requestBody": {
                  "required": true,
                  "description": "Here you can see description of JSON parameters which will be sent to the URL you provide in [webhook/set](#webhook-set). Your server should response with 200 OK during 3 seconds or webhook call will be retried later. Read more about webhook concept [here](#webhook). <p> UniOne generates two types of events that have distinct event_name field and event_data structures: <ol> <li> __transactional_email_status__ - email delivery status change event. You can subscribe to selected statuses only. <li> __transactional_spam_block__ - event of activating/deactivating a spam block for single or multiple SMTP servers. </ol>",
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "object",
                        "required": [
                          "auth",
                          "events_by_user"
                        ],
                        "properties": {
                          "auth": {
                            "type": "string",
                            "description": "MD5-hash of the message body, in which the value \"auth\" is replaced by api key of the user/project; with this field the recipient of the notification can both authenticate and verify the notification integrity"
                          },
                          "events_by_user": {
                            "type": "array",
                            "description": "Array with only one element, containing events of a user/project.",
                            "items": {
                              "type": "object",
                              "required": [
                                "user_id",
                                "events"
                              ],
                              "properties": {
                                "user_id": {
                                  "$ref": "#/components/schemas/UserIdInteger"
                                },
                                "project_id": {
                                  "type": "string",
                                  "description": "Project identifier, present only if webhook was registered for the project using project API key."
                                },
                                "project_name": {
                                  "type": "string",
                                  "description": "Project name, present only if webhook was registered for the project using project API key."
                                },
                                "events": {
                                  "type": "array",
                                  "description": "Array of events reported by webhook.",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "event_name": {
                                        "type": "string",
                                        "enum": [
                                          "transactional_email_status",
                                          "transactional_spam_block"
                                        ],
                                        "description": "Type of event data contained in event_data field, either \"transactional_email_status\" or \"transactional_spam_block\"."
                                      },
                                      "event_data": {
                                        "type": "object",
                                        "description": "Object with different event properties depending on \"event_name\". Below you can see all the properties, \"transactional_email_status\"-related first and then \"transactional_spam_block\"-related.",
                                        "properties": {
                                          "job_id": {
                                            "type": "string",
                                            "example": "1ZymBc-00041N-9X",
                                            "description": "Job identifier returned earlier by [email/send](#email-send) method. Property exists only if event_name=\"transactional_email_status\"."
                                          },
                                          "metadata": {
                                            "type": "object",
                                            "additionalProperties": {
                                              "type": "string"
                                            },
                                            "example": {
                                              "campaign_id": "c77f4f4e-3561-49f7-9f07-c35be01b4f43",
                                              "customer_hash": "b253ac7"
                                            },
                                            "description": "Metadata passed in [email/send](#email-send) method in recipients.metadata or global_metadata properties. This property exists only if event_name=\"transactional_email_status\"."
                                          },
                                          "email": {
                                            "type": "string",
                                            "format": "email",
                                            "description": "Recipient's email. This property exists only if event_name=\"transactional_email_status\"."
                                          },
                                          "status": {
                                            "type": "string",
                                            "enum": [
                                              "sent",
                                              "delivered",
                                              "opened",
                                              "clicked",
                                              "unsubscribed",
                                              "subscribed",
                                              "soft_bounced",
                                              "hard_bounced",
                                              "spam"
                                            ],
                                            "description": "Email delivery status. This property exists only if event_name=\"transactional_email_status\". Possible values are:<br> <br>__accepted__ — the message has been accepted, but not sent yet. <br>__sent__ — the message has been sent, but not delivered yet. <br>__delivered__ — the message has been delivered. It can be changed to “opened”, “clicked”, “unsubscribed”, “subscribed” or “spam”. <br>__opened__ — the message has been delivered and read. It can be changed to “clicked”, “unsubscribed”, “subscribed” or “spam”. <br>__clicked__ — the message has been delivered, read, and at least one of the links in email has been clicked. It can be changed to “unsubscribed”, “subscribed” or “spam”. <br>__unsubscribed__ — the message has been delivered to the recipient and read, but then the recipient unsubscribed. It can be changed to “subscribed”. <br>__subscribed__ — the message has been delivered to the recipient and read, but then the recipient unsubscribed and subscribed again. It can be changed to “unsubscribed”. <br>__soft_bounced__ — temporary delivery failure. UniOne will try to deliver the message during 48 hours. In case of success the status changes to “delivered”, in case of failure to deliver during 48 hours message status changes to “hard_bounced”. <br>__hard_bounced__ — failed to deliver the message, there will be no delivery attempts. It's a final status. There are a lot of possible reasons, you can use SMTP response from delivery_info.destination_response field or UniOne internal reason classification from delivery_info.delivery_status field to analyze the reason. <br>__spam__ — the message has been delivered, but it was reported as spam by the recipient. UniOne can receive and process the spam complaint from several domains, including msn.com, outlook.com, hotmail.com, live.com, ukr.net, yahoo.com, aol.com using [FBL](https://en.wikipedia.org/wiki/Feedback_loop_(email))."
                                          },
                                          "event_time": {
                                            "type": "string",
                                            "format": "utc-date-time",
                                            "example": "2020-12-24 16:05:58",
                                            "description": "Event date & time in UTC time zone in \"YYYY-MM-DD hh:mm:ss\" format. This property exists only if event_name=\"transactional_email_status\"."
                                          },
                                          "url": {
                                            "type": "string",
                                            "format": "uri",
                                            "description": "URL for \"opened\" and \"clicked\" statuses. This property exists only if event_name=\"transactional_email_status\"."
                                          },
                                          "delivery_info": {
                                            "type": "object",
                                            "description": "Object with detailed delivery info.Event date & time in UTC time zone in \"YYYY-MM-DD hh:mm:ss\" format. This property exists only if webhook has delivery_info proeprty set to 1 and event_name=\"transactional_email_status\".",
                                            "properties": {
                                              "delivery_status": {
                                                "type": "string",
                                                "description": "UniOne internal detailed delivery status. Some possible values are:<br> <br> __err_user_unknown__ -- email address doesn't exist; <br> __err_user_inactive__ -- email address isn't used anymore; <br> __err_will_retry__ -- email was temporary rejected, delivery will be retried later; <br> __err_mailbox_discarded__ -- email address was active earlier, but now it's deleted; <br> __err_mailbox_full__ -- mailbox is full; <br> __err_spam_rejected__ -- email was rejected as a spam; <br> __err_blacklisted__ -- email was rejected because sender IP or sender domain is found in a black list; <br> __err_too_large__ -- email size is over limit, according to recipient's server; <br> __err_unsubscribed__ -- email was unsubscribed; <br> __err_unreachable__ -- numerous delivery failures lead to mark this email address as permanently unavailable; <br> __err_skip_letter__ -- sending has been canceled because the email address is temporarily unavailable; <br> __err_domain_inactive__ -- the domain does not accept mail or does not exist; <br> __err_destination_misconfigured__ -- the domain does not accept mail due to incorrect settings on the recipient’s side, and the server’s response contains information about a cause that can be fixed (for example, an inoperative blacklist is used, etc.); <br> __err_delivery_failed__ -- delivery failed due to other reasons; <br> __err_spam_skipped__ -- sending has been canceled because the campaign has been blocked as a spam; <br> __err_lost__ -- the message was not sent due to inconsistency of its parts or it has been lost because of the failure on our side. The sender needs to re-send the letter on his own, since the original has not been saved; <br><br> We reserve the right to change or add internal delivery statuses as we need, so the following list is provided as an example only, without any description: ok_sent, ok_delivered, ok_read, ok_link_visited, ok_unsubscribed, ok_resubscribed, ok_spam_folder, ok_fbl, not_sent, skip_dup_unreachable, skip_dup_temp_unreachable, skip_dup_mailbox_full, err_spam_removed, err_resend, err_unknown, err_retry_letter, err_src_invalid, err_dest_invalid, err_not_available, err_internal, err_no_dns, err_no_smtp, err_giveup."
                                              },
                                              "destination_response": {
                                                "type": "string",
                                                "description": "SMTP response."
                                              },
                                              "user_agent": {
                                                "type": "string",
                                                "example": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36",
                                                "description": "User agent of recipient. Present only if detected for \"clicked\" and \"opened\" statuses."
                                              },
                                              "ip": {
                                                "type": "string",
                                                "example": "111.222.33.44",
                                                "description": "Recipient's IP address. Present only if detected for \"clicked\" and \"opened\" statuses."
                                              },
                                              "country_code": {
                                                "type": "string",
                                                "example": "DE",
                                                "description": "ISO 3166-1 alpha-2 country code detected from recipient IP. Present for \"clicked\" and \"opened\" statuses."
                                              },
                                              "country": {
                                                "type": "string",
                                                "example": "Germany",
                                                "description": "Country detected from recipient IP. Present for \"clicked\" and \"opened\" statuses."
                                              },
                                              "city": {
                                                "type": "string",
                                                "example": "Berlin",
                                                "description": "City detected from recipient IP. Present for \"clicked\" and \"opened\" statuses."
                                              },
                                              "sender_ip": {
                                                "type": "string",
                                                "example": "192.0.2.10",
                                                "description": "IP address of the SMTP server that sent the message. Present only for \"delivered\", \"soft_bounced\" and \"hard_bounced\" statuses, if available."
                                              }
                                            }
                                          },
                                          "block_time": {
                                            "type": "string",
                                            "format": "utc-date-time",
                                            "example": "2020-12-24 16:05:58",
                                            "description": "Spam block date & time in UTC time zone in \"YYYY-MM-DD hh:mm:ss\" format. This property exists only if event_name=\"transactional_spam_block\"."
                                          },
                                          "block_type": {
                                            "type": "string",
                                            "enum": [
                                              "one_smtp",
                                              "all_smtp"
                                            ],
                                            "description": "Spam block type, either single or multiple sending SMTP. For single sending SMTP block in common pool UniOne retries several other SMTPs. This property exists only if event_name=\"transactional_spam_block\"."
                                          },
                                          "domain": {
                                            "type": "string",
                                            "example": "example.com",
                                            "description": "Domain that blocked sending. This property exists only if event_name=\"transactional_spam_block\"."
                                          },
                                          "SMTP_blocks_count": {
                                            "type": "integer",
                                            "description": "Number of sending SMTPs blocked. This property exists only if event_name=\"transactional_spam_block\"."
                                          },
                                          "domain_status": {
                                            "type": "string",
                                            "enum": [
                                              "blocked",
                                              "unblocked"
                                            ],
                                            "description": "Whether it's a block or unblock event. This property exists only if event_name=\"transactional_spam_block\"."
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "responses": {
                  "200": {
                    "description": "Your server returns code 200 in 3 seconds if it successfully processed the callback."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook set successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "object"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "object": {
                      "$ref": "#/components/schemas/WebhookObject"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/webhook/get.json": {
      "post": {
        "operationId": "webhook-get",
        "tags": [
          "Webhook"
        ],
        "summary": "Gets properties of a [webhook](#webhook).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "example": "https://example.com/webhook",
                    "description": "Webhook URL."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "object"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "object": {
                      "$ref": "#/components/schemas/WebhookObject"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/webhook/list.json": {
      "post": {
        "operationId": "webhook-list",
        "tags": [
          "Webhook"
        ],
        "summary": "List all or some [webhooks](#webhook) (event notification handlers) of a user or a project.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "description": "Limits the number of webhooks returned. 50 is recommended."
                  },
                  "offset": {
                    "type": "integer",
                    "default": 0,
                    "description": "Index of the first webhook in the list, starting with 0."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook list returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "object"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "objects": {
                      "type": "array",
                      "description": "Array of webhooks objects.",
                      "items": {
                        "$ref": "#/components/schemas/WebhookObject"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/webhook/delete.json": {
      "post": {
        "operationId": "webhook-delete",
        "tags": [
          "Webhook"
        ],
        "summary": "Deletes an event notification handler",
        "description": "You can also temporarily deactivate webhook without deleting it by setting it's status to \"disabled\" in [webhook/set](#webhook-set) method.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "example": "https://example.com/webhook",
                    "description": "Webhook URL."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/unsubscribed/set.json": {
      "post": {
        "operationId": "unsubscribed-set",
        "tags": [
          "Obsolete"
        ],
        "summary": "Registers a new unsubscribed email.",
        "description": "After registering an email as unsubscribed all future attempts to send a message to this email will be rejected. Please note that there's no way to remove an email from unsubscribed thru the API. But you can send an email with a link to resubscribe using [email/subscribe](#email-subscribe) method or remove \"unsubscribed\" status manually on [Email Search page](https://cp.unione.io/en/user/email) in control panel (but only a limited number of unsubscribed email per day can be removed).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "address"
                ],
                "properties": {
                  "address": {
                    "type": "string",
                    "format": "email",
                    "example": "email@example.com",
                    "description": "Email to be unsubscribed."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Email has been unsubscribed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "address",
                    "message"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "address": {
                      "type": "string",
                      "format": "email",
                      "description": "The unsubscribed email."
                    },
                    "message": {
                      "type": "string",
                      "enum": [
                        "unsubscribed",
                        "was inactive",
                        "was unsubscribed",
                        "added and unsubscribed"
                      ],
                      "description": "Unsubscription process details: <ul><li>\"unsubscribed\" if email has just been unsubscribed, <li>\"was inactive\" if it was inactive due some reason, <li>\"was unsubscribed\" if it already was unsubscribed before the call, <li>\"added and unsubscribed\" if it's a new email without status history and it was added and then unsubscribed immediately.</ul>\n"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/unsubscribed/check.json": {
      "post": {
        "operationId": "unsubscribed-check",
        "tags": [
          "Obsolete"
        ],
        "summary": "Checks if an email is unsubscribed.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "address"
                ],
                "properties": {
                  "address": {
                    "type": "string",
                    "format": "email",
                    "example": "email@example.com",
                    "description": "Email to check."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Email unsubscription status successfully returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "address",
                    "is_unsubscribed"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "address": {
                      "type": "string",
                      "format": "email",
                      "description": "Email that was checked."
                    },
                    "is_unsubscribed": {
                      "type": "boolean",
                      "description": "true if unsubscribed, false if not."
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/unsubscribed/list.json": {
      "post": {
        "operationId": "unsubscribed-list",
        "tags": [
          "Obsolete"
        ],
        "summary": "Returns a list of all unsubscribed emails since provided date.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "date_from": {
                    "type": "string",
                    "format": "utc-date",
                    "example": "2020-10-14",
                    "description": "Date in the format YYYY-MM-DD to get all unsubscribed emails from the \"date_from\" to the present day. If the parameter is not specified, the default period is today (from 00:00 UTC)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The list of unsubscribed emails returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "unsubscribed"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "unsubscribed": {
                      "type": "array",
                      "description": "Array of object describing unsubscribed emails.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "address": {
                            "type": "string",
                            "format": "email",
                            "description": "Unsubscribed email."
                          },
                          "unsubscribed_on": {
                            "type": "string",
                            "format": "utc-date-time",
                            "example": "2020-10-15 22:14:59",
                            "description": "Date and time when a recipient unsubscribed, in UTC timezone and \"YYYY-MM-DD hh:mm:ss\" format."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/suppression/set.json": {
      "post": {
        "operationId": "suppression-set",
        "tags": [
          "Suppression"
        ],
        "summary": "Adds an email address to the suppression list. You can always remove this address from the suppression list later using the [suppression/delete](#suppression-delete) method.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "cause"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "example": "email@example.com",
                    "description": "Email to add in suppression list."
                  },
                  "cause": {
                    "type": "string",
                    "example": "unsubscribed",
                    "description": "Cause of email being suppressed. One of:<ul><li>__unsubscribed__ - email is unsubscribed;<li>__temporary_unavailable__ - the email address is unavailable. This means that over the next three days sending to this address will return an error. Email may be temporarily unavailable due to several reasons, e.g.:<ol><li>a previous email has been rejected by the recipient's server for spam;<li>the recipient's mailbox is full or is not used;<li>recipient's domain does not accept mail;<li>sending server was rejected due to blacklisting;</ol><li>__permanent_unavailable__ - the email address is permanently unavailable due to multiple hard bounces; <li>__complained__ -  the recipient reported spam in the previous emails;</ul>"
                  },
                  "created": {
                    "type": "string",
                    "format": "utc-date-time",
                    "example": "2021-12-19 10:15:49",
                    "description": "When suppression was created, in UTC timezone in \"YYYY-MM-DD hh:mm:ss\" format."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Email has been added to the suppression list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/suppression/get.json": {
      "post": {
        "operationId": "suppression-get",
        "tags": [
          "Suppression"
        ],
        "summary": "Gets a reason and date of email suppression.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "example": "email@example.com",
                    "description": "Email to get suppression details for."
                  },
                  "all_projects": {
                    "type": "boolean",
                    "default": false,
                    "description": "If a user has projects functionality enabled, he/she can pass all_projects=true to search in all projects' data."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Method call has succeeded (but suppressions array can be empty if sending to email is not suppressed).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "email",
                    "suppressions"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "email": {
                      "type": "string",
                      "format": "email",
                      "description": "The email for which suppression details were requested."
                    },
                    "suppressions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SuppressionGetObject"
                      },
                      "description": "Array of suppression objects."
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/suppression/list.json": {
      "post": {
        "operationId": "suppression-list",
        "tags": [
          "Suppression"
        ],
        "summary": "Returns a suppression list since provided date.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cause": {
                    "type": "string",
                    "example": "unsubscribed",
                    "description": "Cause of email being suppressed. One of:<ul><li>__unsubscribed__ - email is unsubscribed;<li>__temporary_unavailable__ - the email address is unavailable. This means that over the next three days sending to this address will return an error. Email may be temporarily unavailable due to several reasons, e.g.:<ol><li>a previous email has been rejected by the recipient's server for spam;<li>the recipient's mailbox is full or is not used;<li>recipient's domain does not accept mail;<li>sending server was rejected due to blacklisting;</ol><li>__permanent_unavailable__ - the email address is permanently unavailable due to multiple hard bounces; <li>__complained__ -  the recipient reported spam in the previous emails;<li>__blocked__ -  sending to the email is prohibited by administration of UniOne.</ul>We may add some new causes in the future."
                  },
                  "source": {
                    "type": "string",
                    "example": "user",
                    "description": "Source of email being suppressed. One of:<ul><li>__user__ - suppressed by user with    [suppression/set](#suppression-set);<li>__system__ - sending to the email is prohibited by system, for example due to multiple hard bounces;<li>__subscriber__ - the recipient reported spam or unsubscribed in the previous emails.</ul>"
                  },
                  "start_time": {
                    "type": "string",
                    "format": "utc-date",
                    "example": "2020-10-14 17:00:00",
                    "description": "Date in the format YYYY-MM-DD hh:mm:ss to get suppression list from the \"start_time\" to the present day. Ignored if \"cursor\" is not empty."
                  },
                  "cursor": {
                    "type": "string",
                    "example": "Ajfb6Hvdkn3hdhhvG57xbdufhG5",
                    "description": "The parameter indicates from which position the selection is to be started. Must be empty or omitted for the first data chunk. In order to get subsequent chunks, you must set the \"cursor\" parameter in your request, using the value received in response to the previous request."
                  },
                  "limit": {
                    "type": "integer",
                    "example": 50,
                    "description": "Limits the number of records to be returned at one time, default is 50."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a suppression list since provided date.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "suppressions",
                    "cursor"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "suppressions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SuppressionListObject"
                      },
                      "description": "Array of suppression objects."
                    },
                    "cursor": {
                      "type": "string",
                      "example": "Ajfb6Hvdkn3hdhhvG57xbdufhG5",
                      "description": "The parameter indicates from which position the selection is to be started. Must be empty or omitted for the first data chunk. In order to get subsequent chunks, you must set the \"cursor\" parameter in your request, using the value received in response to the previous request."
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/suppression/delete.json": {
      "post": {
        "operationId": "suppression-delete",
        "tags": [
          "Suppression"
        ],
        "summary": "Deletes an email from suppression list (only records with is_deletable=true). If there are no entries of this email in the suppression list, API error 3003 is returned. If such entries exist but no one can be deleted, API error 3004 is returned. If daily limit of deletes exceeded, API error 906 is returned.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "example": "email@example.com",
                    "description": "An email to delete from suppression list."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Email has been deleted from the suppression list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/domain/get-dns-records.json": {
      "post": {
        "operationId": "domain-get-dns-records",
        "tags": [
          "Domain"
        ],
        "summary": "Returns info on domain DNS setup for using with UniOne.",
        "description": "In order to send emails you have to confirm that you own the domain that you are going to send emails from and setup DKIM signature for the domain. This method allows you to register your domain in UniOne and generate verification record and DKIM key, or return previously generated ones if domain is already registered.\nYou should add then DNS records like this to all of the domains you want to confirm:\n\n`@             IN TXT \"unione-validate-hash=483bb362ebdbeedd755cfb1d4d661\"`<br>\n`us._domainkey IN TXT \"k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDo7\"`<br>\n`@             IN TXT  \"v=spf1 include:spf.unione.io ~all\"`<br>\n\n- First record value should contain \"verification-record\" field returned by get-dns-records method \"as is\".\n- Second record value should contain \"dkim\" field value after \"p=\". Mind the name of this record! \"us._domainkey.\" prefix is important for DKIM selector of UniOne to work properly.\n- Third record contains optional, but very recommended SPF entry. Probably you already have one, then just add append include:spf.unione.io right after v=spf1.\n\nSyntax requirements of different DNS providers may differ:\n- sometimes it's necesarry to put full domain name instead of @ sign.\n- some providers require add TTL value (like 3600)\n- some providers don't require quotes for enclosing values\nPlease check requirements of your provider and advice your users to do it.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "domain"
                ],
                "properties": {
                  "domain": {
                    "type": "string",
                    "example": "example.com",
                    "description": "Domain to get DNS records for."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Domain DNS info returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "domain",
                    "verification-record",
                    "dkim"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "domain": {
                      "type": "string",
                      "example": "example.com",
                      "description": "Domain to get DNS records for."
                    },
                    "verification-record": {
                      "type": "string",
                      "example": "unione-validate-hash=483bb362ebdbeedd755cfb1d4d661",
                      "description": "Record to be added \"as is\" to verify ownership of this domain."
                    },
                    "dkim": {
                      "type": "string",
                      "example": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDo7",
                      "description": "DKIM signature for the domain. This property contains only the key part, you should prepend it with \"k=rsa, p=\" part for the record to be valid (see example)."
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/domain/validate-verification-record.json": {
      "post": {
        "operationId": "domain-validate-verification-record",
        "tags": [
          "Domain"
        ],
        "summary": "Triggers verification record validation for domain.",
        "description": "If you get 200 OK then it means the validation process started succesfully, but it doesn't mean the verification record is valid. You should check later verification-record.status field returned by [domain/list](#domain-list) method to get the result. Please read more [here](#domain).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "domain"
                ],
                "properties": {
                  "domain": {
                    "type": "string",
                    "example": "example.com",
                    "description": "Domain to validate verification record for."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verification record is valid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "message"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "message": {
                      "type": "string",
                      "example": "Record updated",
                      "description": "Debug message."
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured or record is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/domain/validate-dkim.json": {
      "post": {
        "operationId": "domain-validate-dkim",
        "tags": [
          "Domain"
        ],
        "summary": "Validates DKIM record for domain.",
        "description": "If you get 200 OK then it means the validation process started succesfully, but it doesn't mean the DKIM record is valid. You should check later dkim.status field returned by [domain/list](#domain-list) method to get the result. Please read more [here](#domain).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "domain"
                ],
                "properties": {
                  "domain": {
                    "type": "string",
                    "example": "example.com",
                    "description": "Domain to validate DKIM record for."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "DKIM record validation has started successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "message"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "message": {
                      "type": "string",
                      "example": "Record updated",
                      "description": "Debug message."
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured or record is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/domain/list.json": {
      "post": {
        "operationId": "domain-list",
        "tags": [
          "Domain"
        ],
        "summary": "Returns a list of all registered domains for user or project, together with statuses of last validations.",
        "description": "Returns last status of ownership validation and DKIM validation for each domain. Read more [here](#domain).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string",
                    "example": "example.com",
                    "description": "Optional domain name if you want to get the status of single domain only."
                  },
                  "limit": {
                    "type": "integer",
                    "default": 50,
                    "description": "Limits the number of domains returned. Default is 50."
                  },
                  "offset": {
                    "type": "integer",
                    "default": 0,
                    "description": "Index of the first domain in the list, starting with 0."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The list of the registered domains returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "domains"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "domains": {
                      "type": "array",
                      "description": "Array of objects describing domains.",
                      "items": {
                        "type": "object",
                        "required": [
                          "domain",
                          "verification-record",
                          "dkim"
                        ],
                        "properties": {
                          "domain": {
                            "type": "string",
                            "example": "example.com",
                            "description": "Domain name."
                          },
                          "verification-record": {
                            "type": "object",
                            "description": "Object describing verification record value and status.",
                            "properties": {
                              "value": {
                                "type": "string",
                                "example": "unione-validate-hash=483bb362ebdbeedd755cfb1d4d661",
                                "description": "Record to be added \"as is\" to verify ownership of this domain."
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "confirmed",
                                  "unconfirmed"
                                ],
                                "description": "Only domains with \"confirmed\" verification record are allowed as sender domains."
                              }
                            }
                          },
                          "dkim": {
                            "type": "object",
                            "description": "Object describing DKIM record value and status.",
                            "properties": {
                              "key": {
                                "type": "string",
                                "example": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDo7",
                                "description": "DKIM signature for the domain. This property contains only the key part, you should prepend it with \"k=rsa, p=\" part for the record to be valid (see [domain/get-dns-records](#domain-get-dns-records))."
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "active",
                                  "inactive"
                                ],
                                "description": "Only domains with \"active\" DKIM record are allowed as sender domains."
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/domain/delete.json": {
      "post": {
        "operationId": "domain-delete",
        "tags": [
          "Domain"
        ],
        "summary": "Deletes a domain. Attention: you should use project's API key to delete a project's domain.",
        "description": "Deletes a domain.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string",
                    "example": "example.com",
                    "description": "Domain name to delete."
                  }
                },
                "required": [
                  "domain"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Domain has been successfully deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "message"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "message": {
                      "type": "string",
                      "example": "Domain deleted",
                      "description": "Domain deleted"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/event-dump/create.json": {
      "post": {
        "operationId": "event-dump-create",
        "tags": [
          "Event-dump"
        ],
        "summary": "This asynchronous method initiates the preparation of data dump in CSV format. The number of dump files created or stored is limited to 10; to order more files, you have to delete one of the previous ones or wait until they will be deleted automatically. A newly created dump file is kept for 8 hours. If the request period is more than a day or there are too many events then several files will be generated and each file will contain no more than 100,000 events. File contains columns with the following information - 'event_time', 'job_id', 'from_email', 'email', 'status', 'delivery_status', 'metadata', 'destination_response', 'user_agent', 'url', 'ip', 'tags' and 'project_id' (for accounts with projects enabled). You can change the fields and include 'subject' field using 'dump_fileds' parameter.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "start_time"
                ],
                "properties": {
                  "start_time": {
                    "type": "string",
                    "format": "utc-date-time",
                    "example": "2022-07-20 00:00:00",
                    "description": "Date and time in YYYY-MM-DD hh:mm:ss format, specifying period start time. Data is stored for up to 32 days, depending on your tariff."
                  },
                  "end_time": {
                    "type": "string",
                    "format": "utc-date-time",
                    "example": "2022-07-21 00:00:00",
                    "description": "Date and time in YYYY-MM-DD hh:mm:ss format, specifying period end time (non-inclusive)."
                  },
                  "limit": {
                    "type": "integer",
                    "example": 50,
                    "description": "Maximum number of events returned (default is 50). If this value is over 100 000, several files will be created, each having 100 000 events maximum."
                  },
                  "all_projects": {
                    "type": "boolean",
                    "default": false,
                    "description": "For accounts with projects enabled, the value all_projects=true allows to fetch data for all existing projects."
                  },
                  "filter": {
                    "$ref": "#/components/schemas/FilterObject"
                  },
                  "dump_fields": {
                    "$ref": "#/components/schemas/DumpFieldsObject"
                  },
                  "aggregate": {
                    "type": "string",
                    "example": "day_status",
                    "description": "Allows you to obtain aggregated statistics for a given time period. The two allowed values are:<ul><li>__day_status__ - fetch aggregated statistics (the filter value must be missing or empty, as filters are not allowed with this option); <li>__an empty string__ - used by default, event_dump/create works as if the aggregate parameter is omitted."
                  },
                  "delimiter": {
                    "type": "string",
                    "example": ";",
                    "description": "Field delimiter, can be set to either  ',' or ';', defaults to  ','."
                  },
                  "format": {
                    "type": "string",
                    "default": "csv",
                    "example": "csv",
                    "description": "File format, either “csv” (default) or “csv_gzip”."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Method call has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "dump_id"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "dump_id": {
                      "type": "string",
                      "description": "Dump identifier, used to call the [event-dump/get](#event-dump-get) method."
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/event-dump/get.json": {
      "post": {
        "operationId": "event-dump-get",
        "tags": [
          "Event-dump"
        ],
        "summary": "Returns dump properties for a given identifier",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "dump_id"
                ],
                "properties": {
                  "dump_id": {
                    "type": "string",
                    "example": "Gqfasjh34tlasd",
                    "description": "Dump identifier received by the method [event-dump/create](#event-dump-create)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dump information returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "event_dump"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "event_dump": {
                      "$ref": "#/components/schemas/EventDumpObject"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/event-dump/list.json": {
      "post": {
        "operationId": "event-dump-list",
        "tags": [
          "Event-dump"
        ],
        "summary": "This method does not require any parameters; returns the full list of existing dumps.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "event_dumps"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "event_dumps": {
                      "type": "array",
                      "description": "An array of objects describing event dumps. Each object is similar to 'event_dump' object returned by the [event-dump/get](#event-dump-get) method.",
                      "items": {
                        "$ref": "#/components/schemas/EventDumpObject"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/event-dump/delete.json": {
      "post": {
        "operationId": "event-dump-delete",
        "tags": [
          "Event-dump"
        ],
        "summary": "Removes dump from queue or storage.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "dump_id"
                ],
                "properties": {
                  "dump_id": {
                    "type": "string",
                    "example": "Gqfasjh34tlasd",
                    "description": "Dump identifier, obtained via the [event-dump/create](#event-dump-create) method."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dump deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tag/list.json": {
      "post": {
        "operationId": "tag-list",
        "tags": [
          "Tag"
        ],
        "summary": "This method returns the full list of user-defined tags. Does not receive any parameters.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "tags"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "tags": {
                      "type": "array",
                      "description": "An array of objects containing data for user-defined tags.",
                      "items": {
                        "$ref": "#/components/schemas/TagsResponseObject"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tag/delete.json": {
      "post": {
        "operationId": "tag-delete",
        "tags": [
          "Tag"
        ],
        "summary": "Removes tag.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tag_id"
                ],
                "properties": {
                  "tag_id": {
                    "type": "integer",
                    "example": 54,
                    "description": "Unique tag id."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tag deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/project/create.json": {
      "post": {
        "operationId": "project-create",
        "tags": [
          "Project"
        ],
        "summary": "Creates a new project.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "project"
                ],
                "properties": {
                  "project": {
                    "$ref": "#/components/schemas/ProjectObject"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "project_id",
                    "project_api_key"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "project_id": {
                      "$ref": "#/components/schemas/ProjectIdString"
                    },
                    "project_api_key": {
                      "$ref": "#/components/schemas/ProjectApiKeyString"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/project/update.json": {
      "post": {
        "operationId": "project-update",
        "tags": [
          "Project"
        ],
        "summary": "Updates a project.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "project"
                ],
                "properties": {
                  "project_id": {
                    "type": "string",
                    "example": 1234567890,
                    "description": "Unique project identifier. You should identify project to update either with project_id or with project_api_key field. But we recommend usage of project_id as a more secure option."
                  },
                  "project_api_key": {
                    "type": "string",
                    "example": "your api_key",
                    "description": "Optional project API key. You should identify project to update either with project_id or with project_api_key field. But we recommend usage of project_id as a more secure option."
                  },
                  "project": {
                    "$ref": "#/components/schemas/ProjectUpdateObject"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "project_api_key": {
                      "type": "string",
                      "description": "API key of the project. Returned only if the project to update was identified by project_api_key. Not returned in case of updating by project_id."
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/project/list.json": {
      "post": {
        "operationId": "project-list",
        "tags": [
          "Project"
        ],
        "summary": "Lists projects.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "project_id": {
                    "type": "string",
                    "example": 1234567890,
                    "description": "Optional possibility to specify project_id to include only this project to list."
                  },
                  "project_api_key": {
                    "type": "string",
                    "example": "your api_key",
                    "description": "Optional possibility to specify project_api_key to include only this project to list."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Projects returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "projects": {
                      "type": "array",
                      "description": "Array of objects where each object represents one project.",
                      "items": {
                        "$ref": "#/components/schemas/ProjectListObject"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/project/delete.json": {
      "post": {
        "operationId": "project-delete",
        "tags": [
          "Project"
        ],
        "summary": "Deletes a project.",
        "description": "The project will be moved to the \"trash bin\" before being permanently deleted. You can restore the project by contacting support.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "project_id": {
                    "type": "string",
                    "example": 1234567890,
                    "description": "Unique project identifier. You should identify project to delete either with project_id or with project_api_key field. We recommend usage of project_id as a more secure option."
                  },
                  "project_api_key": {
                    "type": "string",
                    "example": "your api_key",
                    "description": "Optional project API key. You should identify project to delete either with project_id or with project_api_key field. We recommend usage of project_id as a more secure option."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/email-validation/single.json": {
      "post": {
        "operationId": "email-validation-single",
        "tags": [
          "Email-validation"
        ],
        "summary": "A maximum of two concurrent requests are allowed; if you send more requests, an error will be returned. Since the verification process should be completed promptly, we've set a time limit on email check. If we encounter a slow email server that does not respond in 5 seconds, you may get an “unknown” status.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "example": "email@example.com",
                    "description": "Email address to be checked."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Email check completed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "email",
                    "result",
                    "cause",
                    "validity",
                    "local_part",
                    "domain",
                    "mx_found",
                    "mx_record",
                    "did_you_mean",
                    "processed_at"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "email": {
                      "type": "string",
                      "format": "email",
                      "description": "Email address to be checked."
                    },
                    "result": {
                      "type": "string",
                      "example": "suspicious",
                      "description": "Possible statuses: <ul><li>\"valid\" - the address is valid, <li>\"invalid\" - the address is invalid, <li>\"suspicious\" - the address looks suspicious, <li>\"unknown\" - could not perform validation, the domain’s mail server has not responded within the time limit.</ul>\n"
                    },
                    "cause": {
                      "type": "string",
                      "example": "disposable",
                      "description": "Possible statuses: <ul><li>\"no_mx_record\" - no MX record found for the target domain, <li>\"syntax_error\" - the address syntax is invalid, <li>\"possible_typo\" - the address is likely to have a typo, <li>\"mailbox_not_found\" - the address does not exist, <li>\"global_suppression\" - the address has been marked as unreachable due to multiple previous delivery errors, <li>\"disposable\" - this is a disposable one-time email address which is usually valid for a few minutes only, <li>\"role\" - the address is not likely to belong to an actual person, but rather to a certain business staff role, <li>\"abuse\" - the address is known to be a source of a large number of complaints, sometimes issued automatically, <li>\"spamtrap\" - this email is a spam trap, it is published openly but never used for actual emails. Sending messages to such addresses has a huge negative impact on reputation score,  <li>\"smtp_connection_failed\" - the domain’s SMTP server does not respond; the address may contain a typo.</ul>\n"
                    },
                    "validity": {
                      "type": "integer",
                      "example": 10,
                      "description": "Validity score, from 0 to 100 (0 – invalid, 100 – valid)."
                    },
                    "local_part": {
                      "type": "string",
                      "example": "user",
                      "description": "Local part (everything preceding the @ sign)."
                    },
                    "domain": {
                      "type": "string",
                      "example": "example.com",
                      "description": "Domain name part."
                    },
                    "mx_found": {
                      "type": "boolean",
                      "example": true,
                      "description": "True if the address’ domain does have an MX record, false if does not."
                    },
                    "mx_record": {
                      "type": "string",
                      "example": 10,
                      "description": "Preferred MX record for the domain."
                    },
                    "did_you_mean": {
                      "type": "string",
                      "format": "email",
                      "example": "user@example.com",
                      "description": "For addresses which are likely to have typing errors (cause=possible_typo), a suggested variant with a fixed typo."
                    },
                    "processed_at": {
                      "type": "string",
                      "format": "utc-date-time",
                      "example": "2023-01-01 22:14:59",
                      "description": "Email check date and time, YYYY-MM-DD hh:mm:ss UTC."
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/system/ping.json": {
      "post": {
        "operationId": "system-ping",
        "tags": [
          "System"
        ],
        "summary": "Checks API key validity and returns user ID.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "API key is valid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "user_id"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "user_id": {
                      "$ref": "#/components/schemas/UserIdInteger"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/system/info.json": {
      "post": {
        "operationId": "system-info",
        "tags": [
          "System"
        ],
        "summary": "Gets user or project info by API key.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "User or project info successfully returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "user_id",
                    "email"
                  ],
                  "properties": {
                    "status": {
                      "$ref": "#/components/schemas/SuccessStatusString"
                    },
                    "user_id": {
                      "$ref": "#/components/schemas/UserIdInteger"
                    },
                    "email": {
                      "type": "string",
                      "format": "email",
                      "description": "Email of the user."
                    },
                    "project_id": {
                      "type": "string",
                      "description": "Unqiue project identifier, ASCII string up to 36 characters long. Present only if the API key used for request is the project API key.",
                      "example": "6123462132634"
                    },
                    "project_name": {
                      "type": "string",
                      "description": "Project name, unique for user account. Present only if the API key used for request is the project API key.",
                      "example": "Project 1A"
                    },
                    "project_accounting": {
                      "$ref": "#/components/schemas/ProjectAccountingObject"
                    },
                    "accounting": {
                      "type": "object",
                      "description": "Object with accounting period properties. Present only if the API key used for request is the user API key.",
                      "required": [
                        "period_start",
                        "period_end",
                        "emails_included",
                        "emails_sent"
                      ],
                      "properties": {
                        "period_start": {
                          "type": "string",
                          "format": "utc-date-time",
                          "example": "2016-08-29 09:12:33",
                          "description": "Date and time of accounting period start in UTC in \"YYYY-MM-DD hh:mm:ss\" format."
                        },
                        "period_end": {
                          "type": "string",
                          "format": "utc-date-time",
                          "example": "2016-09-29 09:12:33",
                          "description": "Date and time of accounting period end in UTC in \"YYYY-MM-DD hh:mm:ss\" format."
                        },
                        "emails_included": {
                          "type": "integer",
                          "format": "int64",
                          "description": "Number of emails included into accounting period."
                        },
                        "emails_sent": {
                          "type": "integer",
                          "format": "int64",
                          "description": "Number of emails sent during accounting period. Can be bigger than emails_included in case of overage."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error occured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SuccessStatusString": {
        "type": "string",
        "enum": [
          "success"
        ],
        "description": "\"success\" string"
      },
      "SuccessResponse": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "$ref": "#/components/schemas/SuccessStatusString"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "status",
          "message",
          "code"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "error"
            ],
            "description": "\"error\" string"
          },
          "message": {
            "type": "string",
            "description": "Human-readable error message in English."
          },
          "code": {
            "type": "integer",
            "description": "[API Error code](#api-errors)."
          }
        }
      },
      "MessageObject": {
        "type": "object",
        "description": "Object containing all message properties.",
        "x-display-in-readme": true,
        "required": [
          "recipients",
          "body",
          "subject"
        ],
        "properties": {
          "recipients": {
            "type": "array",
            "example": [
              {
                "email": "email@example.com",
                "substitutions": {
                  "tag": "value"
                },
                "metadata": {
                  "key": "value"
                }
              }
            ],
            "description": "Contains recipient emails, substitutions(merge tags) and metadata.",
            "items": {
              "type": "object",
              "required": [
                "email"
              ],
              "properties": {
                "email": {
                  "type": "string",
                  "format": "email",
                  "description": "Recipient email"
                },
                "substitutions": {
                  "type": "object",
                  "description": "Object to pass the substitutions(merge tags) for the recipient (e.g. recipient name, discount code, password change link, etc. See [Template engines](https://docs.unione.io/en/template-engines)). The substitutions can be used in the following parameters:<ul><li>body.html <li>body.plaintext <li>body.amp <li>subject <li>from_name <li>headers[\"List-Unsubscribe\"] <li>options.unsubscribe_url </ul>  A substitution name can consist from latin characters, numbers and \"_\" symbol, and should start with the letter. There's a special substitution \"to_name\" which is used to put recipent's name like \"Name Surname\" to include it to SMTP header \"To\" in the form \"Name Surname &lt;email@example.com&gt;\". The \"to_name\" length is limited to 78 symbols.\n",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "example": {
                    "CustomerId": "12452",
                    "to_name": "John Smith"
                  }
                },
                "metadata": {
                  "type": "object",
                  "description": "Object for passing the metadata, such as \"key\": \"value\". Max key quantity: 10. Max key length: 64 symbols. Max value length: 1024 symbols. The metadata is returned by [webhook](#webhook) and [event-dump](#event-dump) methods. If you pass strign up to 128 bit with \"campaign_id\" field name (name is configurable thru support), it will be considered as campaign identifier in statistics.\n",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "example": {
                    "campaign_id": "c77f4f4e-3561-49f7-9f07-c35be01b4f43",
                    "customer_hash": "b253ac7"
                  }
                }
              }
            }
          },
          "template_id": {
            "type": "string",
            "format": "uuid",
            "description": "Optional identifier of the template that had been created by [template/set](#template-set) method. If template_id is passed then fields from the template are used instead of missed email/send parameters. E.g. if \"body\" parameter in email/send is omitted, \"body\" from template will be used. If \"subject\" in email/send is omitted, \"subject\" from template will be used.",
            "example": "00000000-0000-0000-0000-000000000000"
          },
          "tags": {
            "$ref": "#/components/schemas/TagObject"
          },
          "skip_unsubscribe": {
            "type": "integer",
            "enum": [
              0,
              1
            ],
            "example": 0,
            "description": "Whether to skip or not appending default unsubscribe footer. 1=skip, 0=append, default is 0. You should [ask support](https://cp.unione.io/en/support) to approve\nusage of skip_unsubscribe=1. [Read more](https://docs.unione.io/en/unsubscribe-link).\n"
          },
          "global_language": {
            "type": "string",
            "example": "en",
            "description": "The language of the unsubscribe footer and unsubscribe page. Languages supported are: \"be\", \"de\", \"en\", \"es\", \"fr\", \"it\", \"pl\", \"pt\", \"ru\", \"ua\", \"kz\".\n"
          },
          "template_engine": {
            "$ref": "#/components/schemas/TemplateEngineString"
          },
          "global_substitutions": {
            "$ref": "#/components/schemas/GlobalSubstitutionsObject"
          },
          "global_metadata": {
            "$ref": "#/components/schemas/GlobalMetadataObject"
          },
          "body": {
            "$ref": "#/components/schemas/BodyObject"
          },
          "subject": {
            "$ref": "#/components/schemas/SubjectString"
          },
          "from_email": {
            "type": "string",
            "format": "email",
            "example": "email@example.com",
            "description": "Sender's email. Required only if template_id parameter is empty."
          },
          "from_name": {
            "$ref": "#/components/schemas/FromNameString"
          },
          "reply_to": {
            "$ref": "#/components/schemas/ReplyToString"
          },
          "reply_to_name": {
            "$ref": "#/components/schemas/ReplyToNameString"
          },
          "track_links": {
            "$ref": "#/components/schemas/TrackLinksInteger"
          },
          "track_read": {
            "$ref": "#/components/schemas/TrackReadInteger"
          },
          "bypass_global": {
            "$ref": "#/components/schemas/BypassGlobalInteger"
          },
          "bypass_unavailable": {
            "$ref": "#/components/schemas/BypassUnavailableInteger"
          },
          "bypass_unsubscribed": {
            "$ref": "#/components/schemas/BypassUnsubscribedInteger"
          },
          "bypass_complained": {
            "$ref": "#/components/schemas/BypassComplainedInteger"
          },
          "idempotence_key": {
            "$ref": "#/components/schemas/IdempotenceKeyString"
          },
          "headers": {
            "$ref": "#/components/schemas/HeadersObject"
          },
          "attachments": {
            "$ref": "#/components/schemas/AttachmentsArray"
          },
          "inline_attachments": {
            "$ref": "#/components/schemas/InlineAttachmentsArray"
          },
          "options": {
            "type": "object",
            "description": "Additional message options.",
            "example": {},
            "properties": {
              "send_at": {
                "type": "string",
                "description": "Date and time in \"YYYY-MM-DD hh:mm:ss\" format in the UTC timezone. Allows schedule sending up to 24 hours in advance.\n",
                "example": "2021-11-19 10:00:00"
              },
              "unsubscribe_url": {
                "type": "string",
                "description": "Custom unsubscribe link. Read more [here](https://docs.unione.io/en/unsubscribe-link).\n",
                "example": "https://example.org/unsubscribe/&#7b;&#7b;CustomerId&#7c;&#7c;"
              },
              "custom_backend_id": {
                "type": "integer",
                "description": "Backend-domain identifier to send message with. If custom_backend_id is not set, default one for your account/project will be used. You can pay for one or more dedicated IPs and use this option."
              },
              "smtp_pool_id": {
                "type": "string",
                "format": "uuid",
                "description": "SMTP pool identifier to send message with. Usually you don't need to pass this parameter because correct smtp_pool_id is selected automatically based on the default one for your account/project or according to custom_backend_id parameter."
              }
            }
          }
        }
      },
      "BodyObject": {
        "type": "object",
        "description": "Contains HTML/plaintext/AMP parts of the email. Either html or plaintext part is required.",
        "properties": {
          "html": {
            "type": "string",
            "description": "HTML part of the email body",
            "example": "<b>Hello, &#7b;&#7b;to_name&#7c;&#7c;</b>"
          },
          "plaintext": {
            "type": "string",
            "description": "Plaintext part of the email body.",
            "example": "Hello, &#7b;&#7b;to_name&#7c;&#7c;"
          },
          "amp": {
            "type": "string",
            "description": "Optional [AMP](http://amp.dev/documentation/guides-and-tutorials/learn/email_fundamentals/) part of the email body.",
            "example": "<!doctype html><html amp4email><head> <meta charset=\"utf-8\"><script async src=\"https://cdn.ampproject.org/v0.js\"></script> <style amp4email-boilerplate>body{visibility:hidden}</style></head><body> Hello, AMP4EMAIL world.</body></html>"
          }
        }
      },
      "SubjectString": {
        "type": "string",
        "example": "UniOne test email ",
        "description": "Email subject."
      },
      "FromEmailString": {
        "type": "string",
        "format": "email",
        "description": "Sender's email."
      },
      "FromNameString": {
        "type": "string",
        "example": "John Smith",
        "description": "Sender's name."
      },
      "ReplyToString": {
        "type": "string",
        "format": "email",
        "example": "email@example.com",
        "description": "Optional Reply-To email (in case it's different to sender's email)"
      },
      "ReplyToNameString": {
        "type": "string",
        "example": "John Smith",
        "description": "Optional Reply-To name (if reply_to email is specified and you want to display not only this email but also the name)"
      },
      "IdempotenceKeyString": {
        "type": "string",
        "example": "SG1VsbG68sIH2dvc5mx890kIQ",
        "description": "A string of up to 64 characters containing a unique message key. This can be used to prevent occasional message duplicates. If you send another API request with the same message key within the next minute, it will be declined. We can generate a message key for each letter automatically; to enable this option, please contact our [tech support](https://cp.unione.io/en/support)."
      },
      "TemplateEngineString": {
        "type": "string",
        "enum": [
          "simple",
          "velocity",
          "liquid",
          "none"
        ],
        "example": "velocity",
        "description": "The [template engine](https://docs.unione.io/en/template-engines) for handling the substitutions(merge tags), \"simple\", \"velocity\", \"liquid\" or \"none\". Default value is \"simple\"."
      },
      "GlobalSubstitutionsObject": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        },
        "description": "Object for passing the substitutions(merge tags) common for all recipients - e.g., company name. If the substitution names are duplicated in object \"substitutions\", the values of the variables will be taken from the object \"substitutions\". The substitutions can be used in the following parameters: <ul><li>body.html <li>body.plaintext <li>body.amp <li>subject <li>from_name <li>options.unsubscribe_url</ul>A substitution name can consist from latin characeters, numbers and \"_\" symbol, and should start with the letter.\n"
      },
      "GlobalMetadataObject": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        },
        "description": "Object for passing the metadata common for all the recipients, such as \"key\": \"value\". Max key quantity: 10. Max key length: 64 symbols. Max value length: 1024 symbols. The metadata is returned by [webhook](#webhook). To group single emails into a campaign, you can use the system key 'campaign_id' with a value in the form of a non-negative decimal integer up to 128 bits or a UUID in the format 'c7703772-453e-4c77-a9ae-9a1b94051b5a'. Incorrect values will be treated as '0'.\n"
      },
      "TrackLinksInteger": {
        "type": "integer",
        "enum": [
          0,
          1
        ],
        "example": 0,
        "description": "1 = click tracking is on (default), 0 = click tracking is off. To use track_links = 0, you need to ask support to enable this feature."
      },
      "TrackReadInteger": {
        "type": "integer",
        "enum": [
          0,
          1
        ],
        "example": 0,
        "description": "1 = read tracking is on (default), 0=read tracking is off. To use track_read = 0, you need to ask support to enable this feature."
      },
      "BypassGlobalInteger": {
        "type": "integer",
        "enum": [
          0,
          1
        ],
        "example": 0,
        "description": "(allowed values 0 or 1, default 0) If set to 1, the global unavailability list will be ignored. Even if the address was found to be unreachable while sending other UniOne users' emails, or its owner has issued complaints, the message will still be sent. The setting may be ignored for certain addresses."
      },
      "BypassUnavailableInteger": {
        "type": "integer",
        "enum": [
          0,
          1
        ],
        "example": 0,
        "description": "(allowed values 0 or 1, default 0) If set to 1, the current user's or project's unavailability list will be ignored. Works only if bypass_global is set to 1."
      },
      "BypassUnsubscribedInteger": {
        "type": "integer",
        "enum": [
          0,
          1
        ],
        "example": 0,
        "description": "(allowed values 0 or 1, default 0) If set to 1, the current list of unsubscribed addresses for this account or project will be ignored. Works only if bypass_global is set to 1. The setting is available only for users that have been granted the right to omit the unsubscribe link (to request, please contact [support](https://cp.unione.io/en/support))."
      },
      "BypassComplainedInteger": {
        "type": "integer",
        "enum": [
          0,
          1
        ],
        "example": 0,
        "description": "(allowed values 0 or 1, default 0) If set to 1, the user's or project's complaint list will be ignored. Works only if bypass_global is set to 1. The setting is available only for users that have been granted the right to omit the unsubscribe link (to request, please contact [support](https://cp.unione.io/en/support))."
      },
      "BackendIdInteger": {
        "type": "integer",
        "description": "A unique domain identifier which will determine the [tracking domain](https://docs.unione.io/en/tracking-domains) or [dedicated IP](/dedicated-ip) pool to be used by default. If the value is not specified, a default backend domain will be assigned for your account or project instead.",
        "example": 1234
      },
      "UnsubscribePageIdInteger": {
        "type": "integer",
        "description": "A unique identifier that defines the default unsubscribe page. If absent, the account/project will be assigned the system default unsubscribe page.",
        "example": 1
      },
      "HeadersObject": {
        "type": "object",
        "description": "Contains email headers, maximum 50. Only headers with “X-” name prefix are accepted, all other are ignored, for example X-UNIONE-Global-Language, X-UNIONE-Template-Engine. Standard headers \"To,\" \"CC,\" and \"BCC\" are passed without the \"X-.\" Yet, they are processed in a particular way and, as a result, have a number of restrictions. You can find more details about it [here](/cc-and-bcc). If our support have approved omitting standard unsubscription block for you, you can also pass List-Unsubscribe, List-Subscribe, List-Help, List-Owner, List-Archive, In-Reply-To and References headers.\n",
        "properties": {
          "X-UNIONE-Global-Language": {
            "type": "string",
            "description": "The language of the unsubscribe footer and unsubscribe page. Languages supported are: \"be\", \"de\", \"en\", \"es\", \"fr\", \"it\", \"pl\", \"pt\", \"ru\", \"ua\", \"kz\".\n"
          },
          "X-UNIONE-Template-Engine": {
            "type": "string",
            "description": "The template engine for handling the substitutions(merge tags), “simple”, “velocity”, “liquid” or “none”. Default value is “simple”. Has a priority over the value allowed in the “template_engine” parameter."
          }
        },
        "additionalProperties": {
          "type": "string"
        },
        "example": {
          "X-MyHeader": "some data",
          "Test-List-Unsubscribe": "<mailto: unsubscribe@example.com?subject=unsubscribe>, <http://www.example.com/unsubscribe/&#7b;&#7b;CustomerId&#7c;&#7c;>"
        }
      },
      "AttachmentsArray": {
        "type": "array",
        "description": "Optional array of attachments",
        "items": {
          "type": "object",
          "required": [
            "type",
            "name",
            "content"
          ],
          "properties": {
            "type": {
              "type": "string",
              "description": "Attachment type, see [MIME](https://en.wikipedia.org/wiki/MIME). If unsure, use \"application/octet-stream\".",
              "example": "text/plain"
            },
            "name": {
              "type": "string",
              "description": "Attachment name in the format: \"name.extension\". When multiple attachments are passed, their names must be unique. The symbol ‘/’ is not allowed in attachment names.\n",
              "example": "readme.txt"
            },
            "content": {
              "type": "string",
              "format": "byte",
              "description": "File contents in [base64](https://en.wikipedia.org/wiki/Base64). Maximum file size 7MB (9786710 bytes in base64).",
              "example": "SGVsbG8sIHdvcmxkIQ=="
            }
          }
        }
      },
      "InlineAttachmentsArray": {
        "type": "array",
        "description": "Optional array of inline attachments, e.g. for including images in email instead of loading them from external URL.",
        "items": {
          "type": "object",
          "required": [
            "type",
            "name",
            "content"
          ],
          "properties": {
            "type": {
              "type": "string",
              "description": "Attachment type, see [MIME](https://en.wikipedia.org/wiki/MIME). If unsure, use \"application/octet-stream\".",
              "example": "image/gif"
            },
            "name": {
              "type": "string",
              "description": "Attachment content id. For example, \"name\"=\"IMAGECID1\" should be referenced in HTML like &lt;img src=\"cid:IMAGECID1\"&gt;.\n",
              "example": "IMAGECID1"
            },
            "content": {
              "type": "string",
              "format": "byte",
              "description": "File contents in [base64](https://en.wikipedia.org/wiki/Base64). Maximum file size 7MB (9786710 bytes in base64).",
              "example": "R0lGODdhAwADAIABAP+rAP///ywAAAAAAwADAAACBIQRBwUAOw=="
            }
          }
        }
      },
      "SuppressionListObject": {
        "type": "object",
        "description": "Object with suppression details.",
        "required": [
          "cause",
          "source",
          "is_deletable",
          "created"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "description": "Email to get suppression details for."
          },
          "cause": {
            "type": "string",
            "example": "unsubscribed",
            "description": "Cause of email being suppressed. One of:<ul><li>__unsubscribed__ - email is unsubscribed;<li>__temporary_unavailable__ - the email address is unavailable. This means that over the next three days sending to this address will return an error. Email may be temporarily unavailable due to several reasons, e.g.:<ol><li>a previous email has been rejected by the recipient's server for spam;<li>the recipient's mailbox is full or is not used;<li>recipient's domain does not accept mail;<li>sending server was rejected due to blacklisting;</ol><li>__permanent_unavailable__ - the email address is permanently unavailable due to multiple hard bounces; <li>__complained__ -  the recipient reported spam in the previous emails;<li>__blocked__ -  sending to the email is prohibited by administration of UniOne.</ul>We may add some new causes in the future."
          },
          "source": {
            "type": "string",
            "example": "user",
            "description": "Source of email being suppressed. One of:<ul><li>__user__ - suppressed by user with    [suppression/set](#suppression-set);<li>__system__ - sending to the email is prohibited by system, for example due to multiple hard bounces;<li>__subscriber__ - the recipient reported spam or unsubscribed in the previous emails.</ul>"
          },
          "is_deletable": {
            "type": "boolean",
            "description": "Is it possible to delete this suppression by calling suppression/delete method."
          },
          "created": {
            "type": "string",
            "format": "utc-date-time",
            "example": "2021-12-19 10:15:49",
            "description": "When suppression was created, in UTC timezone in \"YYYY-MM-DD hh:mm:ss\" format."
          }
        }
      },
      "SuppressionGetObject": {
        "type": "object",
        "description": "Object with suppression details.",
        "required": [
          "cause",
          "source",
          "is_deletable",
          "created"
        ],
        "properties": {
          "project_id": {
            "$ref": "#/components/schemas/ProjectIdString"
          },
          "cause": {
            "type": "string",
            "example": "unsubscribed",
            "description": "Cause of email being suppressed. One of:<ul><li>__unsubscribed__ - email is unsubscribed;<li>__temporary_unavailable__ - the email address is unavailable. This means that over the next three days sending to this address will return an error. Email may be temporarily unavailable due to several reasons, e.g.:<ol><li>a previous email has been rejected by the recipient's server for spam;<li>the recipient's mailbox is full or is not used;<li>recipient's domain does not accept mail;<li>sending server was rejected due to blacklisting;</ol><li>__permanent_unavailable__ - the email address is permanently unavailable due to multiple hard bounces; <li>__complained__ -  the recipient reported spam in the previous emails;<li>__blocked__ -  sending to the email is prohibited by administration of UniOne.</ul>We may add some new causes in the future."
          },
          "source": {
            "type": "string",
            "example": "user",
            "description": "Source of email being suppressed. One of:<ul><li>__user__ - suppressed by user with    [suppression/set](#suppression-set);<li>__system__ - sending to the email is prohibited by system, for example due to multiple hard bounces;<li>__subscriber__ - the recipient reported spam or unsubscribed in the previous emails.</ul>"
          },
          "is_deletable": {
            "type": "boolean",
            "description": "Is it possible to delete this suppression by calling suppression/delete method."
          },
          "created": {
            "type": "string",
            "format": "utc-date-time",
            "example": "2021-12-19 10:15:49",
            "description": "When suppression was created, in UTC timezone in \"YYYY-MM-DD hh:mm:ss\" format."
          }
        }
      },
      "TemplateObject": {
        "type": "object",
        "description": "Object with all the template properties.",
        "required": [
          "name",
          "from_email"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Template unique identifier. If you omit the \"id\" field then new template will be created. If you specify the \"id\" field, the system will try to find a template with the specified id and edit it."
          },
          "name": {
            "type": "string",
            "description": "Template name."
          },
          "editor_type": {
            "$ref": "#/components/schemas/EditorTypeString"
          },
          "template_engine": {
            "$ref": "#/components/schemas/TemplateEngineString"
          },
          "global_substitutions": {
            "$ref": "#/components/schemas/GlobalSubstitutionsObject"
          },
          "global_metadata": {
            "$ref": "#/components/schemas/GlobalMetadataObject"
          },
          "body": {
            "$ref": "#/components/schemas/BodyObject"
          },
          "subject": {
            "$ref": "#/components/schemas/SubjectString"
          },
          "from_email": {
            "$ref": "#/components/schemas/FromEmailString"
          },
          "from_name": {
            "$ref": "#/components/schemas/FromNameString"
          },
          "reply_to": {
            "$ref": "#/components/schemas/ReplyToString"
          },
          "reply_to_name": {
            "$ref": "#/components/schemas/ReplyToNameString"
          },
          "track_links": {
            "$ref": "#/components/schemas/TrackLinksInteger"
          },
          "track_read": {
            "$ref": "#/components/schemas/TrackReadInteger"
          },
          "headers": {
            "$ref": "#/components/schemas/HeadersObject"
          },
          "attachments": {
            "$ref": "#/components/schemas/AttachmentsArray"
          },
          "inline_attachments": {
            "$ref": "#/components/schemas/InlineAttachmentsArray"
          }
        }
      },
      "EditorTypeString": {
        "type": "string",
        "enum": [
          "html",
          "visual"
        ],
        "description": "Editor type, \"html\" or \"visual\". Default is \"html\". You can create a template with \"visual\" editor type only in web interface.",
        "example": "html"
      },
      "TemplateListObject": {
        "type": "object",
        "required": [
          "created",
          "user_id",
          "id",
          "body",
          "name",
          "from_email"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Template unique identifier."
          },
          "name": {
            "type": "string",
            "description": "Template name."
          },
          "editor_type": {
            "$ref": "#/components/schemas/EditorTypeString"
          },
          "template_engine": {
            "$ref": "#/components/schemas/TemplateEngineString"
          },
          "global_substitutions": {
            "$ref": "#/components/schemas/GlobalSubstitutionsObject"
          },
          "global_metadata": {
            "$ref": "#/components/schemas/GlobalMetadataObject"
          },
          "body": {
            "$ref": "#/components/schemas/BodyObject"
          },
          "subject": {
            "$ref": "#/components/schemas/SubjectString"
          },
          "from_email": {
            "$ref": "#/components/schemas/FromEmailString"
          },
          "from_name": {
            "$ref": "#/components/schemas/FromNameString"
          },
          "reply_to": {
            "$ref": "#/components/schemas/ReplyToString"
          },
          "reply_to_name": {
            "$ref": "#/components/schemas/ReplyToNameString"
          },
          "track_links": {
            "$ref": "#/components/schemas/TrackLinksInteger"
          },
          "track_read": {
            "$ref": "#/components/schemas/TrackReadInteger"
          },
          "headers": {
            "$ref": "#/components/schemas/HeadersObject"
          },
          "attachments": {
            "$ref": "#/components/schemas/AttachmentsArray"
          },
          "inline_attachments": {
            "$ref": "#/components/schemas/InlineAttachmentsArray"
          },
          "created": {
            "type": "string",
            "format": "utc-date-time",
            "description": "Template creation date and time in UTC timezone in format \"YYYY-MM-DD hh:mm:ss\""
          },
          "user_id": {
            "$ref": "#/components/schemas/UserIdInteger"
          },
          "project_id": {
            "$ref": "#/components/schemas/ProjectIdString"
          },
          "project_name": {
            "$ref": "#/components/schemas/ProjectNameString"
          }
        }
      },
      "UserIdInteger": {
        "type": "integer",
        "description": "Unique user identifier.",
        "example": 11344
      },
      "WebhookObject": {
        "type": "object",
        "description": "Object with all the webhook properties.",
        "required": [
          "id",
          "url",
          "status",
          "event_format",
          "delivery_info",
          "single_event",
          "max_parallel"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "description": "Webhook unique identifier."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Webhook URL."
          },
          "status": {
            "$ref": "#/components/schemas/WebhookStatusString"
          },
          "event_format": {
            "$ref": "#/components/schemas/WebhookEventFormatString"
          },
          "delivery_info": {
            "$ref": "#/components/schemas/WebhookDeliveryInfoInteger"
          },
          "single_event": {
            "$ref": "#/components/schemas/WebhookSingleEventInteger"
          },
          "max_parallel": {
            "$ref": "#/components/schemas/WebhookMaxParallelInteger"
          },
          "updated_at": {
            "type": "string",
            "format": "utc-date-time",
            "description": "Webhook properties last update date and time in UTC timezone in \"YYYY-MM-DD hh:mm:ss\" format."
          },
          "events": {
            "$ref": "#/components/schemas/WebhookEventsObject"
          }
        }
      },
      "WebhookStatusString": {
        "type": "string",
        "enum": [
          "active",
          "disabled",
          "stopped"
        ],
        "default": "active",
        "description": "Webhook status, \"active\" by default. \"disabled\" means that webhook has been disabled by the user, \"stopped\" means that webhook has been stopped by the system after 24h of failed calls (with minimum of 10 distinct events)."
      },
      "WebhookEventFormatString": {
        "type": "string",
        "enum": [
          "json_post",
          "json_post_gzip"
        ],
        "default": "json_post",
        "description": "Notification format. \"json_post\"(default) or \"json_post_gzip\"."
      },
      "WebhookDeliveryInfoInteger": {
        "type": "integer",
        "enum": [
          0,
          1
        ],
        "default": 0,
        "description": "Shall detailed delivery info be returned(1) or not(0). When it's 1, the information about SMTP response and internal delivery status is returned for \"hard_bounced\" and \"soft_bounced\" email statuses; the user agent, recipient IP address, and detected geo fields are returned for \"opened\" and \"clicked\" statuses; URL is returned for \"clicked\" status. For \"delivered\", \"soft_bounced\" and \"hard_bounced\" statuses UniOne may also return sender_ip, the IP address of the SMTP server that sent the message, if available."
      },
      "WebhookSingleEventInteger": {
        "type": "integer",
        "enum": [
          0,
          1
        ],
        "default": 0,
        "description": "0=several event notifications can be reported in single webhook call, 1=only single event can be reported in one call (not recommended)."
      },
      "WebhookMaxParallelInteger": {
        "type": "integer",
        "minimum": 5,
        "maximum": 100,
        "default": 10,
        "description": "Maximum quantity of permitted parallel queries to your server. The more your server can handle - the better."
      },
      "WebhookEventsObject": {
        "type": "object",
        "description": "Object containing events to notify of.",
        "properties": {
          "spam_block": {
            "type": "array",
            "description": "If present then spam block events will be reported. Should contain single array element with \"*\" string.",
            "items": {
              "type": "string"
            },
            "example": [
              "*"
            ]
          },
          "email_status": {
            "type": "array",
            "description": "If present then email status change events will be reported. Contains names of statuses to notify of.",
            "items": {
              "type": "string",
              "enum": [
                "sent",
                "delivered",
                "opened",
                "clicked",
                "unsubscribed",
                "subscribed",
                "soft_bounced",
                "hard_bounced",
                "spam"
              ]
            },
            "example": [
              "delivered",
              "opened",
              "clicked",
              "unsubscribed",
              "subscribed",
              "soft_bounced",
              "hard_bounced",
              "spam"
            ]
          }
        }
      },
      "TagsResponseObject": {
        "type": "object",
        "description": "An object with the properties of the user tags.",
        "required": [
          "tag_id",
          "tag"
        ],
        "properties": {
          "tag_id": {
            "type": "integer",
            "example": 54,
            "description": "Unique tag id."
          },
          "tag": {
            "type": "string",
            "example": "example-tag1",
            "description": "Tag name."
          }
        }
      },
      "TagObject": {
        "type": "array",
        "description": "An array of strings. The maximum string length is 50 characters. You can include up to 4 strings which must be unique. No more than 10 000 tags are allowed per project; if you try to add more, email/send will return an error. You may use tags to categorize emails by your own criteria, and they will be passed along by event-dump methods.",
        "items": {
          "type": "string"
        },
        "example": []
      },
      "DumpFieldsObject": {
        "type": "array",
        "description": "An array of strings containing the names of columns you need in your report, in your preferred order. If the 'dump_fields' array is missing or empty, a default field list and order will be applied. Allowed values, in their default order, are - 'project_id', 'event_time', 'job_id', 'from_email', 'email', 'status', 'delivery_status', 'metadata', 'destination_response', 'user_agent', 'url', 'ip', 'tags'. For maximum security, the 'subject' field is not included by default, but you can add it by explicitly including in the 'dump_fields' array.",
        "items": {
          "type": "string"
        },
        "example": [
          "string1"
        ]
      },
      "ProjectIdString": {
        "type": "string",
        "description": "Unqiue project identifier, ASCII string up to 36 characters long.",
        "example": "6123462132634"
      },
      "ProjectApiKeyString": {
        "type": "string",
        "description": "API key of the project. You can use it instead of the user API key parameter in all methods except project/* methods."
      },
      "ProjectNameString": {
        "type": "string",
        "description": "Project name, unique for user account.",
        "example": "Project 1A"
      },
      "ProjectCountryString": {
        "type": "string",
        "description": "ISO-3166 alpha-2 country code. If set, UniOne treats project personal data according to country laws, e.g. GDPR for european countries.",
        "example": "ES"
      },
      "ProjectObject": {
        "type": "object",
        "description": "Object with project properties.",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "$ref": "#/components/schemas/ProjectNameString"
          },
          "country": {
            "$ref": "#/components/schemas/ProjectCountryString"
          },
          "send_enabled": {
            "type": "boolean",
            "description": "Whether email sending is enabled for this project or not.",
            "default": true
          },
          "custom_unsubscribe_url_enabled": {
            "type": "boolean",
            "description": "If it's false then UniOne adds default unsubscribe footer to each email sent with API key of the project. If it's true then appending default unsubscribe footer for this project is avoided and sending with custom unsubscribe url or even without unsubscribe url is permitted for the project. Please note that custom_unsubscribe_url_enabled=true is available only if removing unsubscribe link is approved for the user account by support. More on this [here](https://docs.unione.io/en/unsubscribe-link). When custom_unsubscribe_url_enabled is skipped on creating a project, it's value is taken from user\n"
          },
          "backend_domain_id": {
            "$ref": "#/components/schemas/BackendIdInteger"
          },
          "unsubscribe_page_id": {
            "$ref": "#/components/schemas/UnsubscribePageIdInteger"
          }
        }
      },
      "ProjectUpdateObject": {
        "type": "object",
        "description": "Object with project properties.",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "$ref": "#/components/schemas/ProjectNameString"
          },
          "country": {
            "$ref": "#/components/schemas/ProjectCountryString"
          },
          "send_enabled": {
            "type": "boolean",
            "description": "Whether email sending is enabled for this project or not.",
            "default": true
          },
          "custom_unsubscribe_url_enabled": {
            "type": "boolean",
            "description": "If it's false then UniOne adds default unsubscribe footer to each email sent with API key of the project. If it's true then appending default unsubscribe footer for this project is avoided and sending with custom unsubscribe url or even without unsubscribe url is permitted for the project. Please note that custom_unsubscribe_url_enabled=true is available only if removing unsubscribe link is approved for the user account by support. More on this [here](https://docs.unione.io/en/unsubscribe-link). When custom_unsubscribe_url_enabled is skipped on creating a project, it's value is taken from user\n"
          },
          "backend_domain_id": {
            "$ref": "#/components/schemas/BackendIdInteger"
          },
          "unsubscribe_page_id": {
            "$ref": "#/components/schemas/UnsubscribePageIdInteger"
          },
          "email_counter": {
            "type": "integer",
            "description": "Project's email counter value. 0 value only is accepted (which means resetting the counter to zero), or refreshes automatically depending on the counter mode set with the 'email_counter_mode' parameter. If the request doesn't contain the field or contains null, the limit value doesn't change."
          },
          "email_counter_limit": {
            "type": "integer",
            "description": "Allows you to limit the number of emails sent by the project. The sending stops when the limit is reached. Any non-negative 64-bit integer is acceptable. Setting to 0 means no limit. If the request doesn't contain the field or contains null, the limit value doesn't change.",
            "default": 0
          },
          "email_counter_mode": {
            "enum": [
              "default",
              "permanent"
            ],
            "description": "Sets the email counter mode. It allows you to choose whether the counter should reset automatically, or remain permanent. The following values are acceptable: 'default' - the counter resets to zero automatically at the beginning of each accounting period, 'permanent' - the counter never resets automatically. The reset can be done only manually by the user in the request with the passes 0 value in the email_counter field. If the request doesn't contain the field or contains a null value, the limit value doesn't change.\n",
            "default": "default"
          }
        }
      },
      "ProjectListObject": {
        "type": "object",
        "required": [
          "id",
          "api_key",
          "name",
          "country",
          "reg_time",
          "send_enabled",
          "custom_unsubscribe_url_enabled",
          "backend_domain_id",
          "email_counter",
          "email_counter_limit",
          "email_counter_mode",
          "unsubscribe_page_id"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ProjectIdString"
          },
          "api_key": {
            "$ref": "#/components/schemas/ProjectApiKeyString"
          },
          "name": {
            "$ref": "#/components/schemas/ProjectNameString"
          },
          "country": {
            "$ref": "#/components/schemas/ProjectCountryString"
          },
          "reg_time": {
            "type": "string",
            "format": "utc-date-time",
            "example": "2020-12-28 17:15:45",
            "description": "Date and time of project creation in UTC timezone in \"YYYY-MM-DD hh:mm:ss\" format."
          },
          "send_enabled": {
            "type": "boolean",
            "description": "Whether email sending is enabled for this project or not.",
            "default": true
          },
          "custom_unsubscribe_url_enabled": {
            "type": "boolean",
            "description": "If it's false then UniOne adds default unsubscribe footer to each email sent with API key of the project. If it's true then appending default unsubscribe footer for this project is avoided and sending with custom unsubscribe url or even without unsubscribe url is permitted for the project. Please note that custom_unsubscribe_url_enabled=true is available only if removing unsubscribe link is approved for the user account by support. More on this [here](https://docs.unione.io/en/unsubscribe-link). When custom_unsubscribe_url_enabled is skipped on creating a project, it's value is taken from user\n"
          },
          "backend_domain_id": {
            "$ref": "#/components/schemas/BackendIdInteger"
          },
          "email_counter": {
            "type": "integer",
            "description": "Project's email counter value. It increases on every email sent."
          },
          "email_counter_limit": {
            "type": "integer",
            "description": "Allows you to limit the number of emails sent by the project. The sending stops when the limit is reached. Any non-negative 64-bit integer is acceptable. 0 means no limit."
          },
          "email_counter_mode": {
            "enum": [
              "default",
              "permanent"
            ],
            "description": "'default' - the counter resets to zero automatically at the beginning of each accounting period. 'permanent' - the counter never resets automatically.\n",
            "default": "default"
          },
          "unsubscribe_page_id": {
            "$ref": "#/components/schemas/UnsubscribePageIdInteger"
          }
        }
      },
      "ProjectAccountingObject": {
        "type": "object",
        "description": "Object with email counter properties. Present only if the API key used for request is the user API key.",
        "required": [
          "email_counter",
          "email_counter_limit",
          "email_counter_mode"
        ],
        "properties": {
          "email_counter": {
            "type": "integer",
            "description": "Project's email counter value. It increases on every email sent."
          },
          "email_counter_limit": {
            "type": "integer",
            "description": "Allows you to limit the number of emails sent by the project. The sending stops when the limit is reached. Any non-negative 64-bit integer is acceptable. 0 means no limit."
          },
          "email_counter_mode": {
            "enum": [
              "default",
              "permanent"
            ],
            "description": "'default' - the counter resets to zero automatically at the beginning of each accounting period. 'permanent' - the counter never resets automatically.\n",
            "default": "default"
          }
        }
      },
      "FilterObject": {
        "type": "object",
        "description": "An object with the properties of the event dump filter.",
        "properties": {
          "job_id": {
            "type": "string",
            "example": "1ZymBc-00041N-9X",
            "description": "Job identifier returned earlier by [email/send](#email-send) method."
          },
          "status": {
            "type": "string",
            "enum": [
              "sent",
              "delivered",
              "opened",
              "clicked",
              "unsubscribed",
              "subscribed",
              "soft_bounced",
              "hard_bounced",
              "spam"
            ],
            "description": "Email status. Possible values are:<br> <br>__accepted__ — the message has been accepted, but not sent yet. <br>__sent__ — the message has been sent, but not delivered yet. <br>__delivered__ — the message has been delivered. <br>__opened__ — the message has been delivered and read. <br>__clicked__ — the message has been delivered, read, and at least one of the links in email has been clicked. <br>__unsubscribed__ — the message has been delivered to the recipient and read, but then the recipient unsubscribed. <br>__subscribed__ — the message has been delivered to the recipient and read, but then the recipient unsubscribed and subscribed again. <br>__soft_bounced__ — temporary delivery failure. UniOne will try to deliver the message during 48 hours. <br>__hard_bounced__ — failed to deliver the message, there will be no delivery attempts. <br>__spam__ — the message has been delivered, but it was reported as spam by the recipient."
          },
          "delivery_status": {
            "type": "string",
            "description": "UniOne internal detailed delivery status, you can pass several values at once, comma-separated. Some possible values are:<br> <br> __err_user_unknown__ -- email address doesn't exist; <br> __err_user_inactive__ -- email address isn't used anymore; <br> __err_will_retry__ -- email was temporary rejected, delivery will be retried later; <br> __err_mailbox_discarded__ -- email address was active earlier, but now it's deleted; <br> __err_mailbox_full__ -- mailbox is full; <br> __err_spam_rejected__ -- email was rejected as a spam; <br> __err_blacklisted__ -- email was rejected because sender IP or sender domain is found in a black list; <br> __err_too_large__ -- email size is over limit, according to recipient's server; <br> __err_unsubscribed__ -- email was unsubscribed; <br> __err_unreachable__ -- numerous delivery failures lead to mark this email address as permanently unavailable; <br> __err_skip_letter__ -- sending has been canceled because the email address is temporarily unavailable; <br> __err_domain_inactive__ -- the domain does not accept mail or does not exist; <br> __err_destination_misconfigured__ -- the domain does not accept mail due to incorrect settings on the recipient’s side, and the server’s response contains information about a cause that can be fixed (for example, an inoperative blacklist is used, etc.); <br> __err_delivery_failed__ -- delivery failed due to other reasons; <br> __err_spam_skipped__ -- sending has been canceled because the campaign has been blocked as a spam; <br> __err_lost__ -- the message was not sent due to inconsistency of its parts or it has been lost because of the failure on our side. The sender needs to re-send the letter on his own, since the original has not been saved; <br><br> We reserve the right to change or add internal delivery statuses as we need, so the following list is provided as an example only, without any description: ok_sent, ok_delivered, ok_read, ok_link_visited, ok_unsubscribed, ok_resubscribed, ok_spam_folder, ok_fbl, not_sent, skip_dup_unreachable, skip_dup_temp_unreachable, skip_dup_mailbox_full, err_spam_removed, err_resend, err_unknown, err_retry_letter, err_src_invalid, err_dest_invalid, err_not_available, err_internal, err_no_dns, err_no_smtp, err_giveup."
          },
          "email": {
            "type": "string",
            "format": "email",
            "example": "david@example.org",
            "description": "Recipient email address"
          },
          "email_from": {
            "type": "string",
            "format": "email",
            "example": "sender@example.com",
            "description": "Sender email address"
          },
          "domain": {
            "type": "string",
            "example": "example.org",
            "description": "Recipient domain"
          },
          "campaign_id": {
            "type": "string",
            "example": "c77f4f4e-3561-49f7-9f07-c35be01b4f43",
            "description": "Campaign identifier, unsigned decimal integer or UUID up to 128-bit, passed in metadata with name \"campaign_id\" (name is configurable thru support)."
          }
        }
      },
      "EventDumpFilesObject": {
        "type": "object",
        "description": "An object with the properties of the event dump file.",
        "required": [
          "url",
          "size"
        ],
        "properties": {
          "url": {
            "type": "string",
            "example": "https://eu1.unione.io/event-dump/Agejmh63Efmngaow4tDFGqwqt-1.csv",
            "description": "Use this unique URL to download the requested dump file (either .csv or .csv.gz, depending on your request)."
          },
          "size": {
            "type": "integer",
            "example": 512345,
            "description": "File size."
          }
        }
      },
      "EventDumpObject": {
        "type": "object",
        "description": "An object with the properties of the event dump.",
        "required": [
          "dump_id",
          "dump_status"
        ],
        "properties": {
          "dump_id": {
            "type": "string",
            "example": "Gqfasjh34tlasd",
            "description": "Dump ID received by the method [event-dump/create](#event-dump-create)."
          },
          "dump_status": {
            "type": "string",
            "example": "in_process",
            "description": "Task status, possible values are:<ul><li>__queued__ - the task is in the queue, processing is not started yet;<li>__in_process__ - the request is being processed;<li>__ready__ - the task is finished, dump file is ready for download;<li>__failed__ -  processing failed due to an internal error.</ul>"
          },
          "files": {
            "type": "array",
            "description": "An array of objects, each representing a file, ready for download. You may start downloading everything listed in “files” even if \"dump_status\" is still \"in_process\". If there are no events, according to the specified parameters, an empty array will be returned.",
            "items": {
              "$ref": "#/components/schemas/EventDumpFilesObject"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "name": "X-API-KEY",
        "in": "header",
        "description": "User or project API key authentication. Also there's an alternative non-recommended way of providing extra api_key parameter in JSON body."
      }
    }
  }
}