Titan API Document (1.0.0)

Download OpenAPI specification:

Introduction

All API requests must be over https. All API request/response bodies are formatted as JSON.

API Endpoints

US Region

EU Region

Authorization between Partner and Titan

  • To Authorize API requests, an Authorization header described below must be added to all requests.
  • We will share an API Key, which must be added to the Authorization header for us to identify the source of the request.
  • This API Key is a shared secret key between Partner and Titan.
  • Generally, for any API calls we make to your servers you must validate that the same contains this Authorization header and a valid API Key.
  • Partners should whitelist following Titan IPs - 3.92.40.244, 34.197.244.225, 52.7.187.26 & 3.64.226.220
  • It is recommended that partners should provide IPs of their servers to Titan so that Titan can do IP whitelisting for APIs present in this doc.

Sample Header

POST https://bll.titan.email/<API_ROUTE> HTTP/1.1
Authorization: API.Key

API.Key will be provided by us during onboarding

Example:

Assume we share an **API.Key** with you: 123456abcdefgh-

Appropriate Header syntax -
POST https://bll.titan.email/partner/createMailOrder HTTP/1.1
Authorization: 123456abcdefgh-

Error Response

  • Sample Error Response
    {
        "desc":"No Active domain found",
        "error":"DomainNotFound",
        "statusCode":404,
        "reqID":"4605e6ef-ea50-4a81-83f6-06159a9a906b"
    }
    
  • error
    • In case of an error, the server will send a well-defined error response as given below. The API consumers can take a decision regarding the message to be shown based on the error.
    • e.g : PartnerNotFound, DomainNotFound, UserNotFound, BAD_REQUEST, EXTERNAL_ERROR etc.
      • PartnerNotFound - Partner does not exist (or is marked inactive) in titan infra.
      • UserNotFound - Customer does not exist in titan infra.
      • DomainNotFound - Domain does not exist (or is marked inactive, in certain cases) in titan infra.
      • AccountNotFound - Email account does not exist (or is marked inactive, in certain cases) in titan infra.
      • FORBIDDEN - Unauthorized Access: Non-Whitelisted Ip
      • UNAUTHENTICATED - No auth header found
    • If we have messed up, you may get an INTERNAL_SERVER_ERROR. In such cases, please forward api call details to your Titan PoC.
  • statusCode is standard Http Error Codes. e.g : 404, 401, 500 etc.
  • desc is verbose error description.
  • Every api in the doc there is a section for possible error codes.

DNS Records to be added to provision order on Titan

  • <domain name> mx1.titan.email | mx2.titan.email
  • <domain name> TXT v=spf1 include:spf.titan.email ~all
  • _dmarc.<domain name> TXT v=DMARC1;p=none;sp=none;adkim=r;aspf=r;pct=100 (Optional)

Recommended API Retry logic: Exponential Back off

  • In case of an HTTP 5XX or a timeout please retry the API call
  • For each retry wait for 2X the number of seconds of the previous retry until you get an HTTP 200 OK
  • For e.g. retry after 1s, 2s, 4s, 8s, 16s, 32s, 64s ... and so on
  • You may stop retrying after 24 hours and log the same on your side
  • Parties must notify one another if we continue to get an error or a timeout for greater than 1 hour

APIs exposed by Titan

All APIs, unless specified, are idempotent, hence they can safely be called multiple times.

Below URLs are to be used in the request headers to call the APIs in the staging or production environments

General APIs

Health Check API

API to check Titan API's Gateway health. The approximate interval, between health checks should be at least 1 minute. If this API fails more than 3 times consecutively than partner should inform Titan.

Note:

Responses

Response samples

Content type
application/json
{
  • "reqID": "server.req.id"
}

Mail Order Management APIs

APIs for creation and management of mail Orders on the Titan Cloud infrastructure

Create Mail Order

API to provision a Mail Order on Titan.

Notes :

  • Control Panel password details will be sent via email to customerEmailAddress. If you need to disable it, please contact titan support.
  • We don't support IDN domains.
Request Body schema: application/json
required
domainName
required
string

Customer mail order being provisioned The order provisioned in Titanmail is against the domainName provided by the partner within the API

orderId
string

The order ID stored on your end for this mail order, if any. If needed, You can use this data to correlate orders at your end and in Titan.The data is returned in listMailOrders call.

customerId
required
string

The customer ID stored on your end for each customer This is used to identify all the orders linked to a particular customer

customerName
string

Name of the customer as stored in the partner's system. It is recommended to send the full name as we utilize this for any communication sent across to the customer.

customerEmailAddress
string

The email address with which the customer registers on the partner website This email is used in order for us to send out the password setup email or any signup/usage nudges to get the customer to utilize the email This email will be used by the customer to login into Control Panel. This user will also be the primary admin for the domain

alternateEmailAddress
string

This email will be used to send emails, in case email delivery fails for customerEmailAddress

password
string

Password for signing into Domain Control Panel

customerCountry
string

Should be the 2 letter ISO Code, country from which the customer is accessing partner website/making the purchase. We will use this to identify the localized pricing based on the location of the customer in cases where Titan mail is managing the billing.

planType
required
string
Enum: "free" "pro" "premium" "pro_trial" "premium_trial" "ultra" "ultra_trial"

This is the Titan mail plan to be provisioned for the provided mail order. This would vary based on the plans being positioned with the partner. It is highly recommended to provide payment details in case this is a paid plan

noOfAccounts
number

Required for Paid Plans The number of accounts or mailboxes to be provisioned against the domain. This is used as a limiting parameter for the user to create accounts within the Control Panel. E.g. if this is set to 2, the user will not be allowed to create more than 2 mailboxes

titanResellerId
number

Titan Reseller ID for reseller-level branding. If provided, the order will use the branding associated with this reseller. If null, falls back to partner's default branding.

expiryDate
string

In yyyy-MM-dd format.
Required for Paid and Trial Plans.
If the billing is managed by partner then partner should mark mail order suspended on expiry date.
If the billing is managed by Titan, then Titan will mark mail order suspended on non-renewal on expiry day. And after 7 days of expiry, mail order will be marked deleted. The permanent deletion of mail order data happens after 30 days of deletion.

paymentTxnId
string

Partner should provide transactionId when the order is provisioned on paid plan or associated order is paid

chargedAmount
number

Required for Paid Plans Total amount charged by the partner to the end customer in the customer's currency for this purchase including taxAmount. It is the actual cost that the user has paid while purchasing the order after any discount (which also includes tax if any). Precision upto 2 decimal places. Used primarily for reference and reporting on our end. This is applicable only in the case of a paid plan. For free/trial plans, this should be passed as "0"

currency
string

Should be 3 letter ISO code This is the currency in which the customer is being charged for Titan mail. Default USD (can be changed as for partner) . Used primarily for reference and reporting on our end.

chargedUSDAmount
number

Total amount charged by the partner to the end customer in USD for this purchase including taxAmount. It is the actual cost that the user has paid in USD while purchasing the order after any discount (which also includes tax if any). Partner should provide this value, if the order is provisioned on paid plan. Open exchange rates will be used if the partner does not provide this value.

discountAmount
number

Any ad hoc discount given to the customer for this purchase. This should be passed in the original currency in which amount was charged to the customers. This field is just for book-keeping. Titan will use this as a placeholder to check if there are any discounts given to the customer.

taxAmount
number

Amount collected from the user as TAX amount in the customer's currency for this purchase. Titan will deduct this amount from the chargedAmount to get revenue sharing amount. Precision upto 2 decimal places.

billingCycle
string
Enum: "monthly" "quarterly" "semesterly" "yearly" "two_yearly" "four_yearly"

This defines the period for which the customer has been billed for Titan mail by the partner. This is for us to track the billing cycle/details for that customer. Existing options are

locale
string

Specifies the language to be set within the Email Control Panel. List of support Titan languages - link Default is set to en-us

source
string
Enum: "domain" "standalone" "hosting" "migrated"

The source from which the order is received - Refers to the kind of package provisioned on the partners end. Source field should be either of these values - domain, standalone, hosting, migrated. It will be validated against these values when the Api call is made

sourceContext
string

The purchase hook from where Titan plan has been purchased by the customer
Purpose - This is used by us for reference and analyse the efficacy of various purchase hooks within the partner ecosystem from where customers are purchasing Titan paid plans. Some examples for sourceContext can be "website", "hpanel_store", "cPanel_hosting_email_section", "cPanel_email_tab", "email_marketing", etc.

