Skip to main content

Endpoint

POST https://theslow.net/api/email-forwarding/email-forwarding-toggle

Overview

This endpoint allows you to enable or disable email forwarding for your SlowNet alias. When enabling, it synchronizes with our email forwarding provider (ImprovMX), updates your SlowNet profile, and syncs with Brevo for contact management.

Authentication

This endpoint requires an API key. You can retrieve an API key from your dashboard. Include it in the X-API-KEY header:
X-API-KEY: YOUR_API_KEY_HERE
For more details, see the Authentication Guide.

Request Body

FieldTypeRequiredDescription
enabledboolean✅ yesWhether to enable (true) or disable (false) forwarding.
emailstring✅ when enablingThe email address to forward to. Required when enabled is true.

Request Examples

cURL

curl -X POST   'https://theslow.net/api/email-forwarding/email-forwarding-toggle'   -H 'X-API-KEY: YOUR_API_KEY'   -H 'Content-Type: application/json'   -d '{"enabled": true, "email": "[email protected]"}'

Python

import requests

BASE_URL = "https://theslow.net/api"
API_KEY = "YOUR_API_KEY"

headers = {
    "X-API-KEY": API_KEY,
    "Content-Type": "application/json"
}

payload = {
    "enabled": True,
    "email": "[email protected]"
}

response = requests.post(
    f"{BASE_URL}/email-forwarding/email-forwarding-toggle",
    headers=headers,
    json=payload
)

if response.ok:
    print("✅ Success:", response.json())
else:
    print("❌ Error:", response.status_code, response.json())

JavaScript (Fetch)

async function toggleForwarding(enabled, email) {
  try {
    const response = await fetch("/api/email-forwarding/email-forwarding-toggle", {
      method: "POST",
      headers: {
        "X-API-KEY": "YOUR_API_KEY",
        "Content-Type": "application/json"
      },
      body: JSON.stringify({ enabled, email })
    });

    if (!response.ok) {
      const errorData = await response.json();
      console.error("Failed to toggle:", errorData.error);
      return;
    }

    const data = await response.json();
    console.log("Toggle result:", data);
  } catch (err) {
    console.error("Unexpected error:", err);
  }
}

// Example usage:
// toggleForwarding(true, "[email protected]");

Responses

200 OK

Indicates the forwarding setting was successfully updated.
{
  "success": true
}

400 Bad Request

Invalid input, such as missing email when enabling.
{
  "error": "A valid email address is required to enable forwarding."
}

401 Unauthorized

Occurs if authentication fails (e.g., missing or invalid API key).
{
  "error": "Unauthorized: You must be logged in or provide a valid API Key."
}

404 Not Found

Occurs if the user does not have a profile yet.
{
  "error": "Your profile could not be found. Please set a SlowNet Name first."
}

500 Internal Server Error

A server-side error occurred.
{
  "error": "Failed to synchronize with the email forwarding service."
}
or
{
  "error": "An internal server error occurred."
}

Need Further Assistance?

If you have any questions or encounter issues, please don’t hesitate to reach out to our support team.