API Documentation: Send Email

Supports Token auth, sender ownership verification, and tiered billing (10 emails for ¥0.01)

Authentication

Supports three credential passing methods (in descending order of priority):

  • Query Parameter: ?token=YOUR_API_TOKEN
  • Body Parameter: token=YOUR_API_TOKEN
  • Header Authorization: Authorization: Bearer YOUR_API_TOKEN
Request Parameters
Parameter Type Required Description
tokenstringYesAPI Authentication Token
from_namestringOptionalYour Name
fromstringYesSender email alias (must be a valid alias owned by the current user)
reply_tostringOptionalReply-To
tostringYesRecipient email address
subjectstringYesEmail subject
bodystringYesEmail body (supports HTML, e.g.,

Test

)
Response Format (JSON)
{
  "ret": 1,
  "msg": "Sent successfully"
}
Status Code Descriptions
HTTP Status ret Value Description
2001Sent successfully
4000Incomplete parameters, or insufficient balance (10 emails for ¥0.01 limit)
4010Missing API authentication Token or Token is invalid
4030Authentication failed: "from" address is not a valid alias owned by you
5000Internal server error or SMTP sending failure
cURL Request Example
curl -i -X POST https://ocloude.com/user/api/v1/alias/send \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "token=YOUR_API_TOKEN" \
  -d "[email protected]" \
  -d "[email protected]" \
  -d "subject=Hello" \
  -d "body=<p>Test content</p>"

API Documentation: Outlook.ba Email Send

Supports Token auth, Outlook.ba domain verification, 2 quota units per email (¥0.01 per 10 units)

Authentication

Supports three credential passing methods (in descending order of priority):

  • Query Parameter: ?token=YOUR_API_TOKEN
  • Body Parameter: token=YOUR_API_TOKEN
  • Header Authorization: Authorization: Bearer YOUR_API_TOKEN
Request Parameters
Parameter Type Required Description
tokenstringYesAPI Authentication Token
from_namestringOptionalYour Name
fromstringYesSender Outlook.ba address (must end with @outlook.ba and be owned by the current user)
reply_tostringOptionalReply-To
tostringYesRecipient email address
subjectstringYesEmail subject
bodystringYesEmail body (supports HTML, e.g.,

Test

)
Response Format (JSON)
{
  "ret": 1,
  "msg": "Sent successfully"
}
Status Code Descriptions
HTTP Status ret Value Description
2001Sent successfully
4000Incomplete parameters, incorrect email domain format, or insufficient balance
4010Missing API authentication Token or Token is invalid
4030Authentication failed: "from" address is not a valid account owned by you
5000Internal server error or SMTP sending failure
cURL Request Example
curl -i -X POST https://ocloude.com/user/api/v1/ba/send \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "token=YOUR_API_TOKEN" \
  -d "[email protected]" \
  -d "[email protected]" \
  -d "subject=Hello Outlook.ba" \
  -d "body=<p>Test content from ba</p>"