{"id":3924,"date":"2024-11-15T15:53:30","date_gmt":"2024-11-15T15:53:30","guid":{"rendered":"http:\/\/34.88.191.99\/?page_id=3924"},"modified":"2025-04-07T13:55:42","modified_gmt":"2025-04-07T13:55:42","slug":"send-e-mail","status":"publish","type":"page","link":"https:\/\/ip1sms.com\/en\/developer\/send-e-mail\/","title":{"rendered":"Send email"},"content":{"rendered":"<h1 class=\"wp-block-heading\" id=\"sending-emails\">Send email<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"endpoint\">Endpoint<\/h2>\n\n\n\n<p>Endpoint: <code>POST emails<\/code><\/p>\n\n\n\n<p>When you want to send e-mail messages, you use the call data type below.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"request-data-type\">Call data type<\/h2>\n\n\n\n<p>At its core, the email sending endpoint needs the following values:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n{ &quot;senderName&quot;: &quot;iP.1 Networks AB&quot;, &quot;senderAddress&quot;: &quot;info@ip1.se&quot;, &quot;recipients&quot;: [ &quot;info@othercorp.com&quot;, &quot;billing@othercorp.com&quot; ], &quot;subject&quot; : &quot;Test message&quot;, &quot;type&quot;: &quot;Text&quot;, &quot;body&quot;: &quot;This is a simple test message&quot; }\n\n<\/pre><\/div>\n\n\n<p>This call will immediately send an email message to each specified recipient with the text content &quot;This is a simple test message&quot; with the sender &quot;iP.1 Networks AB&quot;.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"sendername\">senderName<\/h3>\n\n\n\n<p>The name associated with the sender address. Can be anything, max 64 characters.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"senderaddress\">senderAddress<\/h3>\n\n\n\n<pre id=\"tw-target-text\" class=\"wp-block-preformatted\">The sender email address from which the email will be sent. Any valid email address for a registered and verified domain.<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"recipients\">recipients<\/h3>\n\n\n\n<pre id=\"tw-target-text\" class=\"wp-block-preformatted\">An array of email addresses to send the email to. Requires all email addresses to be valid.<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"subject\">subject<\/h3>\n\n\n\n<p>The email subject line. Max 78 characters.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"type\">type<\/h3>\n\n\n\n<p>The type of email to send that determines how the body parameter is used, descriptions below.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Value (type)<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>Text<\/td><td>Unformatted email, the body is the entire email content<\/td><\/tr><tr><td>Hybrid<\/td><td>Plain text entered into our ready-made HTML template as a text box, the body is the text in the box<\/td><\/tr><tr><td>HTML<\/td><td>Full HTML email, body when a full HTML page<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">body<\/h3>\n\n\n\n<p>The email content. Plain text or HTML depending on the type used.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"extended\">Expanded<\/h2>\n\n\n\n<p>Some may require additional features such as template, scheduled shipment, delivery reports and being able to enter your own reference.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n{ &quot;senderName&quot;: &quot;Sample Corp&quot;, &quot;senderAddress&quot;: &quot;info@example.com&quot;, &quot;recipients&quot;: { &quot;info@othercorp.com&quot;: { &quot;name&quot;: &quot;Head Office&quot;, &quot;text&quot;: &quot; special&quot; }, &quot;billing@othercorp.com&quot;: {}, &quot;default&quot;: { &quot;name&quot;: &quot;Office&quot;, &quot;text&quot;: &quot;plain&quot; } }, &quot;subject&quot;: &quot;Sample Email&quot;, &quot;type&quot; : &quot;Text&quot;, &quot;body&quot;: &quot;This is a sample email in {text} text to {name}&quot;, &quot;priority&quot;: 1, &quot;deliveryWindows&quot;: [ { &quot;opens&quot;: &quot;ISO-8601 string&quot;, &quot;closes&quot;: &quot;ISO-8601 string&quot; }, { &quot;opens&quot;: &quot;ISO-8601 string &quot;, &quot;closes&quot;: &quot;ISO-8601 string&quot; } ], &quot;deliveryReportUrl&quot;: &quot;https:\/\/api.example.com\/email\/deliveryreport&quot;, &quot;reference&quot;: &quot;A client reference&quot;, &quot;tags&quot;: [ &quot;marketing&quot;, &quot;ux&quot;, &quot;design&quot;] }\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"recipients---templating\">recipients - templating<\/h3>\n\n\n\n<p>In order to use our templating system, you need to convert your previous recipient set to a dictionary of dictionaries. The top level key is the recipient&#039;s email address. The second level key is then searched for in the text and then replaced by the second level&#039;s value.<\/p>\n\n\n\n<p>If the key name is not included, it will be generated by extracting the user part of the email address. This template value is used as the recipient name associated with that email address.<\/p>\n\n\n\n<p>The default key is used for fallback values for keys that are missing from a receiver. Like the second one in the example.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"priority\">priority<\/h3>\n\n\n\n<p>If it is very important to you that your messages arrive quickly and are not obstructed by our other messages in the queue, you can prioritize higher. However, prioritizing a higher value will increase the price by 10 \u00f6re (0.01 EUR). Priority 1 is the default and is the lowest priority available, and priority 2 is the highest priority available. If specified, 1 and 2 are the only valid values.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"deliverywindows\">deliveryWindows<\/h3>\n\n\n\n<p>If there is a need to schedule a shipment, it is possible to do so with our delivery time windows.<\/p>\n\n\n\n<p>You can have as many windows as you like. This allows you to send messages at specific times over several days, e.g. every day between 10:00 and 10:05 on weekdays.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"parsing\">Parsing<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>null <\/strong>in the field <strong>opens<\/strong> will be replaced with the current date and time.<\/li>\n\n\n\n<li>If <code><strong>closes<\/strong><\/code> is <strong><code>null<\/code> <\/strong>the field will be set to 7 days (168 hours after the value in the field <strong>opens<\/strong>).<\/li>\n<\/ul>\n\n\n\n<p>The call will be rejected if there are overlapping windows.<\/p>\n\n\n\n<p>If no window is given, we will create a window that will apply the above rule.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"deliveryreporturl\">deliveryReportUrl<\/h3>\n\n\n\n<p>If provided, status update reports will be sent to this URL via POST. These reports are separate for each message recipient and each status update. For further reading about these reports, see Read delivery reports<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"reference\">reference<\/h3>\n\n\n\n<p>This is a feature that allows the user of this API to have their own ID or credential if storing the iP.1&#039;s generated ID is not preferred.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"restrictions\">Restrictions<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>May be a maximum of 40 characters<\/li>\n\n\n\n<li>Cannot be empty string or spaces.<\/li>\n<\/ul>\n\n\n\n<p><code>null<\/code> is default value.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"tags\">tags<\/h3>\n\n\n\n<p>An array of tags used to categorize\/sort the email among your other emails. When listing parties, you can filter by these.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"response\">Reply<\/h2>\n\n\n\n<p>If the call is accepted, the API will return a digest for the email, which can be found later at the location specified by the location header. For more information about the response data type, see the email documentation.<\/p>\n\n\n\n<p>We will return our response before we have received confirmation that your account balance has been confirmed so the price summary may not be set.<\/p>","protected":false},"excerpt":{"rendered":"<p>Skicka e-post Endpoint Endpoint: POST emails N\u00e4r du vill skicka e-postmeddelanden anv\u00e4nder du dig av anrops-datatypen nedan. Anrops-datatyp I sin k\u00e4rna beh\u00f6ver endpointen f\u00f6r e-postustkick f\u00f6ljande v\u00e4rden: Detta anrop kommer att omg\u00e5ende att skicka ett e-postmeddelande till varje angiven mottagare med textinneh\u00e5llet &#8221;Detta \u00e4r ett enkelt testmeddelande&#8221; till med avs\u00e4ndaren &#8221;iP.1 Networks AB&#8221;. senderName Namnet [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":382,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"developer-email.php","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-3924","page","type-page","status-publish","hentry","category-api-dokumention"],"_links":{"self":[{"href":"https:\/\/ip1sms.com\/en\/wp-json\/wp\/v2\/pages\/3924","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ip1sms.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ip1sms.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ip1sms.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ip1sms.com\/en\/wp-json\/wp\/v2\/comments?post=3924"}],"version-history":[{"count":0,"href":"https:\/\/ip1sms.com\/en\/wp-json\/wp\/v2\/pages\/3924\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/ip1sms.com\/en\/wp-json\/wp\/v2\/pages\/382"}],"wp:attachment":[{"href":"https:\/\/ip1sms.com\/en\/wp-json\/wp\/v2\/media?parent=3924"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ip1sms.com\/en\/wp-json\/wp\/v2\/categories?post=3924"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ip1sms.com\/en\/wp-json\/wp\/v2\/tags?post=3924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}