API Usage Guidelines

Best practices for integrating with MaxMD Direct APIs

System Capacity Overview

Our API infrastructure is designed to handle:

Best Practices for API Integration

1. Implement Rate Limiting

To ensure optimal performance for all users, please implement client-side rate limiting:

Recommended approach:

2. Avoid Traffic Bursts

Problem: Sending thousands of messages simultaneously during peak hours can overwhelm our infrastructure and cause:

Solution: Implement request queuing and throttling

Example pattern:
- Queue your messages locally
- Send at a steady rate of 50-100 requests/second
- Monitor response times and adjust accordingly

3. Optimize Peak Hour Operations

If you need to send large volumes during morning hours:

4. Monitor and Respect HTTP Response Codes

Code Meaning Action
429 Too Many Requests Wait and retry with exponential backoff (start with 1s, then 2s, 4s, etc.)
503 Service Unavailable Temporary overload - retry after 30-60 seconds
500-504 Server Error Retry up to 3 times with delays

5. Payload Optimization

6. Connection Management

Recommended Implementation Example

Rate limiter configuration:
- Requests per second: 80-100
- Burst allowance: 150 (short spike tolerance)
- Retry strategy: Exponential backoff starting at 1 second
- Max retries: 3 attempts

Need Higher Capacity?

If your business requirements exceed these guidelines, please contact our tech team to discuss:

Support Contact

For technical questions or capacity planning assistance, reach out to our technical support team with your:


Note: Following these guidelines ensures reliable service for your application and maintains system stability for all our customers.

Potential API Response Codes

1. Standard API Response

APIResponse | SendMessageResponseType

Parameter Description
String smtpId SMTP message ID of the sent message
String message Information of the request
int code 0: success
1: authentication failed
2: address error
3: other error
4: other error
boolean success whether action is successful

Example response:

{
    "smtpId": "<1006462692.13.1775588067812.JavaMail.root@1342438-rs5r8.max.md>",
    "message": "Message sent. Message was sent and saved to INBOX.Sent folder",
    "code": 0,
    "success": true
}

2. Implementer Configuration or Business Errors (MaxMD Service is Up and Running)

Sometimes the implementer will see:

HTTP 200 OK
{
  "code": 999,
  "message": "error"
}

This means:

3. MaxMD API Issue (application is running but there is an internal issue)

4. MaxMD Server Issue (MaxMD Scheduled Maintenance / MaxMD network or infrastructure issue)

Case A: Service Interruption (no response at all)

Case B: Load balancer or gateway issues

Implementer would see: