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"
    }

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

MethodPathAction
POST/Forwarding/bindCreates a binding relationship
POST/Forwarding/updateBindingUpdates existing binding relationship
POST/Forwarding/updateExpiresAtUpdates expiresAt TTL for 90 days more of requested date
POST/Forwarding/deleteBindingDeletes existing binding relationship
POST/email/retrieve-outlook-accountGet 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

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
}'

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

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
}'

Success Responses

Status 200

{}

Binding updated successfully


Update expiresAt date

This will add 90 days more to a given date for a binding

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"
}'

Success Responses

Status 200

{}

Date updated successfully


Delete binding

This will delete an existing binding in our system

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"
}'

Success Responses

Status 200

{}

Binding successfully deleted


Get an outlook account to use

This will get you an outlook email account to use

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"
}'

Success Responses

Status 200

{
  "email": "original@email.com",
  "password": "random_password",
  "alias": "alias@ub.io",
  "cookies": "cookie"
}

Account successfully obtained