A powerful and simple way to update text messages in your application
Your private API key for authentication
Gmail or identifier for the message
The updated text message content
Additional custom parameter
import requests
def update_message(private_key: str, inbox: str, text: str, coust: str = None):
"""Update a message using the API"""
url = "https://apidpamail-production.up.railway.app/mailspam"
params = {
"privatekey": private_key,
"inbox": inbox,
"text": text
}
if coust:
params["coust"] = coust
try:
response = requests.get(url, params=params)
response.raise_for_status()
return response.json()
except requests.exceptions.RequestException as e:
print(f"Error: {e}")
return None
API_KEY = "your_private_key"
INBOX = "example@gmail.com"
MESSAGE = "inahee"
COUST = "50"
result = update_message(API_KEY, INBOX, MESSAGE, COUST)
if result:
print("Success:", result)
{
"status": "success",
"message": "Message updated successfully",
"data": {
"privatekey": "your_private_key",
"inbox": "Gmail",
"text": "Updated text message",
"coust": "custom_value"
}
}