object

Details of associated partner order

object

The first email account that partner wants to create with mail order. email & password both are required for first email account creation. This email will be marked admin by default. Purpose - To allow partners provision first emailAccount along with order in 1 API call

sendWelcomeEmail
boolean

Specifies whether or not to send email to customer for this newly created order. Default value of this flag is true

Responses

Request samples

Content type
application/json
{
  • "domainName": "xyz.com",
  • "orderId": "12431",
  • "customerId": "abcd123",
  • "customerName": "Adam Smith",
  • "customerEmailAddress": "adam@gmail.com",
  • "alternateEmailAddress": "abc@xyz.com",
  • "password": "asdfqwe",
  • "customerCountry": "US",
  • "planType": "pro",
  • "noOfAccounts": 10,
  • "titanResellerId": 456,
  • "expiryDate": "2020-02-20",
  • "paymentTxnId": "qweradsf",
  • "chargedAmount": 1.1,
  • "currency": "USD",
  • "chargedUSDAmount": 1.1,
  • "discountAmount": 0.1,
  • "taxAmount": 0.1,
  • "billingCycle": "monthly",
  • "locale": "en-gb",
  • "source": "hosting",
  • "sourceContext": "website",
  • "metadata": {
    },
  • "firstEmailAccount": {
    },
  • "sendWelcomeEmail": true
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id",
  • "titanOrderId": 1,
  • "status": "active",
  • "firstEmailAccountDetails": {
    }
}

Modify Mail Order

API to modify an existing Mail Order on Titan

Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

orderId
string

The order ID stored on your end for this mail order, if any. If needed, You can use this data to correlate orders at your end and in Titan.The data is returned in listMailOrders call.

planType
string
Enum: "pro" "pro_trial" "premium" "premium_trial" "ultra" "ultra_trial"

This is the Titan mail plan to be provisioned against the domain. In case the plan needs to be changed, the updated plan must be provided

paymentTxnId
string
chargedAmount
number

Required if domain is moving to paid plan or will remain on paid plan. This needs to be passed in customer's currency. It is the actual cost that the user has paid while purchasing the order after any discount (which also includes tax if any).

chargedUSDAmount
number

Total amount charged by the partner to the end customer in USD for this purchase including taxAmount. It is the actual cost that the user has paid in USD while purchasing after any discount (which also includes tax if any). Partner should provide this value, if the order is provisioned on paid plan. Open exchange rates will be used if the partner does not provide this value.

discountAmount
number

Any ad hoc discount given to the customer for this purchase. This should be passed in the original currency in which amount was charged to the customers. Titan will use this as a placeholder to check if there are any discounts given to the customer.

taxAmount
number

Amount collected from the user as TAX amount in the customer's currency for this purchase. Titan will deduct this amount from the chargedAmount to get revenue sharing amount. Precision upto 2 decimal places.

billingCycle
string
Enum: "monthly" "quarterly" "semesterly" "yearly" "two_yearly" "four_yearly"

This defines the period for which the customer has been billed for Titan mail by the partner. This is for us to track the billing cycle/details for that customer. Existing options are

expiryDate
string

In yyyy-MM-dd format.
Required for Paid and Trial Plans.
If the billing is managed by partner then partner should mark order suspended on expiry date.
If the billing is managed by Titan, then Titan will mark order suspended on non-renewal on expiry day. And after 7 days of expiry, order will be marked deleted. The permanent deletion of order data happens after 30 days of deletion.
If order is on the free plan or moving to free plan and partner wants to reset expiry date to empty, then partner should send "" (empty string) as expiry date.

currency
string
noOfAccounts
number

The number of accounts or mailboxes to be provisioned after modification. E.g. User had 3 mailboxes and wants to buy 2 more, this parameter will have to be 2+3->5. This is used as a limiting parameter for the user to create accounts within the control panel. E.g. if this is set to 5, the user will not be allowed to create more than 5 mailboxes

action
string
Enum: "newPurchase" "upgradeOrder" "addAccounts" "reduceAccounts" "renewOrder" "supportLedUpgrade" "supportLedExtension" "associatedOrderUpgrade" "associatedOrderRenew" "orderSetup" "downgradeOrder" "upgradeAndAddAccounts" "renewAndAddAccounts" "renewAndUpgrade"

Description for the type of modifications being performed

source
string
Enum: "domain" "standalone" "hosting" "migrated"

The source from which the order is received - Refers to the kind of package provisioned on the partners end. Source field should be either of these values - domain, standalone, hosting, migrated. It will be validated against these values when the Api call is made

sourceContext
string

The purchase hook from where Titan plan has been purchased by the customer
Purpose - This is used by us for reference and analyse the efficacy of various purchase hooks within the partner ecosystem from where customers are purchasing Titan paid plans. Some examples for sourceContext can be "website", "hpanel_store", "cPanel_hosting_email_section", "cPanel_email_tab", "email_marketing", etc.

object

Details of associated partner order

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "orderId": "partner.order.id",
  • "planType": "pro",
  • "paymentTxnId": "qweradsf",
  • "chargedAmount": 1.1,
  • "chargedUSDAmount": 1.1,
  • "discountAmount": 0.1,
  • "taxAmount": 0.1,
  • "billingCycle": "monthly",
  • "expiryDate": "2020-02-20",
  • "currency": "USD",
  • "noOfAccounts": 10,
  • "action": "newPurchase",
  • "source": "domain",
  • "sourceContext": "website",
  • "metadata": {
    }
}

Response samples

Content type
application/json
{
  • "reqID": "string"
}

Suspend Mail Order

API to suspend an existing Mail Order provisioned on Titan Mail Cloud infra on non-payment. On suspension:

  • We will suspend any orders associated with the domain name
Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

suspensionType
required
string

Reason for the suspension (e.g. abuse, expiry, or any custom value). Use expiry for non-renewal suspensions — only expiry suspensions are automatically lifted when the order renews. All other suspension types must be removed manually.

note
string

Any internal description / ticket ID, visible in the parter-panel only to the partners support team. This is so that more info is communicated, and the next agent knows what to do with this case.

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "suspensionType": "abuse",
  • "note": "any internal description just for reference"
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id"
}

Fetch Order Details

API to fetch detailed information about a specific Mail Order on Titan Mail Cloud Infra using the titanOrderId.

This API provides comprehensive details about a mail order including account counts, domain information, and order status.

query Parameters
titanOrderId
required
number
Example: titanOrderId=123

The Titan order ID for which detailed information is required

Responses

Response samples

Content type
application/json
{
  • "titanOrderId": 123,
  • "domainName": "abc.com",
  • "orderId": "12431",
  • "planType": "premium",
  • "noOfAccounts": 10,
  • "noOfBillableAccounts": 10,
  • "noOfActiveAccounts": 6,
  • "noOfProvisionedAccounts": 8,
  • "expiryDate": "2020-01-31",
  • "status": "active",
  • "customerEmailAddress": "titanuser@titan.mail",
  • "serverHostName": "cpanel102.titan.co",
  • "source": "hosting",
  • "titanCustomerId": 456,
  • "customerId": "abc123",
  • "addonSubscriptionCounters": {
    }
}

Fetch Order Suspensions

API to fetch list of active suspensions for a Mail Order on Titan Mail Cloud Infra using the titanOrderId.

query Parameters
titanOrderId
required
number
Example: titanOrderId=1

The Titan order ID for which active suspensions are required

Responses

Response samples

Content type
application/json
{
  • "suspensions": [
    ]
}

Unsuspend Mail Order

API to unsuspend any suspended Mail Order

Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

suspensionType
required
string

Reason for the suspension (e.g. abuse, expiry, or any custom value). Use expiry for non-renewal suspensions — only expiry suspensions are automatically lifted when the order renews. All other suspension types must be removed manually.

note
string

Any internal description / ticket ID, visible in the parter-panel only to the partners support team. This is so that more info is communicated, and the next agent knows what to do with this case.

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "suspensionType": "abuse",
  • "note": "any internal description just for reference"
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id",
  • "newStatus": "active",
  • "remainingSuspensions": [
    ]
}

Delete Mail Order

API to cancel/delete existing Mail Order provisioned on Titan Cloud infra on mail order deletion or non-payment.

  • Any orders associated with the domain name will be deleted
  • All data associated with the mail order will be deleted after 30 days
Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

reason
string

