Skip to main content

Endpoint

POST https://theslow.net/api/account/update-display-name

Overview

This endpoint allows an authenticated user to update their display_name. When a display name is updated:
  • It is sanitized to enforce lowercase, hyphenated format, and safe characters.
  • Any existing email forwarding is disabled and the forwarding address is cleared.
  • If the user previously had email forwarding, their old ImprovMX alias is removed.
An analytics event is also logged for auditing and tracking purposes.

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
display_namestring✅ yesThe new desired display name. Must be at least 3 characters and pass sanitization checks.

Rules & Validation

  • The display_name will be:
    • Converted to lowercase.
    • Spaces replaced with hyphens.
    • Non-alphanumeric characters (except hyphens) removed.
  • Must be at least 3 characters long after sanitization.
  • Must be unique across all profiles and not in the reserved names list.
If the input fails these checks, you’ll receive detailed error messages.

Request Examples

cURL

curl -X POST   'https://theslow.net/api/account/update-display-name'   -H 'X-API-KEY: YOUR_API_KEY'   -H 'Content-Type: application/json'   -d '{"display_name": "new-username"}'

Python

import requests

BASE_URL = "https://theslow.net/api"
API_KEY = "YOUR_API_KEY"
payload = {"display_name": "new-username"}

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

response = requests.post(
    f"{BASE_URL}/account/update-display-name",
    headers=headers,
    json=payload
)

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

JavaScript (Fetch)

async function updateDisplayName(newName) {
  try {
    const response = await fetch("/api/account/update-display-name", {
      method: "POST",
      headers: {
        "X-API-KEY": "YOUR_API_KEY",
        "Content-Type": "application/json"
      },
      body: JSON.stringify({ display_name: newName })
    });

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

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

// Example usage:
// updateDisplayName("new-username");

Responses

200 OK

Successfully updated the display name.
{
  "success": true,
  "message": ""Name updated. Due to this, email forwarding has been disabled. You can enable it via the API or through the dashboard.""
}

400 Bad Request

Invalid or missing input.
{
  "error": "A display name is required."
}
{
  "error": "SlowNet Name must be at least 3 characters long."
}
{
  "error": "The name "bad name!" is not valid. Try "bad-name" instead."
}

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

Profile could not be found (possible stale session).
{
  "error": "Could not find your profile to update."
}

409 Conflict

The requested display name is reserved or already taken.
{
  "error": "This SlowNet name is not available."
}
{
  "error": "This SlowNet name is already taken."
}

500 Internal Server Error

A server-side error occurred.
{
  "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.