Servers

Manage and maintain the virtual SMTP & SMS servers, to which messages are sent.

List all servers

Returns a list of your virtual SMTP servers. Servers are returned sorted in alphabetical order.

get https://mailosaur.com/api/servers

Response

Status: 200 OK
[
  {
    "id": "abcd1234",
    "password": "**********",
    "name": "Server name",
    "users": [],
    "messages": 16,
    "forwardingRules": [],
    "retention": 14
  }
]

Create a server

Creates a new virtual SMTP server and returns it.

post https://mailosaur.com/api/servers

Request

{
  "name": "My server"
}

Response

Status: 200 OK
{
    "id": "abcd1234",
    "password": "**********",
    "name": "Server name",
    "users": [],
    "messages": 0,
    "forwardingRules": [],
    "retention": 14
}

Retrieve a server

Retrieves the detail for a single server. Simply supply the unique identifier for the required server.

get https://mailosaur.com/api/servers/:id

Parameters

NameTypeInDescription
idstringpathThe identifier of the server to be retrieved.

Response

Status: 200 OK
{
    "id": "abcd1234",
    "password": "**********",
    "name": "Server name",
    "users": [],
    "messages": 0,
    "forwardingRules": [],
    "retention": 14
}

Update a server

Updates a single server and returns it.

put https://mailosaur.com/api/servers/:id

Parameters

NameTypeInDescription
idstringpathThe identifier of the server to be updated.

Request

{
    "id": "abcd1234",
    "password": "**********",
    "name": "Server name",
    "users": [],
    "messages": 0,
    "forwardingRules": [],
    "retention": 14
}

Response

Status: 200 OK
{
    "id": "abcd1234",
    "password": "**********",
    "name": "Server name",
    "users": [],
    "messages": 0,
    "forwardingRules": [],
    "retention": 14
}

Delete a server

Permanently deletes a server. This operation cannot be undone. Also deletes all messages and associated attachments within the server.

delete https://mailosaur.com/api/servers/:id

Parameters

NameTypeInDescription
idstringpathThe identifier of the server to be deleted.

Response

Status: 204 No Content