This is just for reference to capture reason for the deletion of the account

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "reason": "user terminated hosting"
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id"
}

Transfer Mail Order

  • Transfer Mail Order from one customer account to another
  • If a titan user profile for the new customerId does not already exist a new profile will be created using information passed or else order will be moved to the existing titan user profile.
  • Customer profile should be in the active state.
  • The order can be in active/suspended/deleted state
  • serverHostName will be only applicable for partners using our cPanel/plesk plugins.
Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

object

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "transferTo": {
    }
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id"
}

Toggle Mail Service

This API is relevant if you are using our cPanel plugin.
Using this api, You can choose to move all domains from Titan cloud to cPanel local (or vice versa) for a particular cPanel account. Calling this api would result in deleting all the existing domain orders within that cPanel account and recreating them with the selected mail service. The action will be applied to all existing domains and all future domains added within the cPanel account. All domains in a cPanel account can either be on local or titan at a given point in time. This will not result in any migration of email accounts, email data or dns; those will need to be handled by you separately.

Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

mailService
required
string
Enum: "titan" "local"

Desired mail service to which customer wants to move

mode
string
Enum: "single_domain" "all_domains"

toggling strategy, default is all_domains

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "mailService": "titan",
  • "mode": "all_domains"
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id"
}

Get All Mail Orders

API to fetch list of all Mail Orders on Titan Mail Cloud Infra for a given customerId or titanCustomerId. Recommended to use titanCustomerId as it uniquely identifies a customer.

NOTE for partners using our cPanel/plesk plugins:

  • If we find multiple customers with same customerId on different cPanel/plesk hosts:
    • The API fails with an INTERNAL_SERVER_ERROR as a unique customer is not found
    • If you instead want us to collate mail orders for given customerId across all your hosts and return in response, do let us know
      • the behaviour can be enabled at our end via a config change
      • once the behaviour is enabled, instead of a failure you will see collated orders
    • For an order, you can differentiate customers details using customerEmailAddress and serverHostName params.
  • customerId, in case of cPanel/plesk, is the username on those servers
  • do make sure of adding any extra filtering required at your end, on host or customer email, before showing list to customers
query Parameters
customerId
required
string
Example: customerId=abc12345

The customer ID stored on your end for each customer This is used to identify all the orders linked to a particular customer

titanCustomerId
number
Example: titanCustomerId=123

(Optional) The customer ID stored on our end

Responses

Response samples

Content type
application/json
{
  • "orders": [
    ]
}

Fetch Addon Products and Pricing

API to fetch list of addon product details for a Mail Order on Titan Mail Cloud Infra

  • At least one of (titanOrderId) or (domainName, customerId) should be present in request
  • If a domain has no currency set, defaultCurrency is used for pricing of products.
  • In case we couldn't determine currency, req fails.
query Parameters
titanOrderId
required
number
Example: titanOrderId=1

The unique Titan order ID against which the domain is provisioned

domainName
string
Example: domainName=xyz.com

[Deprecated] The mail order name associated to the Titan order ID

customerId
string
Example: customerId=abcd123

[Deprecated] unique id stored on your end for each customer

defaultCurrency
string
Example: defaultCurrency=USD

Responses

Response samples

Content type
application/json
{
  • "reqID": "server.req.id",
  • "domainBillingCycle": "monthly",
  • "domainCurrency": "USD",
  • "addons": [
    ]
}

Check Mail Order Availability

API to check a mail order with given domainName is available for provisioning on Titan

Availability behaviour

  • isAvailable: true — the domain is available for the requesting partner to create a mail order.
  • isAvailable: false — the requesting partner already has an order for this domain; its details are returned in the response (titanOrderId, customerDetails, orderDetails).
  • The same domain can have a mail order under multiple partners, but only one of those orders is serviceable at a time; the others are non-serviceable. Even when the domain is already serviceable under a different partner, this API returns true and the partner can still create an order — it is created in a non-serviceable state.
    • Serviceable — all email services are allowed.
    • Non-serviceable — email services are not allowed, but the user can still log in to their account.
  • To make the order serviceable, the user must prove ownership of the domain. Once ownership is verified, an automated status-switch job makes the order serviceable and moves the previously serviceable order to non-serviceable — no manual action is required.
  • We are updating our mail interfaces to guide users on how to prove domain ownership, making this state easier to understand.
query Parameters
domainName
required
string
Example: domainName=domainname.com

name of domain

Responses

Response samples

Content type
application/json
{
  • "isAvailable": true,
  • "titanOrderId": 1,
  • "customerDetails": {
    },
  • "orderDetails": {
    }
}

Check Mail Order Reactivation Eligibility

API to check if deleted Mail Order can be reactivated.

query Parameters
titanOrderId
required
number
Example: titanOrderId=1

The unique Titan order ID against which the domain is provisioned

Responses

Response samples

Content type
application/json
{
  • "reactivationAllowed": true,
  • "reason": "DOMAIN_NOT_IN_DELETED_STATE"
}

Reactivate Mail Order

API to reactivate deleted or pending mail order. This API must be called after Check Mail Order Reactivation Eligibility API

Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id"
}

Complete Purchase

API to confirm payment for complete purchase of a Mail Order on the Titan Mail Cloud infra

API consumers can use Create Mail Order/Modify Mail Order APIs for order provisioning and upgrades/renewals.

This API serves a different (and more deeply integrated) case where partner is handling payments for some purchases user initiated in our Domain Control Panel.

Flow:

  1. User initiates a payment action (adds some addon to cart, increases mailboxes, upgrades plan) on Control Panel.
  2. For payment we redirect user to a payment url partners provide, passing on a trackingId as part of jwt
  3. Partner takes payment from user and triggers this API (Complete Purchase) with the same trackingId
  4. We record the payment and make the purchases associated with that trackingId.
Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

domainName
string

[Deprecated] The mail order name associated to the Titan order ID

customerId
string

[Deprecated] unique id stored on your end for each customer

trackingId
required
string

Payment tracking token fetched from our control panel

currency
string

This is the currency in which the customer is being charged for Titan mail. also updates domain to this currency

chargedAmount
required
number

Total amount charged by the partner to the end customer in the customer's currency for this purchase including taxAmount. Precision upto 2 decimal places.

chargedUSDAmount
number

The value of chargedAmount in USD. If this field is null then open-exchange rates are used to calculate this field

discountAmount
number

Any ad hoc discount given to the customer for this purchase. This should be passed in the original currency in which amount was charged to the customers.

taxAmount
number

Amount collected from the user as TAX amount in the customer's currency for this purchase. Precision upto 2 decimal places.

paymentTxnId
string

Payment Transaction ID in your system.

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "domainName": "xyz.com",
  • "customerId": "abcd123",
  • "trackingId": "qwe-123-asd-321",
  • "currency": "USD",
  • "chargedAmount": 12.2,
  • "chargedUSDAmount": 12.2,
  • "discountAmount": 1.5,
  • "taxAmount": 0.2,
  • "paymentTxnId": "txnId"
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id"
}

DNS Verification

API used to check whether a mail order has been verified with the correct MX/SPF records. Titan checks for MX/SPF verification in following cases:

  • Once order is created, records are checked automatically once on the same day(after few hours) and once on the next day.
  • On accessing Titan Control panel, records are checked automatically to show missing records info to the user. Records are rechecked in case user clicks on 'Check again' option in Titan Control panel.
Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id",
  • "domainExists": true,
  • "nsRecords": [
    ],
  • "spfRecords": [
    ],
  • "mxRecords": [
    ],
  • "mxVerified": true,
  • "spfVerified": true,
  • "lenientSPF": true
}

Generate DKIM Keys

API to generate DKIM keys for a mail order on Titan Mail Cloud infra. If keys already exist return existing Keys.

Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id",
  • "txtRecord": "v=DKIM1; k=rsa; p=qwe123",
  • "selector": "titan"
}

Modify Mail Customer

  • API to modify mail customer emailAddress, name and country.
  • API will change these properties for all mail orders associated with the titanOrderId mail customer.
  • Partner will receive MAIL_CUSTOMER_UPDATED notification whenever any of above 4 properties change

Note:

  • To change mail customer customerId call transferMailOrder API for every mail order associated with this mail customer.
Request Body schema: application/json
required
titanOrderId
required
number
customerName
string

The new customer name

customerEmailAddress
string

The new customer email

customerCountry
string

Should be the 2 letter ISO Code, country from which the customer is accessing partner website/making the purchase. We will use this to identify the localized pricing based on the location of the customer in cases where Titan mail is managing the billing.

