cloudsted v1.0.5
Cloudsted JavaScript APIs Documentation
This document provides instructions on how to use the following JavaScript APIs provided by Cloudsted:
apiSendEmail
apiSendText
apiFeeCounter
apiSendEmail
The apiSendEmail
function allows you to send an email using Cloudsted's services.
const emailRequest = await cloudsted.apiSendEmail({
request: {
apiToken: token
,
email: 'sendToEmail',
message: 'htmlEmailmessage',
subject: Subject
,
senderName: 'senderName'
}
});
Parameters:
apiToken: Your API token obtained from Cloudsted. email: The email address of the recipient. message: The HTML content of the email. subject: The subject of the email. senderName: The name of the sender. apiSendText The apiSendText function allows you to send a text message using Cloudsted's services.
const textRequest = await cloudsted.apiSendText({
request: {
apiToken: token
,
phoneNumber: 'phoneNumber',
message: 'message'
}
});
Parameters:
apiToken: Your API token obtained from Cloudsted. phoneNumber: The phone number of the recipient. message: The text message to be sent. apiFeeCounter The apiFeeCounter function allows you to calculate fees associated with a monetary transaction.
javascript
Copy code
const feeCounterRequest = await cloudsted.apiFeeCounter({
request: {
apiToken: token
,
amountInCents: amountInCents,
feeDescription: 'feeDescription'
}
});
Parameters:
apiToken: Your API token obtained from Cloudsted. amountInCents: The amount in cents for which you want to calculate fees. feeDescription: A description of the fee calculation. Note: Make sure to replace 'token', 'sendToEmail', 'htmlEmailmessage', 'Subject', 'senderName', 'phoneNumber', 'message', amountInCents, and 'feeDescription' with your actual values when using these APIs.
For more information and API token acquisition, please refer to Cloudsted's official documentation.