Getting started
General Errors
Most errors have this body:
json
{
"desc":"No Active domain found",
"error":"DomainNotFound",
"statusCode":404,
"reqID":"4605e6ef-ea50-4a81-83f6-06159a9a906b"
}
erroris the error code: a fixed name that identifies the error, for exampleDomainNotFound. Use it in your code to handle each error.statusCodeis the HTTP status code, for example 404, 401 or 500.descis the error description.reqIDis the ID of the request. Send it to Titan when you report a problem.
These errors are common to many APIs:
| error | HTTP | Cause | What to do |
|---|---|---|---|
UNAUTHENTICATED |
401 | The request has no Authorization header. | Send your API key in the Authorization header. |
NOT_FOUND |
404 | The API key is not correct, or it is disabled. | Send the API key that Titan gave you. |
FORBIDDEN |
403 | The request comes from an IP address that is not on your whitelist. | Send the request from a whitelisted IP address, or ask Titan to add the address. |
BAD_REQUEST |
400 | The request body is not valid JSON. | Correct the body. |
DomainNotFound |
404 | No mail order matches the titanOrderId, or the domainName and customerId, that you sent. Some APIs also return this error for a deleted order. | Check the values. To find an order, use listMailOrders. |
UserNotFound |
404 | No customer matches the customerId that you sent. | Check the customerId. |
AccountNotFound |
404 | No email account matches the titanAccountId, or the email, that you sent. With an email, a deleted account also gives this error. | Check the values. To find an account, use listEmailAccounts. |
TooManyRequests |
429 | The IP address sent more requests than the rate limit. | Wait, then send the request again with exponential back-off. See Handling API Failures. |
InternalServerError |
500 | A problem occurred at Titan. | Retry with exponential back-off. If the error continues, send the reqID to your Titan PoC. |
Each API lists only its own errors.