newCustomerId
string

The new customer Id.

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "customerName": "Adam",
  • "customerEmailAddress": "adma1231@gmail.com",
  • "customerCountry": "US",
  • "newCustomerId": "toBeUpdatedCustomerId"
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id"
}

Mail Customer APIs

Sync Mail Customer API

API to sync domains associated with mail customer on cpanel/plesk server.

query Parameters
username
required
string
Example: username=abcd123

customer cpanel/plesk username

serverHostname
required
string
Example: serverHostname=server101.com

server hostname

Responses

Response samples

Content type
application/json
{
  • "reqID": "server.req.id"
}

Catch-all Management APIs

Set Catch-all Configuration

API to activate catch all account for a Mail Order on Titan Mail Cloud infra

Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

email
required
string

Specify the email account associated with the mail order that needs to be set to the catch all emails.

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "email": "info@xyz.com"
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id"
}

Remove Catch-all Configuration

API to remove catch all email account for a Mail Order on Titan Mail Cloud infra

Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id"
}

Get Catch-all Configuration

API to fetch catch all config for a Mail Order on Titan Mail Cloud infra

Note: In case catchall is not activated, the default behaviour is to reject all emails for unknown email addresses

query Parameters
titanOrderId
required
number
Example: titanOrderId=1

The unique Titan order ID

Responses

Response samples

Content type
application/json
{
  • "reqID": "server.req.id",
  • "email": "abc@flock.com"
}

Redirection between Partner and Titan

All Redirection between Partner website to Titanmail control panel and from Titanmail control panel to Partner website will contain JWT signature for authentication and authorization of data exchanged. Note - For further information on JSON Web Tokens (JWT) - Click here

Titan mail will provide you one shared API Key which will be used for all API authentication and Hash computation.

    Header
    {
    "typ": "JWT",
    "alg": "HS256"
    }

Currently Titanmail supports only the HS256 algorithm.

Construct JWT_TOKEN using the above header and payload specific to each redirect request.

Autologin Titan user into webmail

To auto login the Titan user into webmail, redirect to Titan webmail with these query params:

  • webmailAutoLoginToken as slt (You will receive this token in the response whenever you create an email account)
  • created email as email_account
  • true as clearSession (This is optional. Add parameter in case the expectation is to log out any existing logged in accounts on webmail)

Example: https://app.titan.email/?slt=1:nkLjBJX9Uqgy&email_account=james@xyz.com

Note: webmailAutoLoginToken is a short lived token which is meant to be used immediately in the flow after creating an email account. This token should not be persisted and can't be used later to auto login into webmail.

Autologin Titan admin into Titan control panel

When your user wants to login to the control panel redirect him/her to Titan Mail control panel URL with short term validity AuthToken.

https://manage.titan.email/partner/autoLogin?partnerId=<PARTNER_ID>&jwt=<JWT_TOKEN>&section=<section>&action=<action>&email=<email>&locale=<supported-Titan-language>

Parameters

  • partnerId (string, required)
  • jwt (string, required)
    • Jwt Request Body
          {
          "titanOrderId": 123,
          "exp": 345678974327
          }
      
    • titanOrderId (number, required)
      • The unique Titan order ID against which the domain is provisioned
    • exp (number, required)
  • section (string, optional)
    • Control panel Section to open, Specify the section within the control panel to be loaded
      • home (default)
      • email-accounts
      • internal-forward
      • catch-all-email
      • device-download
      • configure-desktop
      • domain-verification
      • import-email
      • billing-and-upgrade
      • buy-email-account
  • action (string, optional)
    • launch-email-creation used with email-accounts section
    • paymentSuccess used with billing-and-upgrade section
  • email (string, optional)
    • required with launch-email-creation action
  • locale (string, optional)
    • Specifies the language to be set within the Email Control Panel. List of support Titan languages - link Default is en-us
query Parameters
partnerId
required
string
Example: partnerId=PARTNER_ID
jwt
required
string
Example: jwt=JWT_TOKEN
section
string
Enum: "home" "email-accounts" "internal-forward" "catch-all-email" "device-download" "configure-desktop" "domain-verification" "import-email" "billing-and-upgrade" "buy-email-account"
Example: section=home

Control panel Section to open, Specify the section within the control panel to be loaded

action
string
Example: action=launch-email-creation
email
string
Example: email=james@xyz.com
locale
string
Example: locale=en-us

Specifies the language to be set within the Email Control Panel. List of support Titan languages - link Default is en-us

Responses

Embedding Titan iframe control panel within Partner environment

iFrame Source URL : https://manage.titan.email/partner/cpWidget?partnerId=<PARTNER_ID>&jwt=<JWT_TOKEN>&section=<section>&action=<action>&email=<email>&locale=<supported-Titan-language>&theme=<registered-theme-name>

  • Pass attribute allow="clipboard-write" in iframe tag to allow copy functionality in embedded control panel e.g <iframe src=${iframe_url} allow="clipboard-write" />.

Read the Titan control panel events that you can listen to, to create a richer experience with our iframe and the partner environment.

Parameters

  • partnerId (string, required)
  • jwt (string, required)
    • Jwt Request Body
          {
          "titanOrderId": 123,
          "exp": 345678974327
          }
      
    • titanOrderId (number, required)
      • The unique Titan order ID against which the domain is provisioned
    • exp (number, required)
  • section (string, optional)
    • Control panel Section to open, Specify the section within the control panel to be loaded
      • home (default)
      • email-accounts
      • internal-forward
      • catch-all-email
      • device-download
      • configure-desktop
      • domain-verification
      • import-email
      • billing-and-upgrade
      • buy-email-account
      • billing-and-subscription
  • action (string, optional)
    • launch-email-creation used with email-accounts section
    • paymentSuccess used with billing-and-upgrade section
    • reactivate-subscription used with billing-and-subscription section
  • email (string, optional)
    • required with launch-email-creation action
  • locale (string, optional)
    • Specifies the language to be set within the Email Control Panel. List of support Titan languages - link Default is en-us
  • theme (string, optional)
    • Specifies the theme to be loaded in iframe for a partner.
    • The value needs to be registered first with Titan alongwith theme related customizations.
    • If value is not registered or not specified, default theme for partner is rendered in embedded iframe.
query Parameters
partnerId
required
string
Example: partnerId=PARTNER_ID
jwt
required
string
Example: jwt=JWT_TOKEN
section
string
Enum: "home" "email-accounts" "internal-forward" "catch-all-email" "device-download" "configure-desktop" "domain-verification" "import-email" "billing-and-upgrade" "buy-email-account" "billing-and-subscription"
Example: section=home

Control panel Section to open, Specify the section within the control panel to be loaded

action
string
Example: action=launch-email-creation
email
string
Example: email=james@xyz.com
locale
string
Example: locale=en-us

Specifies the language to be set within the Email Control Panel. List of support Titan languages - link Default is en-us

theme
string
Example: theme=partner-theme

Specifies the theme to be loaded in iframe for a partner. The value needs to be registered first with Titan alongwith theme related customizations. If value is not registered or not specified, default theme for partner is rendered in embedded iframe.

Responses

Redirection from Titan control panel to Partner payment page

When the user selects to upgrade or buy more email accounts we will redirect the user to your payment page to complete the purchase process and do the payment. <partner-payment-url>/upgrade?jwt=<JWT_TOKEN>

<partner-payment-url> is configurable, also can be decorated with domain_name, order_id, locale.

e.g : <payment-url>/{domain_name}

Parameters

  • jwt (string, required)
    • Jwt Request Body
          {
          "titanOrderId": 21312,
          "domainName": "domain.name",
          "customerId": "anson123",
          "planType": "premium",
          "noOfAccounts": 10,
          "expiryDate": "2021-05-21",
          "action":"upgradePlan",
          "trackingId": "tracking-id",
          "currency": "USD",
          "chargeAmount": 3.14
          }
      
    • titanOrderId (number, required)
      • The unique Titan order ID against which the domain is provisioned
    • domainName (string, required)
      • Customer Domain being provisioned
    • customerId (string, required)
      • The customer ID stored on your end for each customer
    • planType (string, required)
      • Current Titan plan type configured for the customer
    • noOfAccounts (number, required)
      • The current number of accounts or mailboxes configured for the customer
    • expiryDate (string, required)
      • Date on which the package is set to expire in YYYY-MM-DD
    • action (string, required)
      • Relevant action taken by the customer
        • upgradePlan
        • buyMoreAccounts
        • renewOrder
        • billing
      • This is used to signal the relevant billing option selected by the customer in the Titan control panel. Accordingly, billing and upgrade options should be shown to customers on the partner payment page
    • trackingId (string, optional)
    • currency (string, optional)
      • This is currency used for calculations.
      • Experimental, see Complete Purchase API. Discuss with Titan team before using it.
    • chargeAmount (number, optional)
      • This is amount to be charged.
      • Experimental, see Complete Purchase API. Discuss with Titan team before using it.
