{"id":12427,"date":"2026-07-10T10:56:17","date_gmt":"2026-07-10T10:56:17","guid":{"rendered":"https:\/\/www.hostinger.com\/support\/?p=12427"},"modified":"2026-08-06T10:34:38","modified_gmt":"2026-08-06T10:34:38","slug":"how-to-use-official-sdks-for-hostinger-mail-api","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/how-to-use-official-sdks-for-hostinger-mail-api\/","title":{"rendered":"How to use official SDKs for Hostinger Mail API"},"content":{"rendered":"<div>\n<div>\n<div>\n<div>\n<div>Hostinger provides <strong><a href=\"https:\/\/www.hostinger.com\/support\/11080244-introduction-to-hostinger-api-sdks\/\">official SDKs<\/a> for the Mail API,<\/strong> making it easy for developers to integrate email functionality into their applications. Instead of writing raw HTTP requests, you can install a ready-made SDK in one command and start sending emails right away.<\/div>\n<div><\/div>\n<div>\n<div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">If you&rsquo;d rather interact with the Mail API from the command line instead, see <a href=\"https:\/\/www.hostinger.com\/support\/how-to-install-and-use-the-official-cli-for-the-hostinger-mail-api\/\">how to install and use the official CLI for the Hostinger Mail API<\/a>.<\/div>\n<\/div>\n<h2 id=\"h-available-sdks-and-installation\"><b>Available SDKs and installation<\/b><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div><div>\n<div>\n<div>\n<p>Choose the SDK for your programming language and install it using your package manager:<\/p>\n<p><b>PHP<\/b><br>\n<code>composer require hostinger\/mail-api-php-sdk<\/code><\/p>\n<p><b>TypeScript \/ Node.js<\/b><br>\n<code>npm install hostinger-mail-api-sdk<\/code><\/p>\n<p><b>Python<\/b><br>\n<code>pip install hostinger-mail-api<\/code><\/p>\n<\/div>\n<\/div>\n<div><\/div>\n<\/div><div>\n<div>\n<div>\n<div>\n<h2 id=\"h-what-is-included\"><b>What is included?<\/b><\/h2>\n<div>All three SDKs come with the following built-in:<\/div>\n<ul>\n<li><strong>API-key authentication:<\/strong> securely connect to the Hostinger Mail API<\/li>\n<li><strong>Sending email:<\/strong> send transactional or custom emails with minimal code<\/li>\n<li><strong>Typed error handling:<\/strong> clear, predictable error responses<\/li>\n<li><strong>Retries and timeouts<\/strong>: built-in resilience for network issues<\/li>\n<li><strong>Webhook payload parsing:<\/strong> easily process incoming Mail API events<\/li>\n<li><strong>Quickstart README:<\/strong> copy-paste examples to get started immediately<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<\/div><div>\n<div>\n<div>\n<div>\n<h2 id=\"h-getting-started\"><b>Getting started<\/b><\/h2>\n<div>After installing the SDK for your language, refer to the quickstart README included in the package. It covers authentication setup and your first email send with copy-paste code examples.<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Hostinger provides official SDKs for the Mail API, making it easy for developers to integrate email functionality into their applications. Instead of writing raw HTTP&#8230;<\/p>\n","protected":false},"author":596,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[315],"tags":[],"class_list":["post-12427","post","type-post","status-publish","format-standard","hentry","category-hostinger-mail-api"],"hreflangs":[],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/12427","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=12427"}],"version-history":[{"count":6,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/12427\/revisions"}],"predecessor-version":[{"id":14766,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/12427\/revisions\/14766"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=12427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=12427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=12427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}