API Reference

Integrate HostingEmails into your applications with our RESTful API

🚀 Getting Started


The HostingEmails API allows you to programmatically manage email accounts, domains, and settings. All requests require authentication via API key.

Base URL

https://api.hostingemails.net/v1

Authentication

Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY
Note: Keep your API key secure. Never share it publicly or commit it to version control.

📧 Email Accounts

  • GET
/accounts
List all email accounts
  • POST
/accounts
Create a new email account
  • GET
/accounts/{id}
Get account details
  • DELETE
/accounts/{id}
Delete an email account

Example Request

curl -X POST https://api.hostingemails.net/v1/accounts \ -H “Authorization: Bearer YOUR_API_KEY” \ -H “Content-Type: application/json” \ -d ‘{ “email”: “john@example.com”, “password”: “SecurePass123”, “storage_quota”: 10240 }’

🌐 Domains

  • GET
/domains
List all domains
  • POST
/domains
Add a new domain
  • POST
/domains/{id}/verify
Verify domain ownership

📊 Response Format

All API responses are in JSON format:

{ “success”: true, “data”: { … }, “message”: “Operation completed successfully” }

Error Responses

{ “success”: false, “error”: { “code”: 401, “message”: “Invalid API key” } }

Common Status Codes

200 OK – Request succeeded
201 Created – Resource created successfully
400 Bad Request – Invalid request parameters
401 Unauthorized – Invalid or missing API key
404 Not Found – Resource not found
429 Too Many Requests – Rate limit exceeded
500 Internal Server Error – Server error

 

🔑 Get Your API Key

API access is available on Professional and Enterprise plans.

Generate your API key from your account dashboard after upgrading to a compatible plan.