query Parameters
jwt
required
string
Example: jwt=JWT_TOKEN

Responses

Autologin Titan user into webmail

To auto login the Titan user into webmail, redirect to Titan webmail with these query params:

  • webmailAutoLoginToken as slt (You will receive this token in the response whenever you create an email account)
  • created email as email_account
  • true as clearSession (This is optional. Add parameter in case the expectation is to log out any existing logged in accounts on webmail)

Example: https://app.titan.email/?slt=1:nkLjBJX9Uqgy&email_account=james@xyz.com

Note: webmailAutoLoginToken is a short lived token which is meant to be used immediately in the flow after creating an email account. This token should not be persisted and can't be used later to auto login into webmail.

query Parameters
slt
required
string
Example: slt=1:nkLjBJX9Uqgy

webmailAutoLoginToken received in the response when you create an email account

email_account
required
string
Example: email_account=james@xyz.com

The created email account

clearSession
string
Example: clearSession=true

Add parameter in case the expectation is to log out any existing logged in accounts on webmail

Responses

Titan Event Notification

These are the webhooks configured for event notification between from the Titan cloud infrastructure to the partner.

There will be webhooks provided to the Partner for notifications of changes occurring on Titan's end. All event notification calls will be made until a confirmation of success is received (HTTP 200). In case of failure, we will reattempt to push a notification once every minute until we receive a confirmation of success. A unique event ID will be passed against each event as a unique identifier in order to prevent duplication. In order to ensure that the events are passed securely, the following measures will be put in place -

  • The Partner Key will be sent in the Authorization header of all the requests.
  • Source IPs will be shared with the Partner during deployment

Note - The following IPs will need to be whitelisted by the partner - 3.92.40.244, 34.197.244.225, 52.7.187.26 & 3.64.226.220.

Titan will notify partners on various life cycle events of a Mail Order or an Email Account.

On Mail Order creation at Titan

Note:

  • noOfAccounts represents the total number of accounts a user has purchased.
  • customerName, customerEmailAddress, customerCountry, billingCycle are optional fields

    {
        "id": "<unique event id>",
        "event": "MAIL_ORDER_CREATED",
        "data":{
            "titanOrderId": "<Titan Mail generated unique ID>",
            "domainName": "domain name",
            "customerId": "Unique customer Id on your side for this customer",
            "customerName": "customer name",
            "customerEmailAddress": "customer email address",
            "customerCountry": "< 2 letter ISO CODE, e.g. US>",
            "planType": "<plan-name>",
            "expiryDate": "<utc-expiry-date.format-yyyy-MM-dd>",
            "storageLimit": "<integer-limit-in-mb>",
            "noOfAccounts": "<integer-number-of-accounts-in-plan>",
            "billingCycle": "monthly",
            "status": "active|pending",
            "metadata": {
              "cpanelHostName": "<cPanel hostname where this hosting order provisioned>",
              "cpanelUserName": "<cPanel username associated with this account>"
            }
        }
    }

On Mail Order status update at Titan

Note :

  • type - type of the suspension like abuse, expiry, employee left
  • If a domain is suspended with some suspension type then it can only be unblocked by that type only.
  • suspenderRole - The entity that suspended the email account. It can have following values
    • titan
    • titanSupport
    • partner
    • partnerSupport
    • domainAdmin - The email account admin that is part of only this domain
    • accountAdmin - The Person that get the domain provisioned in the Titan
    • account - the email account holder person
  • suspenderRole have precedence in following order
    • (titan , titanSupport) > (partner, partnerSupport) > (domainAdmin, accountAdmin) > account
  • The higher precedence member can remove the lower precedence member suspension
  • suspendedOn - suspension date in YYYY-MM-DD format
    {
        "id": "<unique event id>",
        "event": "MAIL_ORDER_STATUS_UPDATED",
        "data": {
          "titanOrderId": "<Titan Mail generated unique ID>",
          "domainName": "domain name",
          "customerId": "Unique customer Id on your side for this customer",
          "oldStatus": "active | pending | suspended | deleted",
          "newStatus": "active | suspended | deleted",
          "suspensions": [
            {
                "type": "abuse",
                "suspenderRole": "titanSupport",
                "suspendedOn": "2021-01-13"
            }
          ]
        }
    }

On Mail Order data purge at Titan

Note :

  • This event will be fired once the mail-order data has been purged. This happens 30 days post the deletion event.
  • This notification signifies that order data has been permanently deleted and cannot be re-activated.
    {
        "id": "<unique event id>",
        "event": "MAIL_ORDER_PURGED",
        "data": {
          "titanOrderId": "<Titan Mail generated unique ID>",
          "domainName": "domain name",
          "customerId": "Unique customer Id on your side for this customer",
        }
    }

On Mail Order Upgrade/Renew at Titan

