# UniOne Web API This file describes the latest UniOne Web API. The canonical machine-readable specification is always at https://docs.unione.io/openapi/unione-web-api-latest.json (YAML: https://docs.unione.io/openapi/unione-web-api-latest.yaml). If this file and the specification differ, the specification is correct. 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. 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. AI assistants and agents (Claude, ChatGPT, Cursor and other MCP clients) can work with UniOne through the MCP server https://mcp.unione.io/mcp. Connect it through OAuth (sign in to your UniOne account, no key in the client settings) or with an API key in the header `Authorization: Bearer `. Setup guide: https://docs.unione.io/en/mcp. Base URL: - https://api.unione.io/en/transactional/api/v1 — UniOne API-server instance Authentication: API key in the `X-API-KEY` header parameter. ## MCP server UniOne has a hosted MCP server for AI agents: `https://mcp.unione.io/mcp` (Streamable HTTP). Full guide: https://docs.unione.io/en/mcp. Authentication, two options: - Sign in to UniOne (OAuth): add only the server URL; the client opens the UniOne consent screen "Allow access to your account?". Access is account-wide. Revoke in Settings → Security → Connected applications. - API key: header `Authorization: Bearer `. Use for CI, agents without a browser, or to limit access to one project with a project key. Tools call the public Web API with the same limits, billing and permissions. The MCP server itself is free. Tool names have no prefix; clients show them under the server name. | Tool | Type | Web API | |---|---|---| | get_account | Read | system/info | | list_domains | Read | domain/list | | get_dns_records | Write | domain/get-dns-records | | validate_domain | Read | domain/validate-verification-record, domain/validate-dkim | | delete_domain | Destructive | domain/delete | | get_sandbox_domain | Write | domain/get-sandbox-domain | | list_confirmed_emails | Read | confirmed-email/list | | add_confirmed_email | Write | confirmed-email/create | | delete_confirmed_email | Destructive | confirmed-email/delete | | send_email | Destructive | email/send | | list_templates, get_template | Read | template/list, template/get | | set_template | Destructive | template/set | | delete_template | Destructive | template/delete | | list_webhooks, get_webhook | Read | webhook/list, webhook/get | | set_webhook | Destructive | webhook/set | | delete_webhook | Destructive | webhook/delete | | get_suppression, list_suppressions | Read | suppression/get, suppression/list | | set_suppression | Destructive | suppression/set | | delete_suppression | Destructive | suppression/delete | | validate_email | Write | email-validation/single (billed) | | request_event_dump, get_event_dump | Write, Read | event-dump/create, event-dump/get | | delete_event_dump | Destructive | event-dump/delete | | list_tags | Read | tag/list | | delete_tag | Destructive | tag/delete | | list_projects | Read | project/list | | create_project | Write | project/create | | update_project | Destructive | project/update | | delete_project | Destructive | project/delete | First email without DNS: get_sandbox_domain → add_confirmed_email → the recipient clicks the link in the confirmation email (one-time, valid 48 hours) → send_email from noreply@. Sandbox limits: up to 10 confirmed recipients, 100 emails a day, the domain expires after 31 days. Sandbox and confirmed-email tools work only with sign-in or the account API key, not a project key. ## POST /email/send.json Sends an email or a bunch of emails While sending you can provide substitutions (merge tags), use a template, turn on read or click tracking, etc. Restrictions: * maximum request size is 10 MB * maximum number of recipients is 500 * The symbol '/' is not allowed in attachment names If 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. Request body (application/json): - `message` (object, required) — Object containing all message properties. - `recipients` (array of object, required) — Contains recipient emails, substitutions(merge tags) and metadata. - `email` (string, required) — Recipient email - `substitutions` (object) — 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: * body.html* body.plaintext* body.amp* subject* from_name* headers[**List-Unsubscribe**]* options.unsubscribe_url 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 **. The **to_name** length is limited to 78 symbols. - `metadata` (object) — 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. - `template_id` (string) — 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. - `tags` (array of string) — An array of strings. The maximum string length is 100 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. - `skip_unsubscribe` (integer, enum: 0, 1) — 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 usage of skip_unsubscribe=1. [Read more](https://docs.unione.io/en/unsubscribe-link). - `global_language` (string) — The language of the unsubscribe footer and unsubscribe page. Languages supported are: **be**, **de**, **en**, **es**, **fr**, **it**, **pl**, **pt**, **ru**, **ua**, **kz**. - `template_engine` (string, enum: simple, velocity, liquid, none) — 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**. - `global_substitutions` (object) — 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: * body.html* body.plaintext* body.amp* subject* from_name* options.unsubscribe_url A substitution name can consist from latin characeters, numbers and **_** symbol, and should start with the letter. - `global_metadata` (object) — 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'. - `body` (object, required) — Contains HTML/plaintext/AMP parts of the email. Either html or plaintext part is required. - `html` (string) — HTML part of the email body - `plaintext` (string) — Plaintext part of the email body. - `amp` (string) — Optional [AMP](http://amp.dev/documentation/guides-and-tutorials/learn/email_fundamentals/) part of the email body. - `subject` (string, required) — Email subject. - `from_email` (string) — Sender's email. Required only if template_id parameter is empty. - `from_name` (string) — Sender's name. - `reply_to` (string) — Optional Reply-To email (in case it's different to sender's email) - `reply_to_name` (string) — Optional Reply-To name (if reply_to email is specified and you want to display not only this email but also the name) - `track_links` (integer, enum: 0, 1) — 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. - `track_read` (integer, enum: 0, 1) — 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. - `bypass_global` (integer, enum: 0, 1) — (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. - `bypass_unavailable` (integer, enum: 0, 1) — (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. - `bypass_unsubscribed` (integer, enum: 0, 1) — (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)). - `bypass_complained` (integer, enum: 0, 1) — (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)). - `idempotence_key` (string) — 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). - `headers` (object) — 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. - `X-UNIONE-Global-Language` (string) — The language of the unsubscribe footer and unsubscribe page. Languages supported are: **be**, **de**, **en**, **es**, **fr**, **it**, **pl**, **pt**, **ru**, **ua**, **kz**. - `X-UNIONE-Template-Engine` (string) — 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. - `attachments` (array of object) — Optional array of attachments - `type` (string, required) — Attachment type, see [MIME](https://en.wikipedia.org/wiki/MIME). If unsure, use **application/octet-stream**. - `name` (string, required) — 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. - `content` (string, required) — File contents in [base64](https://en.wikipedia.org/wiki/Base64). Maximum file size 7MB (9786710 bytes in base64). - `inline_attachments` (array of object) — Optional array of inline attachments, e.g. for including images in email instead of loading them from external URL. - `type` (string, required) — Attachment type, see [MIME](https://en.wikipedia.org/wiki/MIME). If unsure, use **application/octet-stream**. - `name` (string, required) — Attachment content id. For example, **name**=**IMAGECID1** should be referenced in HTML like . - `content` (string, required) — File contents in [base64](https://en.wikipedia.org/wiki/Base64). Maximum file size 7MB (9786710 bytes in base64). - `options` (object) — Additional message options. - `send_at` (string) — Date and time in **YYYY-MM-DD hh:mm:ss** format in the UTC timezone. Allows schedule sending up to 24 hours in advance. - `unsubscribe_url` (string) — Custom unsubscribe link. Read more [here](https://docs.unione.io/en/unsubscribe-link). - `custom_backend_id` (integer) — 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` (string) — 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. Response 200: Email successfully accepted for sending. - `status` (string, required; enum: success) — **success** string - `job_id` (string, required) — Job identifier, might be useful for investigating errors. - `emails` (array of string) — Array of recipients emails successfully accepted for sending. - `failed_emails` (object) — Object with emails rejected for sending as property names and their statuses as property values, e.g.: {**email1@gmail.com**: **temporary_unavailable**}. Possible statuses: * __unsubscribed__ - specified email is unsubscribed;* __invalid__ - the email does not exist or has been entered incorrectly;* __duplicate__ - the email already exists in the request, email duplicating is prevented;* __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.: 1. a previous email has been rejected by the recipient's server for spam;* the recipient's mailbox is full or is not used;* recipient's domain does not accept mail;* sending server was rejected due to blacklisting;* __permanent_unavailable__ - the email address is permanently unavailable or unsubscribed globally.* __complained__ - the recipient reported spam in the previous emails;* __blocked__ - sending to the email is prohibited by administration of UniOne. We may added new statuses in the future. Response default: Error occured. ## POST /email/subscribe.json Sends an email with (re)subscribe link. 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. There 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. Request body (application/json): - `from_email` (string, required) — Sender’s email on a confirmed domain. (Field alias **email_address_from** is supported, too). - `from_name` (string, required) — Sender’s name. (Field alias **name_from** is supported, too). - `to_email` (string, required) — Recipient’s email. (Field alias **email_address_to** is supported, too). Response 200: Email successfully accepted for sending. - `status` (string, required; enum: success) — **success** string Response default: Error occured. ## POST /template/set.json Creates or updates an email template. Restrictions: * The maximum request size is 10 MB. * The number of templates is limited to 10000. Request body (application/json): - `template` (object, required) — Object with all the template properties. - `id` (string) — 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` (string, required) — Template name. - `editor_type` (string, enum: html, visual) — Editor type, **html** or **visual**. Default is **html**. You can create a template with **visual** editor type only in web interface. - `template_engine` (string, enum: simple, velocity, liquid, none) — 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**. - `global_substitutions` (object) — 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: * body.html* body.plaintext* body.amp* subject* from_name* options.unsubscribe_url A substitution name can consist from latin characeters, numbers and **_** symbol, and should start with the letter. - `global_metadata` (object) — 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'. - `body` (object) — Contains HTML/plaintext/AMP parts of the email. Either html or plaintext part is required. - `html` (string) — HTML part of the email body - `plaintext` (string) — Plaintext part of the email body. - `amp` (string) — Optional [AMP](http://amp.dev/documentation/guides-and-tutorials/learn/email_fundamentals/) part of the email body. - `subject` (string) — Email subject. - `from_email` (string, required) — Sender's email. - `from_name` (string) — Sender's name. - `reply_to` (string) — Optional Reply-To email (in case it's different to sender's email) - `reply_to_name` (string) — Optional Reply-To name (if reply_to email is specified and you want to display not only this email but also the name) - `track_links` (integer, enum: 0, 1) — 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. - `track_read` (integer, enum: 0, 1) — 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. - `headers` (object) — 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. - `X-UNIONE-Global-Language` (string) — The language of the unsubscribe footer and unsubscribe page. Languages supported are: **be**, **de**, **en**, **es**, **fr**, **it**, **pl**, **pt**, **ru**, **ua**, **kz**. - `X-UNIONE-Template-Engine` (string) — 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. - `attachments` (array of object) — Optional array of attachments - `type` (string, required) — Attachment type, see [MIME](https://en.wikipedia.org/wiki/MIME). If unsure, use **application/octet-stream**. - `name` (string, required) — 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. - `content` (string, required) — File contents in [base64](https://en.wikipedia.org/wiki/Base64). Maximum file size 7MB (9786710 bytes in base64). - `inline_attachments` (array of object) — Optional array of inline attachments, e.g. for including images in email instead of loading them from external URL. - `type` (string, required) — Attachment type, see [MIME](https://en.wikipedia.org/wiki/MIME). If unsure, use **application/octet-stream**. - `name` (string, required) — Attachment content id. For example, **name**=**IMAGECID1** should be referenced in HTML like . - `content` (string, required) — File contents in [base64](https://en.wikipedia.org/wiki/Base64). Maximum file size 7MB (9786710 bytes in base64). Response 200: Template set successfully. - `status` (string, required; enum: success) — **success** string - `template` (object, required) — Object with all the template properties. - `id` (string) — 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` (string, required) — Template name. - `editor_type` (string, enum: html, visual) — Editor type, **html** or **visual**. Default is **html**. You can create a template with **visual** editor type only in web interface. - `template_engine` (string, enum: simple, velocity, liquid, none) — 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**. - `global_substitutions` (object) — 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: * body.html* body.plaintext* body.amp* subject* from_name* options.unsubscribe_url A substitution name can consist from latin characeters, numbers and **_** symbol, and should start with the letter. - `global_metadata` (object) — 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'. - `body` (object) — Contains HTML/plaintext/AMP parts of the email. Either html or plaintext part is required. - `html` (string) — HTML part of the email body - `plaintext` (string) — Plaintext part of the email body. - `amp` (string) — Optional [AMP](http://amp.dev/documentation/guides-and-tutorials/learn/email_fundamentals/) part of the email body. - `subject` (string) — Email subject. - `from_email` (string, required) — Sender's email. - `from_name` (string) — Sender's name. - `reply_to` (string) — Optional Reply-To email (in case it's different to sender's email) - `reply_to_name` (string) — Optional Reply-To name (if reply_to email is specified and you want to display not only this email but also the name) - `track_links` (integer, enum: 0, 1) — 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. - `track_read` (integer, enum: 0, 1) — 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. - `headers` (object) — 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. - `X-UNIONE-Global-Language` (string) — The language of the unsubscribe footer and unsubscribe page. Languages supported are: **be**, **de**, **en**, **es**, **fr**, **it**, **pl**, **pt**, **ru**, **ua**, **kz**. - `X-UNIONE-Template-Engine` (string) — 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. - `attachments` (array of object) — Optional array of attachments - `type` (string, required) — Attachment type, see [MIME](https://en.wikipedia.org/wiki/MIME). If unsure, use **application/octet-stream**. - `name` (string, required) — 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. - `content` (string, required) — File contents in [base64](https://en.wikipedia.org/wiki/Base64). Maximum file size 7MB (9786710 bytes in base64). - `inline_attachments` (array of object) — Optional array of inline attachments, e.g. for including images in email instead of loading them from external URL. - `type` (string, required) — Attachment type, see [MIME](https://en.wikipedia.org/wiki/MIME). If unsure, use **application/octet-stream**. - `name` (string, required) — Attachment content id. For example, **name**=**IMAGECID1** should be referenced in HTML like . - `content` (string, required) — File contents in [base64](https://en.wikipedia.org/wiki/Base64). Maximum file size 7MB (9786710 bytes in base64). Response default: Error occured. ## POST /template/get.json Gets template properties by it's id. Request body (application/json): - `id` (string, required) — Template id. Response 200: Template returned successfully. - `status` (string, required; enum: success) — **success** string - `template` (object, required) — Object with all the template properties. - `id` (string) — 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` (string, required) — Template name. - `editor_type` (string, enum: html, visual) — Editor type, **html** or **visual**. Default is **html**. You can create a template with **visual** editor type only in web interface. - `template_engine` (string, enum: simple, velocity, liquid, none) — 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**. - `global_substitutions` (object) — 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: * body.html* body.plaintext* body.amp* subject* from_name* options.unsubscribe_url A substitution name can consist from latin characeters, numbers and **_** symbol, and should start with the letter. - `global_metadata` (object) — 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'. - `body` (object) — Contains HTML/plaintext/AMP parts of the email. Either html or plaintext part is required. - `html` (string) — HTML part of the email body - `plaintext` (string) — Plaintext part of the email body. - `amp` (string) — Optional [AMP](http://amp.dev/documentation/guides-and-tutorials/learn/email_fundamentals/) part of the email body. - `subject` (string) — Email subject. - `from_email` (string, required) — Sender's email. - `from_name` (string) — Sender's name. - `reply_to` (string) — Optional Reply-To email (in case it's different to sender's email) - `reply_to_name` (string) — Optional Reply-To name (if reply_to email is specified and you want to display not only this email but also the name) - `track_links` (integer, enum: 0, 1) — 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. - `track_read` (integer, enum: 0, 1) — 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. - `headers` (object) — 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. - `X-UNIONE-Global-Language` (string) — The language of the unsubscribe footer and unsubscribe page. Languages supported are: **be**, **de**, **en**, **es**, **fr**, **it**, **pl**, **pt**, **ru**, **ua**, **kz**. - `X-UNIONE-Template-Engine` (string) — 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. - `attachments` (array of object) — Optional array of attachments - `type` (string, required) — Attachment type, see [MIME](https://en.wikipedia.org/wiki/MIME). If unsure, use **application/octet-stream**. - `name` (string, required) — 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. - `content` (string, required) — File contents in [base64](https://en.wikipedia.org/wiki/Base64). Maximum file size 7MB (9786710 bytes in base64). - `inline_attachments` (array of object) — Optional array of inline attachments, e.g. for including images in email instead of loading them from external URL. - `type` (string, required) — Attachment type, see [MIME](https://en.wikipedia.org/wiki/MIME). If unsure, use **application/octet-stream**. - `name` (string, required) — Attachment content id. For example, **name**=**IMAGECID1** should be referenced in HTML like . - `content` (string, required) — File contents in [base64](https://en.wikipedia.org/wiki/Base64). Maximum file size 7MB (9786710 bytes in base64). Response default: Error occured. ## POST /template/list.json Returns the list of all or some templates of the account. 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. Request body (application/json): - `limit` (integer, default: 50) — Limits the number of templates returned, default is 50. - `offset` (integer, default: 0) — Index of the first template in the list, starting with 0. Response 200: Template list returned successfully. - `status` (string, required; enum: success) — **success** string - `templates` (array of object, required) — Array of template objects. - `id` (string, required) — Template unique identifier. - `name` (string, required) — Template name. - `editor_type` (string, enum: html, visual) — Editor type, **html** or **visual**. Default is **html**. You can create a template with **visual** editor type only in web interface. - `template_engine` (string, enum: simple, velocity, liquid, none) — 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**. - `global_substitutions` (object) — 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: * body.html* body.plaintext* body.amp* subject* from_name* options.unsubscribe_url A substitution name can consist from latin characeters, numbers and **_** symbol, and should start with the letter. - `global_metadata` (object) — 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'. - `body` (object, required) — Contains HTML/plaintext/AMP parts of the email. Either html or plaintext part is required. - `html` (string) — HTML part of the email body - `plaintext` (string) — Plaintext part of the email body. - `amp` (string) — Optional [AMP](http://amp.dev/documentation/guides-and-tutorials/learn/email_fundamentals/) part of the email body. - `subject` (string) — Email subject. - `from_email` (string, required) — Sender's email. - `from_name` (string) — Sender's name. - `reply_to` (string) — Optional Reply-To email (in case it's different to sender's email) - `reply_to_name` (string) — Optional Reply-To name (if reply_to email is specified and you want to display not only this email but also the name) - `track_links` (integer, enum: 0, 1) — 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. - `track_read` (integer, enum: 0, 1) — 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. - `headers` (object) — 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. - `X-UNIONE-Global-Language` (string) — The language of the unsubscribe footer and unsubscribe page. Languages supported are: **be**, **de**, **en**, **es**, **fr**, **it**, **pl**, **pt**, **ru**, **ua**, **kz**. - `X-UNIONE-Template-Engine` (string) — 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. - `attachments` (array of object) — Optional array of attachments - `type` (string, required) — Attachment type, see [MIME](https://en.wikipedia.org/wiki/MIME). If unsure, use **application/octet-stream**. - `name` (string, required) — 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. - `content` (string, required) — File contents in [base64](https://en.wikipedia.org/wiki/Base64). Maximum file size 7MB (9786710 bytes in base64). - `inline_attachments` (array of object) — Optional array of inline attachments, e.g. for including images in email instead of loading them from external URL. - `type` (string, required) — Attachment type, see [MIME](https://en.wikipedia.org/wiki/MIME). If unsure, use **application/octet-stream**. - `name` (string, required) — Attachment content id. For example, **name**=**IMAGECID1** should be referenced in HTML like . - `content` (string, required) — File contents in [base64](https://en.wikipedia.org/wiki/Base64). Maximum file size 7MB (9786710 bytes in base64). - `created` (string, required) — Template creation date and time in UTC timezone in format **YYYY-MM-DD hh:mm:ss** - `user_id` (integer, required) — Unique user identifier. - `project_id` (string) — Unqiue project identifier, ASCII string up to 36 characters long. - `project_name` (string) — Project name, unique for user account. Response default: Error occured. ## POST /template/delete.json Deletes a template by id. Request body (application/json): - `id` (string, required) — Template id. Response 200: Template deleted successfully. - `status` (string, required; enum: success) — **success** string Response default: Error occured. ## POST /webhook/set.json Sets or edits a [webhook](#webhook), i.e. an event notification handler. Request body (application/json): - `url` (string, required) — 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` (string, enum: active, disabled, stopped; default: active) — 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). - `event_format` (string, enum: json_post, json_post_gzip; default: json_post) — Notification format. **json_post**(default) or **json_post_gzip**. - `delivery_info` (integer, enum: 0, 1; default: 0) — 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, detected geo fields, device info detected from the user agent (device type and brand, OS name, browser or email client name) and traffic_type (human, machine, protected or unknown) 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. - `single_event` (integer, enum: 0, 1; default: 0) — 0=several event notifications can be reported in single webhook call, 1=only single event can be reported in one call (not recommended). - `max_parallel` (integer, default: 10) — Maximum quantity of permitted parallel queries to your server. The more your server can handle - the better. - `events` (object) — Object containing events to notify of. - `spam_block` (array of string) — If present then spam block events will be reported. Should contain single array element with ***** string. - `email_status` (array of string) — If present then email status change events will be reported. Contains names of statuses to notify of. Response 200: Webhook set successfully. - `status` (string, required; enum: success) — **success** string - `object` (object, required) — Object with all the webhook properties. - `id` (integer, required) — Webhook unique identifier. - `url` (string, required) — Webhook URL. - `status` (string, required; enum: active, disabled, stopped; default: active) — 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). - `event_format` (string, required; enum: json_post, json_post_gzip; default: json_post) — Notification format. **json_post**(default) or **json_post_gzip**. - `delivery_info` (integer, required; enum: 0, 1; default: 0) — 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, detected geo fields, device info detected from the user agent (device type and brand, OS name, browser or email client name) and traffic_type (human, machine, protected or unknown) 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. - `single_event` (integer, required; enum: 0, 1; default: 0) — 0=several event notifications can be reported in single webhook call, 1=only single event can be reported in one call (not recommended). - `max_parallel` (integer, required; default: 10) — Maximum quantity of permitted parallel queries to your server. The more your server can handle - the better. - `updated_at` (string) — Webhook properties last update date and time in UTC timezone in **YYYY-MM-DD hh:mm:ss** format. - `events` (object) — Object containing events to notify of. - `spam_block` (array of string) — If present then spam block events will be reported. Should contain single array element with ***** string. - `email_status` (array of string) — If present then email status change events will be reported. Contains names of statuses to notify of. Response default: Error occured. ## POST /webhook/get.json Gets properties of a [webhook](#webhook). Request body (application/json): - `url` (string, required) — Webhook URL. Response 200: Webhook returned successfully. - `status` (string, required; enum: success) — **success** string - `object` (object, required) — Object with all the webhook properties. - `id` (integer, required) — Webhook unique identifier. - `url` (string, required) — Webhook URL. - `status` (string, required; enum: active, disabled, stopped; default: active) — 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). - `event_format` (string, required; enum: json_post, json_post_gzip; default: json_post) — Notification format. **json_post**(default) or **json_post_gzip**. - `delivery_info` (integer, required; enum: 0, 1; default: 0) — 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, detected geo fields, device info detected from the user agent (device type and brand, OS name, browser or email client name) and traffic_type (human, machine, protected or unknown) 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. - `single_event` (integer, required; enum: 0, 1; default: 0) — 0=several event notifications can be reported in single webhook call, 1=only single event can be reported in one call (not recommended). - `max_parallel` (integer, required; default: 10) — Maximum quantity of permitted parallel queries to your server. The more your server can handle - the better. - `updated_at` (string) — Webhook properties last update date and time in UTC timezone in **YYYY-MM-DD hh:mm:ss** format. - `events` (object) — Object containing events to notify of. - `spam_block` (array of string) — If present then spam block events will be reported. Should contain single array element with ***** string. - `email_status` (array of string) — If present then email status change events will be reported. Contains names of statuses to notify of. Response default: Error occured. ## POST /webhook/list.json List all or some [webhooks](#webhook) (event notification handlers) of a user or a project. Request body (application/json): - `limit` (integer) — Limits the number of webhooks returned. 50 is recommended. - `offset` (integer, default: 0) — Index of the first webhook in the list, starting with 0. Response 200: Webhook list returned successfully. - `status` (string, required; enum: success) — **success** string - `objects` (array of object) — Array of webhooks objects. - `id` (integer, required) — Webhook unique identifier. - `url` (string, required) — Webhook URL. - `status` (string, required; enum: active, disabled, stopped; default: active) — 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). - `event_format` (string, required; enum: json_post, json_post_gzip; default: json_post) — Notification format. **json_post**(default) or **json_post_gzip**. - `delivery_info` (integer, required; enum: 0, 1; default: 0) — 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, detected geo fields, device info detected from the user agent (device type and brand, OS name, browser or email client name) and traffic_type (human, machine, protected or unknown) 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. - `single_event` (integer, required; enum: 0, 1; default: 0) — 0=several event notifications can be reported in single webhook call, 1=only single event can be reported in one call (not recommended). - `max_parallel` (integer, required; default: 10) — Maximum quantity of permitted parallel queries to your server. The more your server can handle - the better. - `updated_at` (string) — Webhook properties last update date and time in UTC timezone in **YYYY-MM-DD hh:mm:ss** format. - `events` (object) — Object containing events to notify of. - `spam_block` (array of string) — If present then spam block events will be reported. Should contain single array element with ***** string. - `email_status` (array of string) — If present then email status change events will be reported. Contains names of statuses to notify of. Response default: Error occured. ## POST /webhook/delete.json Deletes an event notification handler You can also temporarily deactivate webhook without deleting it by setting it's status to **disabled** in [webhook/set](#webhook-set) method. Request body (application/json): - `url` (string, required) — Webhook URL. Response 200: Webhook deleted successfully. - `status` (string, required; enum: success) — **success** string Response default: Error occured. ## POST /unsubscribed/set.json Registers a new unsubscribed email. 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). Request body (application/json): - `address` (string, required) — Email to be unsubscribed. Response 200: Email has been unsubscribed successfully. - `status` (string, required; enum: success) — **success** string - `address` (string, required) — The unsubscribed email. - `message` (string, required; enum: unsubscribed, was inactive, was unsubscribed, added and unsubscribed) — Unsubscription process details: * **unsubscribed** if email has just been unsubscribed,* **was inactive** if it was inactive due some reason,* **was unsubscribed** if it already was unsubscribed before the call,* **added and unsubscribed** if it's a new email without status history and it was added and then unsubscribed immediately. Response default: Error occured. ## POST /unsubscribed/check.json Checks if an email is unsubscribed. Request body (application/json): - `address` (string, required) — Email to check. Response 200: Email unsubscription status successfully returned. - `status` (string, required; enum: success) — **success** string - `address` (string, required) — Email that was checked. - `is_unsubscribed` (boolean, required) — true if unsubscribed, false if not. Response default: Error occured. ## POST /unsubscribed/list.json Returns a list of all unsubscribed emails since provided date. Request body (application/json): - `date_from` (string) — 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). Response 200: The list of unsubscribed emails returned successfully. - `status` (string, required; enum: success) — **success** string - `unsubscribed` (array of object, required) — Array of object describing unsubscribed emails. - `address` (string) — Unsubscribed email. - `unsubscribed_on` (string) — Date and time when a recipient unsubscribed, in UTC timezone and **YYYY-MM-DD hh:mm:ss** format. Response default: Error occured. ## POST /suppression/set.json 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. Request body (application/json): - `email` (string, required) — Email to add in suppression list. - `cause` (string, required) — Cause of email being suppressed. One of: * __unsubscribed__ - email is unsubscribed;* __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.: 1. a previous email has been rejected by the recipient's server for spam;* the recipient's mailbox is full or is not used;* recipient's domain does not accept mail;* sending server was rejected due to blacklisting;* __permanent_unavailable__ - the email address is permanently unavailable due to multiple hard bounces;* __complained__ - the recipient reported spam in the previous emails; - `created` (string) — When suppression was created, in UTC timezone in **YYYY-MM-DD hh:mm:ss** format. Response 200: Email has been added to the suppression list. - `status` (string, required; enum: success) — **success** string Response default: Error occured. ## POST /suppression/get.json Gets a reason and date of email suppression. Request body (application/json): - `email` (string, required) — Email to get suppression details for. - `all_projects` (boolean, default: False) — If a user has projects functionality enabled, he/she can pass all_projects=true to search in all projects' data. Response 200: Method call has succeeded (but suppressions array can be empty if sending to email is not suppressed). - `status` (string, required; enum: success) — **success** string - `email` (string, required) — The email for which suppression details were requested. - `suppressions` (array of object, required) — Array of suppression objects. - `project_id` (string) — Unqiue project identifier, ASCII string up to 36 characters long. - `cause` (string, required) — Cause of email being suppressed. One of: * __unsubscribed__ - email is unsubscribed;* __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.: 1. a previous email has been rejected by the recipient's server for spam;* the recipient's mailbox is full or is not used;* recipient's domain does not accept mail;* sending server was rejected due to blacklisting;* __permanent_unavailable__ - the email address is permanently unavailable due to multiple hard bounces;* __complained__ - the recipient reported spam in the previous emails;* __blocked__ - sending to the email is prohibited by administration of UniOne. We may add some new causes in the future. - `source` (string, required) — Source of email being suppressed. One of: * __user__ - suppressed by user with [suppression/set](#suppression-set);* __system__ - sending to the email is prohibited by system, for example due to multiple hard bounces;* __subscriber__ - the recipient reported spam or unsubscribed in the previous emails. - `is_deletable` (boolean, required) — Is it possible to delete this suppression by calling suppression/delete method. - `created` (string, required) — When suppression was created, in UTC timezone in **YYYY-MM-DD hh:mm:ss** format. Response default: Error occured. ## POST /suppression/list.json Returns a suppression list since provided date. Request body (application/json): - `cause` (string) — Cause of email being suppressed. One of: * __unsubscribed__ - email is unsubscribed;* __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.: 1. a previous email has been rejected by the recipient's server for spam;* the recipient's mailbox is full or is not used;* recipient's domain does not accept mail;* sending server was rejected due to blacklisting;* __permanent_unavailable__ - the email address is permanently unavailable due to multiple hard bounces;* __complained__ - the recipient reported spam in the previous emails;* __blocked__ - sending to the email is prohibited by administration of UniOne. We may add some new causes in the future. - `source` (string) — Source of email being suppressed. One of: * __user__ - suppressed by user with [suppression/set](#suppression-set);* __system__ - sending to the email is prohibited by system, for example due to multiple hard bounces;* __subscriber__ - the recipient reported spam or unsubscribed in the previous emails. - `start_time` (string) — 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` (string) — 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` (integer) — Limits the number of records to be returned at one time, default is 50. Response 200: Returns a suppression list since provided date. - `status` (string, required; enum: success) — **success** string - `suppressions` (array of object, required) — Array of suppression objects. - `email` (string) — Email to get suppression details for. - `cause` (string, required) — Cause of email being suppressed. One of: * __unsubscribed__ - email is unsubscribed;* __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.: 1. a previous email has been rejected by the recipient's server for spam;* the recipient's mailbox is full or is not used;* recipient's domain does not accept mail;* sending server was rejected due to blacklisting;* __permanent_unavailable__ - the email address is permanently unavailable due to multiple hard bounces;* __complained__ - the recipient reported spam in the previous emails;* __blocked__ - sending to the email is prohibited by administration of UniOne. We may add some new causes in the future. - `source` (string, required) — Source of email being suppressed. One of: * __user__ - suppressed by user with [suppression/set](#suppression-set);* __system__ - sending to the email is prohibited by system, for example due to multiple hard bounces;* __subscriber__ - the recipient reported spam or unsubscribed in the previous emails. - `is_deletable` (boolean, required) — Is it possible to delete this suppression by calling suppression/delete method. - `created` (string, required) — When suppression was created, in UTC timezone in **YYYY-MM-DD hh:mm:ss** format. - `cursor` (string, required) — 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. Response default: Error occured. ## POST /suppression/delete.json 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. Request body (application/json): - `email` (string, required) — An email to delete from suppression list. Response 200: Email has been deleted from the suppression list. - `status` (string, required; enum: success) — **success** string Response default: Error occured. ## POST /domain/get-dns-records.json Returns info on domain DNS setup for using with UniOne. 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. You should add then DNS records like this to all of the domains you want to confirm: `@ IN TXT **unione-validate-hash=483bb362ebdbeedd755cfb1d4d661**` `us._domainkey IN TXT **k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDo7**` `@ IN TXT **v=spf1 include:spf.unione.io ~all**` - First record value should contain **verification-record** field returned by get-dns-records method **as is**. - 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. - 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. Syntax requirements of different DNS providers may differ: - sometimes it's necesarry to put full domain name instead of @ sign. - some providers require add TTL value (like 3600) - some providers don't require quotes for enclosing values Please check requirements of your provider and advice your users to do it. Request body (application/json): - `domain` (string, required) — Domain to get DNS records for. Response 200: Domain DNS info returned successfully. - `status` (string, required; enum: success) — **success** string - `domain` (string, required) — Domain to get DNS records for. - `verification-record` (string, required) — Record to be added **as is** to verify ownership of this domain. - `dkim` (string, required) — 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). Response default: Error occured. ## POST /domain/validate-verification-record.json Triggers verification record validation for domain. 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). Request body (application/json): - `domain` (string, required) — Domain to validate verification record for. Response 200: Verification record is valid. - `status` (string, required; enum: success) — **success** string - `message` (string, required) — Debug message. Response default: Error occured or record is invalid. ## POST /domain/validate-dkim.json Validates DKIM record for domain. 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). Request body (application/json): - `domain` (string, required) — Domain to validate DKIM record for. Response 200: DKIM record validation has started successfully. - `status` (string, required; enum: success) — **success** string - `message` (string, required) — Debug message. Response default: Error occured or record is invalid. ## POST /domain/list.json Returns a list of all registered domains for user or project, together with statuses of last validations. Returns last status of ownership validation and DKIM validation for each domain. Read more [here](#domain). Request body (application/json): - `domain` (string) — Optional domain name if you want to get the status of single domain only. - `limit` (integer, default: 50) — Limits the number of domains returned. Default is 50. - `offset` (integer, default: 0) — Index of the first domain in the list, starting with 0. Response 200: The list of the registered domains returned successfully. - `status` (string, required; enum: success) — **success** string - `domains` (array of object, required) — Array of objects describing domains. - `domain` (string, required) — Domain name. - `verification-record` (object, required) — Object describing verification record value and status. - `value` (string) — Record to be added **as is** to verify ownership of this domain. - `status` (string, enum: confirmed, unconfirmed) — Only domains with **confirmed** verification record are allowed as sender domains. - `dkim` (object, required) — Object describing DKIM record value and status. - `key` (string) — 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` (string, enum: active, inactive) — Only domains with **active** DKIM record are allowed as sender domains. Response default: Error occured. ## POST /domain/get-sandbox-domain.json Creates a sandbox domain for the account or returns the existing one. Returns an account sandbox domain that is ready for use in the `from_email` field of [email/send](#email-send). If the account has no sandbox domain, UniOne creates one and returns it. Repeated calls return the same domain. The method is available only with an account API key. Project API keys cannot create sandbox domains. - The sandbox domain has DKIM and SPF already set up and needs no DNS setup. Use it to send test emails before you verify your own domain. - Send from any address on the sandbox domain, but only to confirmed addresses (see confirmed-email/create). Sending to an unconfirmed address returns error 1598. - Up to 100 emails a day. Over the limit, email/send returns error 1599. - The domain expires 31 days after it was issued. After that, the method issues a new one. - domain/get-dns-records, domain/validate-verification-record, domain/validate-dkim and domain/delete return an error for the sandbox domain. - A project API key returns error 4300. Response 200: Sandbox domain has been returned. - `status` (string, required; enum: success) — **success** string - `domain` (string, required) — Sandbox domain name. Response default: Error occurred. ## POST /domain/delete.json Deletes a domain. Attention: you should use project's API key to delete a project's domain. Deletes a domain. Request body (application/json): - `domain` (string, required) — Domain name to delete. Response 200: Domain has been successfully deleted. - `status` (string, required; enum: success) — **success** string - `message` (string, required) — Domain deleted Response default: Error occured. ## POST /confirmed-email/create.json Adds an email address and sends a confirmation link. - The address stays unconfirmed until its owner clicks the link in the confirmation email. The link works once and expires in 48 hours. There is no resend: delete the address with confirmed-email/delete and add it again. - Up to 10 addresses per account (error 4006 over the limit). - Adding an address that is already in the list returns error 4004 if it is unconfirmed and 4005 if it is confirmed. - Works only with the account API key. A project API key returns error 4000. Request body (application/json): - `email` (string, required) — Email address to add or delete. Response 200: Confirmation email was sent. - `status` (string, required; enum: success) — **success** string - `confirmed_email` (object, required) - `email` (string, required) - `status` (string, required; enum: confirmed, unconfirmed) — Confirmation status of the email address. Response default: Error occured. ## POST /confirmed-email/list.json Lists confirmed and unconfirmed email addresses for the account. - Only confirmed addresses receive email from the sandbox domain. No pagination: an account has at most 10 addresses. An expired confirmation link doesn't change the status: the address stays unconfirmed. - Works only with the account API key. A project API key returns error 4200. Response 200: Confirmed email list. - `status` (string, required; enum: success) — **success** string - `confirmed_emails` (array of object, required) - `email` (string, required) - `status` (string, required; enum: confirmed, unconfirmed) — Confirmation status of the email address. Response default: Error occured. ## POST /confirmed-email/delete.json Deletes an email address from the account's confirmed email list. - Sending from the sandbox domain to the deleted address stops. To get a new confirmation link, delete the address and add it again with confirmed-email/create. - Deleting an address that is not in the list returns error 4104. Works only with the account API key; a project API key returns error 4100. Request body (application/json): - `email` (string, required) — Email address to add or delete. Response 200: Confirmed email deleted. - `status` (string, required; enum: success) — **success** string - `message` (string, required) Response default: Error occured. ## POST /event-dump/create.json 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. Request body (application/json): - `start_time` (string, required) — 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` (string) — Date and time in YYYY-MM-DD hh:mm:ss format, specifying period end time (non-inclusive). - `limit` (integer) — 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` (boolean, default: False) — For accounts with projects enabled, the value all_projects=true allows to fetch data for all existing projects. - `filter` (object) — An object with the properties of the event dump filter. - `job_id` (string) — Job identifier returned earlier by [email/send](#email-send) method. - `status` (string, enum: sent, delivered, opened, clicked, unsubscribed, subscribed, soft_bounced, hard_bounced, spam) — Email status. Possible values are: __accepted__ — the message has been accepted, but not sent yet. __sent__ — the message has been sent, but not delivered yet. __delivered__ — the message has been delivered. __opened__ — the message has been delivered and read. __clicked__ — the message has been delivered, read, and at least one of the links in email has been clicked. __unsubscribed__ — the message has been delivered to the recipient and read, but then the recipient unsubscribed. __subscribed__ — the message has been delivered to the recipient and read, but then the recipient unsubscribed and subscribed again. __soft_bounced__ — temporary delivery failure. UniOne will try to deliver the message during 48 hours. __hard_bounced__ — failed to deliver the message, there will be no delivery attempts. __spam__ — the message has been delivered, but it was reported as spam by the recipient. - `delivery_status` (string) — UniOne internal detailed delivery status, you can pass several values at once, comma-separated. Some possible values are: __err_user_unknown__ -- email address doesn't exist; __err_user_inactive__ -- email address isn't used anymore; __err_will_retry__ -- email was temporary rejected, delivery will be retried later; __err_mailbox_discarded__ -- email address was active earlier, but now it's deleted; __err_mailbox_full__ -- mailbox is full; __err_spam_rejected__ -- email was rejected as a spam; __err_blacklisted__ -- email was rejected because sender IP or sender domain is found in a black list; __err_too_large__ -- email size is over limit, according to recipient's server; __err_unsubscribed__ -- email was unsubscribed; __err_unreachable__ -- numerous delivery failures lead to mark this email address as permanently unavailable; __err_skip_letter__ -- sending has been canceled because the email address is temporarily unavailable; __err_domain_inactive__ -- the domain does not accept mail or does not exist; __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.); __err_delivery_failed__ -- delivery failed due to other reasons; __err_spam_skipped__ -- sending has been canceled because the campaign has been blocked as a spam; __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; 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` (string) — Recipient email address - `email_from` (string) — Sender email address - `domain` (string) — Recipient domain - `campaign_id` (string) — Campaign identifier, unsigned decimal integer or UUID up to 128-bit, passed in metadata with name **campaign_id** (name is configurable thru support). - `dump_fields` (array of string) — 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. - `aggregate` (string) — Allows you to obtain aggregated statistics for a given time period. The two allowed values are: * __day_status__ - fetch aggregated statistics (the filter value must be missing or empty, as filters are not allowed with this option);* __an empty string__ - used by default, event_dump/create works as if the aggregate parameter is omitted. - `delimiter` (string) — Field delimiter, can be set to either ',' or ';', defaults to ','. - `format` (string, default: csv) — File format, either “csv” (default) or “csv_gzip”. Response 200: Method call has succeeded. - `status` (string, required; enum: success) — **success** string - `dump_id` (string, required) — Dump identifier, used to call the [event-dump/get](#event-dump-get) method. Response default: Error occured. ## POST /event-dump/get.json Returns dump properties for a given identifier Request body (application/json): - `dump_id` (string, required) — Dump identifier received by the method [event-dump/create](#event-dump-create). Response 200: Dump information returned successfully. - `status` (string, required; enum: success) — **success** string - `event_dump` (object, required) — An object with the properties of the event dump. - `dump_id` (string, required) — Dump ID received by the method [event-dump/create](#event-dump-create). - `dump_status` (string, required) — Task status, possible values are: * __queued__ - the task is in the queue, processing is not started yet;* __in_process__ - the request is being processed;* __ready__ - the task is finished, dump file is ready for download;* __failed__ - processing failed due to an internal error. - `files` (array of object) — 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. - `url` (string, required) — Use this unique URL to download the requested dump file (either .csv or .csv.gz, depending on your request). - `size` (integer, required) — File size. Response default: Error occured. ## POST /event-dump/list.json This method does not require any parameters; returns the full list of existing dumps. Response 200: List returned successfully. - `status` (string, required; enum: success) — **success** string - `event_dumps` (array of object, required) — 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. - `dump_id` (string, required) — Dump ID received by the method [event-dump/create](#event-dump-create). - `dump_status` (string, required) — Task status, possible values are: * __queued__ - the task is in the queue, processing is not started yet;* __in_process__ - the request is being processed;* __ready__ - the task is finished, dump file is ready for download;* __failed__ - processing failed due to an internal error. - `files` (array of object) — 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. - `url` (string, required) — Use this unique URL to download the requested dump file (either .csv or .csv.gz, depending on your request). - `size` (integer, required) — File size. Response default: Error occured. ## POST /event-dump/delete.json Removes dump from queue or storage. Request body (application/json): - `dump_id` (string, required) — Dump identifier, obtained via the [event-dump/create](#event-dump-create) method. Response 200: Dump deleted successfully. - `status` (string, required; enum: success) — **success** string Response default: Error occured. ## POST /tag/list.json This method returns the full list of user-defined tags. Does not receive any parameters. Response 200: List returned successfully. - `status` (string, required; enum: success) — **success** string - `tags` (array of object, required) — An array of objects containing data for user-defined tags. - `tag_id` (integer, required) — Unique tag id. - `tag` (string, required) — Tag name. Response default: Error occured. ## POST /tag/delete.json Removes tag. Request body (application/json): - `tag_id` (integer, required) — Unique tag id. Response 200: Tag deleted successfully. - `status` (string, required; enum: success) — **success** string Response default: Error occured. ## POST /project/create.json Creates a new project. Request body (application/json): - `project` (object, required) — Object with project properties. - `name` (string, required) — Project name, unique for user account. - `country` (string) — ISO-3166 alpha-2 country code. If set, UniOne treats project personal data according to country laws, e.g. GDPR for european countries. - `send_enabled` (boolean, default: True) — Whether email sending is enabled for this project or not. - `custom_unsubscribe_url_enabled` (boolean) — 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 - `backend_domain_id` (integer) — 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. - `unsubscribe_page_id` (integer) — A unique identifier that defines the default unsubscribe page. If absent, the account/project will be assigned the system default unsubscribe page. Response 200: Project created successfully. - `status` (string, required; enum: success) — **success** string - `project_id` (string, required) — Unqiue project identifier, ASCII string up to 36 characters long. - `project_api_key` (string, required) — API key of the project. You can use it instead of the user API key parameter in all methods except project/* methods. Response default: Error occured. ## POST /project/update.json Updates a project. Request body (application/json): - `project_id` (string) — 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` (string) — 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` (object, required) — Object with project properties. - `name` (string, required) — Project name, unique for user account. - `country` (string) — ISO-3166 alpha-2 country code. If set, UniOne treats project personal data according to country laws, e.g. GDPR for european countries. - `send_enabled` (boolean, default: True) — Whether email sending is enabled for this project or not. - `custom_unsubscribe_url_enabled` (boolean) — 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 - `backend_domain_id` (integer) — 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. - `unsubscribe_page_id` (integer) — A unique identifier that defines the default unsubscribe page. If absent, the account/project will be assigned the system default unsubscribe page. - `email_counter` (integer) — 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` (integer, default: 0) — 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. - `email_counter_mode` (object, enum: default, permanent; default: default) — 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. Response 200: Project updated successfully. - `status` (string, required; enum: success) — **success** string - `project_api_key` (string) — 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. Response default: Error occured. ## POST /project/list.json Lists projects. Request body (application/json): - `project_id` (string) — Optional possibility to specify project_id to include only this project to list. - `project_api_key` (string) — Optional possibility to specify project_api_key to include only this project to list. Response 200: Projects returned successfully. - `status` (string, enum: success) — **success** string - `projects` (array of object) — Array of objects where each object represents one project. - `id` (string, required) — Unqiue project identifier, ASCII string up to 36 characters long. - `api_key` (string, required) — API key of the project. You can use it instead of the user API key parameter in all methods except project/* methods. - `name` (string, required) — Project name, unique for user account. - `country` (string, required) — ISO-3166 alpha-2 country code. If set, UniOne treats project personal data according to country laws, e.g. GDPR for european countries. - `reg_time` (string, required) — Date and time of project creation in UTC timezone in **YYYY-MM-DD hh:mm:ss** format. - `send_enabled` (boolean, required; default: True) — Whether email sending is enabled for this project or not. - `custom_unsubscribe_url_enabled` (boolean, required) — 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 - `backend_domain_id` (integer, required) — 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. - `email_counter` (integer, required) — Project's email counter value. It increases on every email sent. - `email_counter_limit` (integer, required) — 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` (object, required; enum: default, permanent; default: default) — 'default' - the counter resets to zero automatically at the beginning of each accounting period. 'permanent' - the counter never resets automatically. - `unsubscribe_page_id` (integer, required) — A unique identifier that defines the default unsubscribe page. If absent, the account/project will be assigned the system default unsubscribe page. Response default: Error occured. ## POST /project/delete.json Deletes a project. The project will be moved to the **trash bin** before being permanently deleted. You can restore the project by contacting support. Request body (application/json): - `project_id` (string) — 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` (string) — 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. Response 200: Project deleted successfully. - `status` (string, required; enum: success) — **success** string Response default: Error occured. ## POST /email-validation/single.json 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. Request body (application/json): - `email` (string, required) — Email address to be checked. Response 200: Email check completed successfully. - `status` (string, required; enum: success) — **success** string - `email` (string, required) — Email address to be checked. - `result` (string, required) — Possible statuses: * **valid** - the address is valid,* **invalid** - the address is invalid,* **suspicious** - the address looks suspicious,* **unknown** - could not perform validation, the domain’s mail server has not responded within the time limit. - `cause` (string, required) — Possible statuses: * **no_mx_record** - no MX record found for the target domain,* **syntax_error** - the address syntax is invalid,* **possible_typo** - the address is likely to have a typo,* **mailbox_not_found** - the address does not exist,* **global_suppression** - the address has been marked as unreachable due to multiple previous delivery errors,* **disposable** - this is a disposable one-time email address which is usually valid for a few minutes only,* **role** - the address is not likely to belong to an actual person, but rather to a certain business staff role,* **abuse** - the address is known to be a source of a large number of complaints, sometimes issued automatically,* **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,* **smtp_connection_failed** - the domain’s SMTP server does not respond; the address may contain a typo. - `validity` (integer, required) — Validity score, from 0 to 100 (0 – invalid, 100 – valid). - `local_part` (string, required) — Local part (everything preceding the @ sign). - `domain` (string, required) — Domain name part. - `mx_found` (boolean, required) — True if the address’ domain does have an MX record, false if does not. - `mx_record` (string, required) — Preferred MX record for the domain. - `did_you_mean` (string, required) — For addresses which are likely to have typing errors (cause=possible_typo), a suggested variant with a fixed typo. - `processed_at` (string, required) — Email check date and time, YYYY-MM-DD hh:mm:ss UTC. Response default: Error occured. ## POST /system/ping.json Checks API key validity and returns user ID. Response 200: API key is valid. - `status` (string, required; enum: success) — **success** string - `user_id` (integer, required) — Unique user identifier. Response default: Error occured. ## POST /system/info.json Gets user or project info by API key. Response 200: User or project info successfully returned. - `status` (string, required; enum: success) — **success** string - `user_id` (integer, required) — Unique user identifier. - `email` (string, required) — Email of the user. - `project_id` (string) — Unqiue project identifier, ASCII string up to 36 characters long. Present only if the API key used for request is the project API key. - `project_name` (string) — Project name, unique for user account. Present only if the API key used for request is the project API key. - `project_accounting` (object) — Object with email counter properties. Present only if the API key used for request is the user API key. - `email_counter` (integer, required) — Project's email counter value. It increases on every email sent. - `email_counter_limit` (integer, required) — 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` (object, required; enum: default, permanent; default: default) — 'default' - the counter resets to zero automatically at the beginning of each accounting period. 'permanent' - the counter never resets automatically. - `accounting` (object) — Object with accounting period properties. Present only if the API key used for request is the user API key. - `period_start` (string, required) — Date and time of accounting period start in UTC in **YYYY-MM-DD hh:mm:ss** format. - `period_end` (string, required) — Date and time of accounting period end in UTC in **YYYY-MM-DD hh:mm:ss** format. - `emails_included` (integer, required) — Number of emails included into accounting period. - `emails_sent` (integer, required) — Number of emails sent during accounting period. Can be bigger than emails_included in case of overage. Response default: Error occured.