List all servers
Returns a list of your virtual SMTP servers. Servers are returned sorted in alphabetical order.
GET /api/servers
curl \
-u api:YOUR_API_KEY \
https://mailosaur.com/api/servers
[
{
"id": "abcd1234",
"name": "Server name",
"users": [],
"messages": 16
}
]
Create a server
Creates a new virtual SMTP server and returns it.
Body parameters
- Name
name
- Type
string
- Required
required
- Description
- The name of the server.
POST /api/servers
curl \
-X POST \
-H 'Content-Type: application/json' \
-d '{"name":"Example"}' \
-u api:YOUR_API_KEY \
https://mailosaur.com/api/servers
{
"id": "abcd1234",
"name": "Server name",
"users": [],
"messages": 0
}
Retrieve a server
Retrieves the detail for a single server. Simply supply the unique identifier for the required server.
Path parameters
- Name
id
- Type
string
- Required
required
- Description
- The identifier of the server to be retrieved.
GET /api/servers/:id
curl \
-u api:YOUR_API_KEY \
https://mailosaur.com/api/servers/SERVER_ID
{
"id": "abcd1234",
"name": "Server name",
"users": [],
"messages": 0
}
Retrieve server password
Retrieves the password, for use with SMTP and POP3, for a single server. Simply supply the unique identifier for the required server.
Path parameters
- Name
id
- Type
string
- Required
required
- Description
- The identifier of the server.
GET /api/servers/:id/password
curl \
-u api:YOUR_API_KEY \
https://mailosaur.com/api/servers/SERVER_ID/password
{
"value": "server-password"
}
Update a server
Updates a single server and returns it.
Path parameters
- Name
id
- Type
string
- Required
required
- Description
- The identifier of the server to be updated.
Body parameters
- Name
name
- Type
string
- Required
required
- Description
- The name of the server.
PUT /api/servers/:id
curl \
-X PUT \
-H 'Content-Type: application/json' \
-d '{"name":"Updated server name"}' \
-u api:YOUR_API_KEY \
https://mailosaur.com/api/servers/SERVER_ID
{
"id": "abcd1234",
"name": "Server name",
"users": [],
"messages": 0
}
Delete a server
Permanently deletes a server. This operation cannot be undone. Also deletes all messages and associated attachments within the server.
Path parameters
- Name
id
- Type
string
- Required
required
- Description
- The identifier of the server to be deleted.
DELETE /api/servers/:id
curl \
-X DELETE \
-u api:YOUR_API_KEY \
https://mailosaur.com/api/servers/SERVER_ID
Previous
Authenticator (2FA)Next
Files