Note :

  • Any other events can be added as per Partners requirements.
  • These events are only send when the billing is managed by Titan for the domain
    {
        "id": "<unique event id>",
        "event": "< PLAN_UPGRADED | ACCOUNTS_PURCHASED | PLAN_RENEWED > "
        "data": {
            "titanOrderId": 1,
            "domainName": "example.com",
            "customerId": "abc",
            "configBeforeUpdate": {
              "planType": "<plan-name>",
              "expiryDate": "<utc-expiry-date.format-yyyy-MM-dd>",
              "storageLimitInMB": "<integer-limit-in-mb>",
              "noOfAccounts": "<integer-number-of-accounts-in-plan>",
              "billingCycle": "monthly"
            },
            "configAfterUpdate": {
              "planType": "<plan-name>",
              "expiryDate": "<utc-expiry-date.format-yyyy-MM-dd>",
              "storageLimitInMB": "<integer-limit-in-mb>",
              "noOfAccounts": "<integer-number-of-accounts-in-plan>",
              "billingCycle": "monthly"
            },
            "paymentDetails": {
              "amount": 10.5,
              "currency": "USD"
            }
    }

On Mail Order Transfer at Titan

    {
        "id": "<unique-event-id>",
        "event": "MAIL_ORDER_TRANSFERRED",
        "data": {
            "titanOrderId": "<Titan Mail generated unique ID>",
            "domainName": "domain name",
            "customerId": "Unique customer Id on your side for this customer -- new owner of domain",
            "customerBeforeTransfer": {
                "customerId": "Unique customer Id on your side for this customer",
                "customerName": "customer name",
                "customerEmailAddress": "Email Address of customer",
                "customerCountry": "US"
            },
            "customerAfterTransfer": {
                "customerId": "Unique customer Id on your side for this customer",
                "customerName": "customer name",
                "customerEmailAddress": "Email Address of customer",
                "customerCountry": "IN"
            }
        }
    }

On Mail Order Setup Completed at Titan

This is triggered when domain setup has completed.

    {
        "id": "<unique-event-id>",
        "event": "MAIL_ORDER_SETUP_COMPLETED",
        "data": {
            "titanOrderId": "<newly created Titan Mail generated unique ID>",
            "domainName": "domain name",
            "customerId": "Unique customer Id on your side for this customer",
            "customerName": "customer name",
            "customerEmailAddress": "customer email address",
            "mailService" : "<titan/local>",
            "metadata": {
            "cpanelHostName": "<cPanel hostname where this hosting order provisioned>",
            "cpanelUserName": "<cPanel username associated with this account>"
            }
        }
    }

On Mail Customer Update at Titan

This is triggered when mail customer customerEmail, name or country is updated.

    {
        "id": "<unique-event-id>",
        "event": "MAIL_CUSTOMER_UPDATED",
        "data": {
            "customerId": "Unique customer Id on your side for this customer",
            "customerBeforeUpdate": {
                "customerName": "customer name",
                "customerEmailAddress": "Email Address of customer",
                "customerCountry": "US"
            },
            "customerAfterUpdate": {
                "customerName": "New customer name",
                "customerEmailAddress": "New Email Address of customer",
                "customerCountry": "IN"
            }
        }
    }

On Email Account creation or modification at Titan

Note :

  • name, alternateEmailAddress are optional fields
    {
        "id": "<unique event id>",
        "event": "EMAIL_ACCOUNT_CREATED | EMAIL_ACCOUNT_MODIFIED",
        "data": {
            "titanOrderId": "<Titan Mail generated unique ID>",
            "domainName": "domain name",
            "customerId": "Unique customer Id on your side for this customer",
            "email": "<email-address-created>",
            "name": "Name of the user",
            "alternateEmailAddress": "Alternate Email for password reset mails",
            "isAdmin": "true/false",
            "aliases": "list of aliases of email account"
        }
    }

On Email Account status update at Titan

Note :

  • type - type of the suspension like abuse, expiry, employee left
  • If an account is suspended with some custom suspension type then it can only be unblocked by that type only.
  • suspenderRole - The entity that suspended the email account. It can have following values
    • titan
    • titanSupport
    • partner
    • partnerSupport
    • domainAdmin - The email account admin that is part of only this domain
    • accountAdmin - The Person that get the domain provisioned in the Titan
    • account - the email account holder person
  • suspenderRole have precedence in following order
    • (titan , titanSupport) > (partner, partnerSupport) > (domainAdmin, accountAdmin) > account
  • The higher precedence member can remove the lower precedence member suspension
  • suspendedOn - suspension date in YYYY-MM-DD format
    {
        "id": "<unique event id>",
        "event": "EMAIL_ACCOUNT_STATUS_UPDATED",
        "data": {
            "titanOrderId": "<Titan Mail generated unique ID>",
            "domainName": "domain name",
            "customerId": "Unique customer Id on your side for this customer",
            "email": "abc@xyz.com",
            "oldStatus": "active | suspended | deleted",
            "newStatus": "active | suspended | deleted",
            "suspensions": [
              {
                  "type":"abuse",
                  "suspenderRole":"titanSupport",
                  "suspendedOn":"2021-01-13"
              }
            ]
        }
    }

On Email Account data purge at Titan

Note :

  • This event will be fired once the email-account data has been purged. This happens 30 days post the deletion event.
  • This notification signifies that email-account data has been permanently deleted and this email-account cannot be re-activated.
    {
        "id": "<unique event id>",
        "event": "EMAIL_ACCOUNT_PURGED",
        "data": {
            "titanOrderId": "<Titan Mail generated unique ID>",
            "domainName": "domain name",
            "customerId": "Unique customer Id on your side for this customer",
            "email": "abc@xyz.com",
        }
    }

On Internal Forwarding Account creation at Titan

Note :

  • recipients is optional fields
    {
        "id": "<unique event id>",
        "event": "INTERNAL_FORWARDING_ACCOUNT_CREATED | INTERNAL_FORWARDING_ACCOUNT_MODIFIED",
        "data": {
            "titanOrderId": "<Titan Mail generated unique ID>",
            "domainName": "domain name",
            "customerId": "Unique customer Id on your side for this customer",
            "email": "<email-address-created>",
            "recipients": [
              "email1@xyz.com",
              "email2@xyz.com"
            ]
        }
    }

On Internal Forwarding Account deletion at Titan

    {
        "id": "<unique event id>",
        "event": "INTERNAL_FORWARDING_ACCOUNT_DELETED",
        "data": {
            "titanOrderId": "<Titan Mail generated unique ID>",
            "domainName": "domain name",
            "customerId": "Unique customer Id on your side for this customer",
            "email": "<email-address-deleted>"
        }
    }

Titan Control Panel iframe events

To consume the events posted to the container website via window.postMessage() from the embedded Titan Control Panel.

Message structure in titan control panel

  • Parameters Description:
    • event (string, required)
    • data (object, optional)
  • Sample format:
    {
      "event": "<EVENT_NAME>",
      "data": "<DATA_TO_BE_SENT>"
    }
    

Events Handling in partner panel

Use addEventListener() method to set up a function to be called whenever a message is posted from the iframe to the partner panel.

window.addEventListener("message", (event) => {
    if(event.data.event) {
      //Do needful action here//
    }
}, false);

Events list

These are the standard events sent from Iframe Titan control panel to partner panel.

PAGE_DID_LOAD

  • Usage

    Container websites can show some view or take some action based on the page currently loaded in the iframe. For eg. By listening to the content of the page, you can save events of which pages within the Titan CP your customers visit. Or you could choose to show a dynamic FAQ section that has FAQ's relevant to the page the user is on.

  • Trigger

    Event posted whenever a page is displayed to the user. All pages have been set up to communicate with the parent window via postMessage API.

  • Example:

    {
      "event": "PAGE_DID_LOAD",
      "data": {
          "pageName": "<PAGE_NAME>" /* Current path name */
      }
    }
    

PAYMENT_ACTION

  • Usage

    Container websites may choose to redirect the user to the payment URLs in the same tab instead of default behaviour of opening new tabs with payment URLs.

  • Trigger

    Event posted whenever a user takes action related to payments eg: upgrading plan, buying more accounts, renew etc.

  • Example:

    {
      "event": "PAYMENT_ACTION",
      "data": {
         "action":"upgradePlan|buyMoreAccounts|renewOrder|billing",
         "titanOrderId": "<Titan Mail generated unique ID>",
         "domainName": "example.com",
         "customerId": "<customerID>",
         "planType": "free|pro|premium",
         "noOfAccounts": "<Total no of current accounts>",
         "expiryDate": "<utc-expiry-date.format-yyyy-MM-dd>"
      }
    }
    
  • Parameters Description

    Parameters Description Purpose of the parameter Data Type
    action Relevant action taken by the customer This is used to signal the relevant billing option selected by the customer in the Titan control panel. Accordingly, billing and upgrade options should be shown to customers on the partner payment page Enum
    titanOrderId The unique Titan order ID against which the domain is provisioned The titanOrderId is used to identify the order being referenced Enum
    domainName Customer Domain being provisioned The order provisioned in Titanmail is against the domainName provided by the partner within the API Alphanumeric - upto 64 characters
    customerId The customer ID stored on your end for each customer This is used to identify all the orders linked to a particular customer Alphanumeric - upto 64 characters
    planType Current Titan plan type configured for the customer This is used to identify the existing Titan plan for the customer and show relevant upgrade options to the customer on Partner end Enum
    noOfAccounts The current number of accounts or mailboxes configured for the customer This can be used by Partner to identify the current number of email accounts for the customer and allow the customer to upgrade the accounts accordingly Integer
    expiryDate Date on which the existing package is set to expire We assign the expiry date in our systems based on this parameter YYYY-MM-DD

CONTENT_DIMENSION_DID_UPDATE

  • Usage

    Container websites may show content outside iframe and adjust iframe dimensions to align iframe and other views properly. For eg. To render some content just below the iframe, within the container website control panel. (an FAQ box, an NPS survey, a promotion banner etc)

  • Trigger

    Event posted whenever the control panel content's height or width is updated by new content.

  • Example:

    {
        "event": "CONTENT_DIMENSION_DID_UPDATE",
        "data": {
            "height": <val>,
            "width": <val>,
        }
    }
    
  • Parameters Description:

    • height : maximum height of current content inside control panel
    • width: current width of control panel iframe
  • Note

    However if the user changes the control panel dimension from outside interaction, such as dragging the width of the iframe to increase / decrease (if any such option is given by partners), then the partner panel window, first need to send postMessage Info to iframe with the below sample format:

    Sample format:

    // Trigger when iframe's width is changed by user externally //
    iframeElement.contentWindow.postMessage({
        event: "IFRAME_WIDTH_DID_UPDATE",
        iframeWindowWidth: 80 + "vw" // Sample width after change
        }, '*');
        iframeElement.style.width =
        new_iframe_width // set new iframe width here
    })
    

    After listening to the IFRAME_WIDTH_DID_UPDATE event, the iframe window will trigger the event CONTENT_DIMENSION_DID_UPDATE with the format specified above.

