Email Forwarding Email forwarding service is an api built to allow handling of some forwarding emails use cases that requires temporary emails or some forwarding rules for properly handling notifications, temporal account creation and so on, with this API this can be easily achieved by just setting something called binding
and using the end-points documented below.
Main idea behind email service is that we have bindings that looks similar to this:
{
"recipient" : "String" ,
"forwardsTo" : "String" ,
"expiresAt" : "Date" ,
"keepSender" : "Boolean"
}
1 2 3 4 5 6
So for each recipient X
we will forward incoming email to Y
email that is defined on forwardsTo
field, this is called binding.
Binding recipient
are unique , so recipients will have only one forwardsTo
email, it is not allowed to have same recipient email binded to multiple forwardsTo
emails, however you can create multiple binding for multiple recipients to forward emails to the same forwardTo
email, it is like a many to one relationship.
The expiresAt
field is set when creating binding and it will have a TTL which expires the binding after that TTL is reached, by default it will last 1 year. It is possible to extend the expiration date of the binding by using the /Forwarding/updateExpiresAt
documented below.
Available endpoints Method Path Action POST /Forwarding/bind Creates a binding relationship POST /Forwarding/updateBinding Updates existing binding relationship POST /Forwarding/updateExpiresAt Updates expiresAt TTL for 90 days more of requested date POST /Forwarding/deleteBinding Deletes existing binding relationship POST /email/retrieve-outlook-account Get outlook account
Authentication | Authorization Since these endpoints remains the same as the jobs endpoints, the authentication and authorization works exactly the same as here
Create a binding This will create a relationship between a recipient
email and a a forwardTo
email
Authorization
string required Basic authorization header, where credentials are the Base64 encoding of app secret and a blank password joined by a single colon.
Example: Authorization: Basic <credentials>
ContentType
string required Media type of the request.
Example: Content-Type: application/json
Body Parameters
recipient
string required This is email that will receive the emails initially, to then be forwarded
Example: recipient@ub.io
forwardsTo
string required This is where emails will be forwarded to
Example: forwardsto@ub.io
keepSender
boolean optional If this flag is true the forwarded emails will have the `from` property of the original email, if it is set to false, the `from` in the forwarded email will be `sender@emailsrelay.com`.
Default: false
Example: true
Code sample POST /Forwarding/bind
curl -X POST 'https://api.automationcloud.net/Forwarding/bind' \
-H 'Authorization: Basic <credentials>' \
-H 'Content-Type: application/json' \
--data '{
"recipient": "recipient@ub.io",
"forwardsTo": "forwardsto@ub.io",
"keepSender": false
}'
1 2 3 4 5 6 7 8
Success Responses Status 200
Binding created successfully
Update a binding This will update a relationship between a recipient
email and a forwardTo
email, keepSender
can also be updated with this endpoint
Authorization
string required Basic authorization header, where credentials are the Base64 encoding of app secret and a blank password joined by a single colon.
Example: Authorization: Basic <credentials>
ContentType
string required Media type of the request.
Example: Content-Type: application/json
Body Parameters
recipient
string required This is email that we want to bind for forwarding, recipient has to exists
Example: recipient@ub.io
forwardsTo
string required This is where emails will be forwarded to
Example: forwardsto@ub.io
keepSender
boolean optional If this flag is true the forwarded emails will have the `from` property of the original email, if it is set to false, the `from` in the forwarded email will be `sender@emailsrelay.com`.
Example: true
Code sample POST /Forwarding/updateBinding
curl -X POST 'https://api.automationcloud.net/Forwarding/updateBinding' \
-H 'Authorization: Basic <credentials>' \
-H 'Content-Type: application/json' \
--data '{
"recipient": "recipient@ub.io",
"forwardsTo": "forwardsto@ub.io",
"keepSender": true
}'
1 2 3 4 5 6 7 8
Success Responses Status 200
Binding updated successfully
Update expiresAt date This will add 90 days more to a given date for a binding
Authorization
string required Basic authorization header, where credentials are the Base64 encoding of app secret and a blank password joined by a single colon.
Example: Authorization: Basic <credentials>
ContentType
string required Media type of the request.
Example: Content-Type: application/json
Body Parameters
recipient
string required This is email of existing binding
Example: recipient@ub.io
latestDate
string required latestDate of expireAt setted on binding, string setted on date format as in example
Example: Tue Mar 25 2025 04:00:00 GMT+0400 (Samara Standard Time)
Code sample POST /Forwarding/updateExpiresAt
curl -X POST 'https://api.automationcloud.net/Forwarding/updateExpiresAt' \
-H 'Authorization: Basic <credentials>' \
-H 'Content-Type: application/json' \
--data '{
"recipient": "recipient@ub.io",
"latestDate": "2025-03-25"
}'
1 2 3 4 5 6 7
Success Responses Status 200
Date updated successfully
Delete binding This will delete an existing binding in our system
Authorization
string required Basic authorization header, where credentials are the Base64 encoding of app secret and a blank password joined by a single colon.
Example: Authorization: Basic <credentials>
ContentType
string required Media type of the request.
Example: Content-Type: application/json
Body Parameters
recipient
string required This is email of existing binding
Example: recipient@ub.io
Code sample POST /Forwarding/deleteBinding
curl -X POST 'https://api.automationcloud.net/Forwarding/deleteBinding' \
-H 'Authorization: Basic <credentials>' \
-H 'Content-Type: application/json' \
--data '{
"recipient": "recipient@ub.io"
}'
1 2 3 4 5 6
Success Responses Status 200
Binding successfully deleted
Get an outlook account to use This will get you an outlook email account to use
Authorization
string required Basic authorization header, where credentials are the Base64 encoding of app secret and a blank password joined by a single colon.
Example: Authorization: Basic <credentials>
ContentType
string required Media type of the request.
Example: Content-Type: application/json
Body Parameters
forwardsTo
string required This is where emails will be forwarded to
Example: recipient@ub.io
keepSender
boolean optional If this flag is true the forwarded emails will have the `from` property of the original email, if it is set to false, the `from` in the forwarded email will be `sender@emailsrelay.com`.
Example: true
alias
string required the desired outlook.com alias email address. Any emails received via this address will also be forwarded to the forwardsTo address
Example: alias@ub.io
Code sample POST /email/retrieve-outlook-account
curl -X POST 'https://services.automation.cloud/email/retrieve-outlook-account' \
-H 'Authorization: Basic <credentials>' \
-H 'Content-Type: application/json' \
--data '{
"forwardsTo": "recipient@ub.io",
"keepSender": true,
"alias": "alias@ub.io"
}'
1 2 3 4 5 6 7 8
Success Responses Status 200
{
"email" : "original@email.com" ,
"password" : "random_password" ,
"alias" : "alias@ub.io" ,
"cookies" : "cookie"
}
1 2 3 4 5 6
Account successfully obtained