Email API
With our simple, smart, and fully RESTful Email APIs, you can seamlessly integrate Email capabilities into your application and get started within seconds.
With Taqnyat, building powerful Email-enabled solutions has never been easier. Just a few lines of code are enough to activate messaging features and enhance your application to meet your business needs.
In the guide below, we’ll walk you through how the Taqnyat Email API works and how to start using it effectively.
Architecture Design

APIs Features:
Connecting to the Taqnyat API is straightforward and flexible. You can integrate using standard HTML forms that submit data via POST, or by using the Email Builder available in the Taqnyat Portal.
We recommend using the POST method, as it provides greater flexibility and better integration with your existing systems. You may also submit requests in JSON format — a detailed explanation of the JSON structure is provided in this document.
All API responses are returned in JSON, ensuring compatibility with modern applications.
When connecting to the Taqnyat API over HTTP or HTTPS, email data must follow specific formatting requirements:
Sender Name must be URL-encoded.
Message content must be encoded in UTF-8.
Before you go
We recommended the one who is going to use this documentation or APIs to have programming skills.
The testing cost is nothing because we offer a free startup balance of 1 SAR for any trial account.
Cost calculation for messaging depends on how many emails you will send and how many destinations it will be receiving the emails.
You must have an active sender name before you go, you may contact [email protected] or account manager to get more details about the requirements and how to activate your Sender Name.
Base URL
All URLs resources in the Email documentation have the base URL https://api.taqnyat.sa/
Authentication
To use our API, you will need a unique Bearer token generated from your account at our platform by following the below steps Setup Bearer token
For REST API Bearer token must be submitted withen the header Authorization.
If you failed to authenticate the request, response header with error 401 expected to return. You need to make sure passing the correct credential.
Setup Bearer token
With Taqnyat you can set up your bearer token in seconds using the below steps:
Login to your account at Taqnyat.
Select Application from Developer section.
Press the add button on the top right corner.
Choose a suitable name for your application.
Select the services you want this app to include , in our case Email.
Hit the confirm button to submit your application.
Copy the Bearer Tokens.
Let us Get started
To use taqnyat.sa API, you should have a taqnyat.sa account, here is an explanation of how you can register, checking your current balance, request a recharge for your balance through a “request recharge form” in taqnyat.sa website.
Registration process: You can register on taqnyat.sa website through the following link: Contact and go to Sales tab ,fill the form and hit send.
Check your balance: You can check your current balance from the website after you logged at the dashboard.
Balance Topup: After your login to your https://www.taqnyat.sa account, you can request recharging your balance, through the request top-up form, you can access it through the balance top-up tab located in the left top corner. Fill all the required data in the form and we will top up your account within two hours at most after we validate the deposit.
Using bearer Tokens: bearer Tokens will have a unique value generated in the taqnyat.sa user account , because it provides a more secure connection with the API.
Setup API settings: taqnyat.sa provides security settings that allows you to control Emails sending through API. You can enable or disable sending Emails through API from your account, grant permission to specific IP’s to be allowed to send Emails message through API using your account, and grant permission to specific countries to be allowed to send Emails message through API using your account.
System
System resources are used to retrieve info about the system.
System status
This method used to retrieve status for one or multiple services in the system. Authenticationis not required .
GET /system/status/
Here are some examples of HTTP API:
if the request submitted successfully header status of 200 will be return as follows:
Response
Send a Mail
Here are some examples of HTTP API:
campaignName
The Name of Your Campain
Yes
subject
The Subject for your Email
Yes
from
The Sender Email
Yes
to
Array of Resivers Email
Yes
msg
The Message that you want to send it
Yes
Here is some example of HTTP API to send text:
Here is some example of HTTP API to send HTML code:
if the request return ErrorCode 2
if the request return ErrorCode 3
if the request return ErrorCode 14
if the request return ErrorCode 15
if the request return ErrorCode 16
if the request return ErrorCode 17
if the request return ErrorCode 101
if the request return ErrorCode 102
if the request return ErrorCode 104 , you are using wrong bearer Tokens make sure to follow the steps in above to setup your bearer Token Setup Bearer token
Last updated
Was this helpful?