LOADER_DID_APPEAR

  • Usage

    Container websites may choose to hide content outside the iframe while the iframe page loads. For eg. the FAQ box outside the iframe can be hidden while the user is navigating between pages within the iframe.

  • Trigger

    Event posted whenever new content fetching in the control panel is in progress, a loader is shown. If the partner panel wants to listen/show some UI only when the iframe is fully loaded, they can use this event to disable the interactions till the page is loaded. Partner can rely on other events 'PAGE_DID_LOAD' or 'CONTENT_DIMENSION_DID_UPDATE' to take action when the loader is hidden.

  • Example:

    window.addEventListener("message", (event) =>
        {
            const eventName = event.data.event;
            if (eventName === LOADER_DID_APPEAR) {
            //here partner panel can decide to hide some sections until iframe is fully loaded e.g not showing FAQ section
        })
    

EMAIL_ACCOUNTS_CHANGED

  • Usage

    The container websites might need to dynamically update the number of purchased/active email accounts. They can do so by adding a listener to this event.

    Format of the event:

    {
        "event": "EMAIL_ACCOUNTS_CHANGED",
        "data": {
            "active": <val>,
            "purchased": <val>,
            "limit": <val>
        }
    }
    

    Example Usage:

    window.addEventListener('message', function(event) {
        const eventData = event.data;
        const eventName = eventData.event;
        if (eventName === "EMAIL_ACCOUNTS_CHANGED") {
            const mailboxData = eventData.data;
            console.log("The number of active email accounts in use are: ", mailboxData.active);
            console.log("The number of total purchased email accounts are: ", mailboxData.purchased);
            console.log("The number of limit to email accounts are: ", mailboxData.limit);
        }
    });
    
  • Trigger

    Whenever there is a change in the number of purchased/active mailboxes, we make an API call from our Frontend. If we detect any changes in the number of accounts, active or purchased, we will send this event as a postMessage.

Additional Notification APIs

Notification APIs should be used post discussion. This is a reference document as to how notifications can be used by a partner. This can be decided upon if there is utility for these notifications

  • Note :
    • HOSTING_PURCHASED
      • This Event notifies Titan that a hosting plan has been purchased at partner's end and the user is eligible for a Titan plan. This information helps in tracking the signup (attach) rates.
    • REFUND_ISSUED
      • This Event notifies Titan that a refund has been issued from partner to the customer.
      • Event can be called for active/suspended/deleted mail order.
      • If API is called multiple times with same paymentTxnId and different data (orderId, domainName, customerId, refundAmount refundTaxAmount, refundUSDAmount and currency), partner will get BAD_REQUEST exception else no action is taken.
    • MAIL_ORDER_SETUP_COMPLETED
      • On this API notification we will mark order's setup as completed and stop showing relevant upgrade/purchase hooks
    • MAIL_ORDER_PURCHASED
      • This Event notifies Titan that mail order is purchased and contains details related to transaction.
      • This Event is only used for reference and reporting on our end.
    • PAYMENT_DATA_BULK
      • This Event notifies Titan of the customer's purchase of standalone email order / additional mailbox purchases / Titan order upgrades / Titan order renewals.
      • Max batch size of the event is 100 orders
    • REFUND_ISSUED_BULK
      • This Event notifies Titan that a refund has been issued from partner to the customer in bulk.
      • Max batch size of the event is 100 orders.
    • CREDIT_ISSUED
      • This Event notifies Titan that a credit has been issued from partner to the customer.
    • MAIL_ORDER_PURCHASE_CANCELED
      • This Event notifies Titan that mail order is canceled.
      • Send this event when user has purchased standalone email plan, does not setup the email during plan duration and doesn't renew on plan expiry.
    • MODIFY_MAIL_ORDER_DETAILS
      • This Event notifies Titan that mail order details has been modified.
Request Body schema: application/json
required
One of
event
required
string

event name

data
required
object

event data in json

Responses

Request samples

Content type
application/json
Example
{
  • "event": "DOMAIN_CREATED",
  • "data": { }
}

Response samples

Content type
application/json
{
  • "reqID": "string"
}

Email Account Management APIs

Create Email Account

API to create an email account for a Mail Order on the Titan Mail Cloud infra

Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

orderId
string

The order ID stored on your end for this mail order, if any. If needed, You can use this data to correlate orders at your end and in Titan.The data is returned in listMailOrders call.

email
required
string

Email account to be created within Titanmail.

name
string

The name of the customer for whom the email address is being created. This is used if firstName and lastName are not provided.

firstName
string

The first name of the customer for whom the email address is being created.

lastName
string

The last name of the customer for whom the email address is being created.

alternateEmailAddress
string

Alternate email address on which the customer can be contacted

password
string

Password to be set for the email account entered by end customer on partner website

requireAutoLoginToken
boolean

Partner specifies whether they need an auto login token.

isAdmin
boolean

Specifies whether or not the user is an admin

sendWelcomeEmail
boolean

Specifies whether or not to send email to customer for this newly created email-account. Default value of this flag is false

locale
string
source
string

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "orderId": "partner.order.id",
  • "email": "james@xyz.com",
  • "name": "James Bond",
  • "firstName": "James",
  • "lastName": "Bond",
  • "alternateEmailAddress": "james@gmail.com",
  • "password": "qwe123",
  • "requireAutoLoginToken": true,
  • "isAdmin": true,
  • "sendWelcomeEmail": true,
  • "locale": "en-gb",
  • "source": "standalone"
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id",
  • "titanAccountId": 1,
  • "webmailAutoLoginToken": "adfadfweqwe"
}

Modify Email Account API

API to modify email account attributes on Titan Mail Cloud infra

Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

titanAccountId
number

unique account id at our end.

email
required
string

Email account which needs to be modified

name
string

The name of the customer only if there is a change in the name.

firstName
string

The first name of the customer for whom the email address is being created.

lastName
string

The last name of the customer for whom the email address is being created.

alternateEmailAddress
string

New alternate email address on which the customer can be contacted

password
string

New password that needs to be setup against the account

isAdmin
boolean

Specifies whether or not the user is an admin

purgeAt
string

In yyyy-MM-dd format. All the account data would be purged from our system permanently on this date. Account is expected to be in the deleted state and not already purged. Domain should be active state. Must be set to a date from today up to a maximum of 30 days in the future. titanAccountId mandatorily to be passed while updating purgeAt. purgeAt date can only be increased for the account.

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "titanAccountId": 123,
  • "email": "info@xyz.com",
  • "name": "Rose",
  • "firstName": "James",
  • "lastName": "Bond",
  • "alternateEmailAddress": "rose@gmail.com",
  • "password": "qwe123",
  • "isAdmin": true,
  • "purgeAt": "2020-02-20"
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id"
}

Suspend Email Account

API to suspend existing email account provisioned on Titan Mail Cloud infra on non payment. On suspension

Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

titanAccountId
required
number

The unique mail account ID against each email provisioned with Titan

email
required
string

The email account within the mail order to be suspended.

suspensionType
string

Reason for the suspension (e.g. abuse, expiry, or any custom value). Use expiry for non-renewal suspensions — only expiry suspensions are automatically lifted when the account renews. All other suspension types must be removed manually.

note
string

Any internal description / ticket ID, visible in the parter-panel only to the partners support team. This is so that more info is communicated, and the next agent knows what to do with this case.

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "titanAccountId": 1,
  • "email": "info@xyz.com",
  • "suspensionType": "abuse",
  • "note": "some reason"
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id"
}

Unsuspend Email Account

API to unsuspend any suspended Email Account

Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

titanAccountId
required
number

The unique mail account ID against each email provisioned with Titan

email
required
string

The email account within the mail order to be unsuspended.

suspensionType
string

Reason for the suspension (e.g. abuse, expiry, or any custom value). Use expiry for non-renewal suspensions — only expiry suspensions are automatically lifted when the account renews. All other suspension types must be removed manually.

note
string

Any internal description / ticket ID, visible in the parter-panel only to the partners support team. This is so that more info is communicated, and the next agent knows what to do with this case.

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "titanAccountId": 1,
  • "email": "info@xyz.com",
  • "suspensionType": "abuse",
  • "note": "some reason"
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id",
  • "newStatus": "active"
}

Delete Email Account

API to delete existing email account provisioned on Titan Mail Cloud infra on account deletion.

  • We will delete any data associated with that email account post 30 days of deletion, the account can't be reactivated again after 30 days.
Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

titanAccountId
required
number

The unique mail account ID against each email provisioned with Titan

email
required
string

The email account within the mail order to be deleted.

reason
string

This field is stored as a reference with the reason for deletion of the email account

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "titanAccountId": 1,
  • "email": "info@xyz.com",
  • "reason": "requested by user"
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id"
}

Change Email Account password

API to generate reset password link for an account and send it to the given recipient email address.

Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

email
required
string

The email account within the mail order for which the password needs to be reset

recipient
required
string

The email ID to which user want to send change password link email for given email account

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "email": "info@xyz.com",
  • "recipient": "james@xyz.com"
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id"
}

Get All Email Accounts

API to fetch list of email accounts for a Mail Order on Titan Mail Cloud Infra

query Parameters
titanOrderId
required
number
Example: titanOrderId=1

The unique Titan order ID against which the domain is provisioned

includeDeletedAccounts
boolean
Example: includeDeletedAccounts=true

If deleted accounts needs to be included. False by default.

domainName
string
Example: domainName=xyz.com

[Deprecated] The mail order name associated to the Titan order ID

customerId
string
Example: customerId=abcd123

[Deprecated] unique id stored on your end for each customer

Responses

Response samples

Content type
application/json
{
  • "reqID": "server.req.id",
  • "accounts": [
    ]
}

Fetch Email Account Info

API to fetch information about an email account on Titan Mail Cloud infra.

query Parameters
titanOrderId
number
Example: titanOrderId=1

The unique order ID against each domain provisioned with Titan

titanAccountId
number
Example: titanAccountId=1

The unique mail account ID against each email provisioned with Titan.

email
string
Example: email=info@xyz.com

Specify the email account for which the information is required.

Responses

Response samples

Content type
application/json
{
  • "name": "Info",
  • "firstName": "James",
  • "lastName": "Bond",
  • "titanOrderId": 1,
  • "alternateEmailAddress": "james@xyz.com",
  • "status": "active",
  • "storageUsed": 1234,
  • "storageLimit": 5000,
  • "isAdmin": true,
  • "aliases": [
    ],
  • "purgeAt": "2024-02-20"
}

Add Email Alias

API to add an email alias for an email account on Titan Mail Cloud infrastructure

Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

email
required
string

Specify the email account for which the email alias needs to be created.

alias
required
string

The email alias that has to be added for the email account provided

displayName
string

Display name to be shown in the interface for the email alias

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "email": "sales@xyz.com",
  • "alias": "carsales@xyz.com",
  • "displayName": "carSales"
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id"
}

Remove Email Alias

API to remove existing email alias for an email account on Titan Mail Cloud infra

Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

email
required
string

Specify the email account for which the email alias needs to be removed.

aliases
required
Array of strings

The email aliases that has to be removed for the email address provided

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "email": "sales@xyz.com",
  • "aliases": [
    ]
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id"
}

List Email Alias

API to fetch information about an email account's alias on Titan Mail Cloud infra.

query Parameters
titanOrderId
required
number
Example: titanOrderId=1

The unique order ID against each domain provisioned with Titan

email
required
string
Example: email=sales@xyz.com

Specify the email account for which the email alias needs to be fetched.

Responses

Response samples

Content type
application/json
{
  • "reqID": "server.req.id",
  • "email": "sales@xyz.com",
  • "aliases": [
    ]
}

Check Email Account Availability API

API to check if an email account is available for provision

query Parameters
email
required
string
Example: email=john@doe.com

email account for which you want to check availability

titanOrderId
required
number
Example: titanOrderId=123

Responses

Response samples

Content type
application/json
{
  • "isAvailable": true,
  • "titanAccountId": 1,
  • "reason": "EXISTS_AS_EMAIL_ACCOUNT"
}

Check Email Account Reactivation Eligibility

API to check if deleted Email Account can be reactivated.

query Parameters
titanOrderId
required
number
Example: titanOrderId=1

The unique Titan order Id

titanAccountId
required
number
Example: titanAccountId=123

The unique Titan account Id

Responses

Response samples

Content type
application/json
{
  • "reactivationAllowed": true,
  • "purgeAt": "2025-02-20",
  • "reason": "ANOTHER_ACCOUNT_ALREADY_EXISTS"
}

Reactivate Email Account

API to reactivate deleted email account. This API must be called after Check Email Account Reactivation Eligibility API

Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

titanAccountId
required
number

The unique mail account ID against each email provisioned with Titan

reason
string

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "titanAccountId": 1,
  • "reason": "reason for reactivation"
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id"
}

Clear Email Sessions

API to clear all email account sessions. Every account and order associated should be in non deleted state. Max 100 accounts sessions can be cleared at once.

Request Body schema: application/json
required
titanOrderId
required
number

The unique Titan order ID against which the domain is provisioned

titanAccountIds
required
Array of numbers

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "titanAccountIds": [
    ]
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id"
}

Create Legal Export Dump

API to trigger legal export for emails, contacts, and calendars for a given Titan account ID.

Request Body schema: application/json
required
titanOrderId
required
number

The unique Titan order ID

titanAccountId
required
number

The Titan account ID for which the legal export is to be triggered.

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "titanAccountId": 12345
}

Response samples

Content type
application/json
{
  • "jobId": "job-12345"
}

Fetch Legal Export Dump

API to fetch information about a legal export job for an email account on Titan Mail Cloud infra. The exported file name will be : <titanAccountId>_<jobId>.tar.gz.

query Parameters
titanOrderId
required
number

The unique Titan order ID

titanAccountId
required
number
Example: titanAccountId=12345

The Titan account ID for which the legal export information is to be fetched.

jobId
required
string
Example: jobId=job-12345

The job ID of the legal export job.

Responses

Response samples

Content type
application/json
{}

Internal Forwarding Accounts Management APIs

Create Internal Forwarding Account

API to create email group without a pop account. Its forward only email account which forwards emails to internal email addresses of a mail order.

Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

email
required
string

The email distribution list that needs to be created. E.g. If you wish to create sales@xyz.com, this would be the value for email

recipients
required
Array of strings

This is the list of email IDs to be included within the distribution list.

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "email": "sales@xyz.com",
  • "recipients": [
    ]
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id"
}

Add members to Internal Forwarding Account

API to add new members to the existing email group.

Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

email
required
string

The email distribution list to which members need to be added. E.g. If you want members to be added to sales@xyz.com, this would be the value for email

recipients
required
Array of strings

This is only the email account that need to be added to the list.

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "email": "sales@xyz.com",
  • "recipients": [
    ]
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id"
}

Remove members to Internal Forwarding Account

API to remove members to the existing email group.

Request Body schema: application/json
required
titanOrderId
required
number

The unique order ID against each domain provisioned with Titan

email
required
string

The email distribution list from which members need to be removed. E.g. If you want members to be removed from sales@xyz.com, this would be the value for email

recipients
required
Array of strings

This is only the email account that need to be removed from the list.

Responses

Request samples

Content type
application/json
{
  • "titanOrderId": 1,
  • "email": "sales@xyz.com",
  • "recipients": [
    ]
}

Response samples

Content type
application/json
{
  • "reqID": "server.req.id"
}

Fetch Internal Forwarding Account Info

API to fetch members of an email group.

query Parameters
titanOrderId
required
number
Example: titanOrderId=1

The unique Titan order ID against which the domain is provisioned

email
required
string
Example: email=sales@xyz.com

The email distribution list for which details are required. E.g. If you wish to get details for sales@xyz.com, this would be the value for email

Responses

Response samples

Content type
application/json
{
  • "reqID": "server.req.id",
  • "recipients": [
    ]
}

Get all Internal Forwarding Accounts

API to fetch a list of all internal forwarding accounts for an order.

query Parameters
titanOrderId
required
number
Example: titanOrderId=1

The unique Titan order ID against which the domain is provisioned

Responses

Response samples

Content type
application/json
{
  • "reqID": "server.req.id",
  • "accounts": [
    ]
}

Data Structures

titanOrderId

  • titanOrderId: 1 (number, required)

    The unique order ID against each domain provisioned with Titan

domainName

  • domainName: xyz.com (string)

    domain name

customerId

  • customerId: qwe123 (string)

    customer id

planType

  • planType: pro (enum)

    This is the Titan mail plan. This would vary based on the plans being positioned with the partner.

    Members: free, pro, premium, pro_trial, premium_trial, ultra, ultra_trial

status

  • status: active (enum)

    Members: active, pending, suspended, deleted

titanAccountId

  • titanAccountId: 1 (number, required)

    The unique mail account ID against each email provisioned with Titan

titanResellerId

  • titanResellerId: 1 (number, required)

    The unique reseller ID generated by Titan for each reseller created by a partner

EmptyResponse

  • reqID: server.req.id (string, required)