wildduck/docs/api_data.json
2017-11-28 15:45:43 +02:00

2 lines
129 KiB
JSON

[
{
"type": "delete",
"url": "/users/:user/addresses/:address",
"title": "Delete an Address",
"name": "DeleteUserAddress",
"group": "Addresses",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "user",
"description": "<p>ID of the User</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "address",
"description": "<p>ID of the Address</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"Trying to delete main address. Set a new main address first\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i -XDELETE http://localhost:8080/users/59ef21aef255ed1d9d790e7a/addresses/59ef21aef255ed1d9d790e81",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/addresses.js",
"groupTitle": "Addresses"
},
{
"type": "get",
"url": "/addresses",
"title": "List registered Addresses",
"name": "GetAddresses",
"group": "Addresses",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "query",
"description": "<p>Partial match of an address</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "limit",
"defaultValue": "20",
"description": "<p>How many records to return</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "page",
"defaultValue": "1",
"description": "<p>Current page number. Informational only, page numbers start from 1</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "next",
"description": "<p>Cursor value for next page, retrieved from <code>nextCursor</code> response value</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "previous",
"description": "<p>Cursor value for previous page, retrieved from <code>previousCursor</code> response value</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "total",
"description": "<p>How many results were found</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "page",
"description": "<p>Current page number. Derived from <code>page</code> query argument</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "previousCursor",
"description": "<p>Either a cursor string or false if there are not any previous results</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "nextCursor",
"description": "<p>Either a cursor string or false if there are not any next results</p>"
},
{
"group": "Success 200",
"type": "Object[]",
"optional": false,
"field": "results",
"description": "<p>Address listing</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.id",
"description": "<p>ID of the Address</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.address",
"description": "<p>E-mail address string</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.user",
"description": "<p>User ID this address belongs to</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"total\": 1,\n \"page\": 1,\n \"previousCursor\": false,\n \"nextCursor\": false,\n \"results\": [\n {\n \"id\": \"59ef21aef255ed1d9d790e81\",\n \"address\": \"user@example.com\",\n \"user\": \"59ef21aef255ed1d9d790e7a\"\n }\n ]\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"Database error\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i http://localhost:8080/addresses",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/addresses.js",
"groupTitle": "Addresses"
},
{
"type": "get",
"url": "/users/:user/addresses/:address",
"title": "Request Addresses information",
"name": "GetUserAddress",
"group": "Addresses",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "user",
"description": "<p>ID of the User</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "address",
"description": "<p>ID of the Address</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>ID of the Address</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "address",
"description": "<p>E-mail address string</p>"
},
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "main",
"description": "<p>Indicates if this is the default address for the User</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "created",
"description": "<p>Datestring of the time the address was created</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"id\": \"59ef21aef255ed1d9d790e81\",\n \"address\": \"user@example.com\",\n \"main\": true,\n \"created\": \"2017-10-24T11:19:10.911Z\"\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"This user does not exist\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i http://localhost:8080/users/59ef21aef255ed1d9d790e7a/addresses/59ef21aef255ed1d9d790e81",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/addresses.js",
"groupTitle": "Addresses"
},
{
"type": "get",
"url": "/users/:user/addresses",
"title": "List registered Addresses for an User",
"name": "GetUserAddresses",
"group": "Addresses",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "user",
"description": "<p>ID of the User</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
},
{
"group": "Success 200",
"type": "Object[]",
"optional": false,
"field": "results",
"description": "<p>Address listing</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.id",
"description": "<p>ID of the Address</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.address",
"description": "<p>E-mail address string</p>"
},
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "results.main",
"description": "<p>Indicates if this is the default address for the User</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.created",
"description": "<p>Datestring of the time the address was created</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"total\": 1,\n \"page\": 1,\n \"previousCursor\": false,\n \"nextCursor\": false,\n \"results\": [\n {\n \"id\": \"59ef21aef255ed1d9d790e81\",\n \"address\": \"user@example.com\",\n \"main\": true,\n \"created\": \"2017-10-24T11:19:10.911Z\"\n }\n ]\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"This user does not exist\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i http://localhost:8080/users/59ef21aef255ed1d9d790e7a/addresses",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/addresses.js",
"groupTitle": "Addresses"
},
{
"type": "post",
"url": "/users/:user/addresses",
"title": "Create new Address",
"name": "PostUserAddress",
"group": "Addresses",
"description": "<p>Add a new email address for an User. Addresses can contain unicode characters. Dots in usernames are normalized so no need to create both &quot;firstlast@example.com&quot; and &quot;first.last@example.com&quot;</p> <p>Special address <code>*@example.com</code> catches all emails to that domain without a registered destination (requires <code>allowWildcard</code> argument)</p>",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "user",
"description": "<p>ID of the User</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "address",
"description": "<p>E-mail Address</p>"
},
{
"group": "Parameter",
"type": "Boolean",
"optional": true,
"field": "main",
"defaultValue": "false",
"description": "<p>Indicates if this is the default address for the User</p>"
},
{
"group": "Parameter",
"type": "Boolean",
"optional": true,
"field": "allowWildcard",
"defaultValue": "false",
"description": "<p>If <code>true</code> then address value can be in the form of <code>*@example.com</code>, otherwise using * is not allowed</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>ID of the Address</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"This user does not exist\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i -XPOST http://localhost:8080/users/59fc66a03e54454869460e45/addresses/5a1d4541153888cdcd62a71b \\\n-H 'Content-type: application/json' \\\n-d '{\n \"address\": \"my.new.address@example.com\"\n}'",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/addresses.js",
"groupTitle": "Addresses"
},
{
"type": "put",
"url": "/users/:user/addresses/:address",
"title": "Update Address information",
"name": "PutUserAddress",
"group": "Addresses",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "user",
"description": "<p>ID of the User</p>"
},
{
"group": "Parameter",
"type": "Boolean",
"optional": false,
"field": "main",
"description": "<p>Indicates if this is the default address for the User</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"This user does not exist\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i -XPUT http://localhost:8080/users/59fc66a03e54454869460e45/addresses/5a1d4541153888cdcd62a71b \\\n-H 'Content-type: application/json' \\\n-d '{\n \"main\": true\n}'",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/addresses.js",
"groupTitle": "Addresses"
},
{
"type": "get",
"url": "/users/:user/authlog",
"title": "List authentication Events",
"name": "GetAuthlog",
"group": "Authentication",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "user",
"description": "<p>ID of the User</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "action",
"description": "<p>Limit listing only to values with specific action value</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "sess",
"description": "<p>Limit listing only to values with specific session identifier</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "ip",
"description": "<p>Limit listing only to values with specific IP address</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "limit",
"defaultValue": "20",
"description": "<p>How many records to return</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "page",
"defaultValue": "1",
"description": "<p>Current page number. Informational only, page numbers start from 1</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "next",
"description": "<p>Cursor value for next page, retrieved from <code>nextCursor</code> response value</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "previous",
"description": "<p>Cursor value for previous page, retrieved from <code>previousCursor</code> response value</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "total",
"description": "<p>How many results were found</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "page",
"description": "<p>Current page number. Derived from <code>page</code> query argument</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "previousCursor",
"description": "<p>Either a cursor string or false if there are not any previous results</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "nextCursor",
"description": "<p>Either a cursor string or false if there are not any next results</p>"
},
{
"group": "Success 200",
"type": "Object[]",
"optional": false,
"field": "results",
"description": "<p>Event listing</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.id",
"description": "<p>ID of the Event</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.action",
"description": "<p>Action identifier</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.result",
"description": "<p>Did the action succeed</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.sess",
"description": "<p>Session identifier</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.ip",
"description": "<p>IP address of the Event</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.created",
"description": "<p>Datestring of the Event time</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"action\": \"account created\",\n \"total\": 1,\n \"page\": 1,\n \"previousCursor\": false,\n \"nextCursor\": false,\n \"results\": [\n {\n \"id\": \"59fc66a03e54454869460e4d\",\n \"action\": \"account created\",\n \"result\": \"success\",\n \"sess\": null,\n \"ip\": null,\n \"created\": \"2017-11-03T12:52:48.792Z\",\n \"expires\": \"2017-12-03T12:52:48.792Z\"\n }\n ]\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"Database error\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i \"http://localhost:8080/users/59fc66a03e54454869460e45/authlog?action=account+created\"",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/auth.js",
"groupTitle": "Authentication"
},
{
"type": "post",
"url": "/authenticate",
"title": "Authenticate an User",
"name": "PostAuth",
"group": "Authentication",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "username",
"description": "<p>Username or E-mail address</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "password",
"description": "<p>Password</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "protocol",
"description": "<p>Application identifier for security logs</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "scope",
"defaultValue": "master",
"description": "<p>Required scope. One of <code>master</code>, <code>imap</code>, <code>smtp</code>, <code>pop3</code></p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "sess",
"description": "<p>Session identifier for the logs</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "ip",
"description": "<p>IP address for the logs</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>ID of authenticated User</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "username",
"description": "<p>Username of authenticated User</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "scope",
"description": "<p>The scope this authentication is valid for</p>"
},
{
"group": "Success 200",
"type": "String[]",
"optional": false,
"field": "require2fa",
"description": "<p>List of enabled 2FA mechanisms</p>"
},
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "requirePasswordChange",
"description": "<p>Indicates if account hassword has been reset and should be replaced</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"id\": \"5a12914c350c183bd0d331f0\",\n \"username\": \"myuser\",\n \"scope\": \"master\",\n \"require2fa\": [\n \"totp\"\n ],\n \"requirePasswordChange\": false\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"Authentication failed. Invalid scope\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i -XPOST http://localhost:8080/authenticate \\\n-H 'Content-type: application/json' \\\n-d '{\n \"username\": \"myuser\",\n \"password\": \"secretpass\",\n \"scope\": \"master\"\n}'",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/auth.js",
"groupTitle": "Authentication"
},
{
"type": "delete",
"url": "/users/:user/autoreply",
"title": "Delete Autoreply information",
"name": "DeleteAutoreply",
"group": "Autoreplies",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "user",
"description": "<p>ID of the User</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"This user does not exist\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i -XDELETE http://localhost:8080/users/59fc66a03e54454869460e45/autoreply",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/autoreply.js",
"groupTitle": "Autoreplies"
},
{
"type": "get",
"url": "/users/:user/autoreply",
"title": "Request Autoreply information",
"name": "GetAutoreply",
"group": "Autoreplies",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "user",
"description": "<p>ID of the User</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
},
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "status",
"description": "<p>Is the autoreply enabled (true) or not (false)</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "subject",
"description": "<p>Subject line for the autoreply. If empty then uses subject of the original message</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "html",
"description": "<p>HTML formatted content of the autoreply message</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "text",
"description": "<p>Plaintext formatted content of the autoreply message</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "start",
"description": "<p>Datestring of the start of the autoreply</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "end",
"description": "<p>Datestring of the end of the autoreply</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"status\": true,\n \"subject\": \"\",\n \"text\": \"Away from office until Dec.19\",\n \"html\": \"\",\n \"start\": \"2017-11-15T00:00:00.000Z\",\n \"end\": \"2017-12-19T00:00:00.000Z\"\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"This user does not exist\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i http://localhost:8080/users/59fc66a03e54454869460e45/autoreply",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/autoreply.js",
"groupTitle": "Autoreplies"
},
{
"type": "put",
"url": "/users/:user/autoreply",
"title": "Update Autoreply information",
"name": "PutAutoreply",
"group": "Autoreplies",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "user",
"description": "<p>ID of the User</p>"
},
{
"group": "Parameter",
"type": "Boolean",
"optional": true,
"field": "status",
"description": "<p>Is the autoreply enabled (true) or not (false)</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "subject",
"description": "<p>Subject line for the autoreply. If empty then uses subject of the original message</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "html",
"description": "<p>HTML formatted content of the autoreply message</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "text",
"description": "<p>Plaintext formatted content of the autoreply message</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "start",
"description": "<p>Datestring of the start of the autoreply</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "end",
"description": "<p>Datestring of the end of the autoreply</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"This user does not exist\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i -XPUT http://localhost:8080/users/59fc66a03e54454869460e45/autoreply \\\n-H 'Content-type: application/json' \\\n-d '{\n \"status\": true,\n \"text\": \"Away from office until Dec.19\",\n \"start\": \"2017-11-15T00:00:00.000Z\",\n \"end\": \"2017-12-19T00:00:00.000Z\"\n}'",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/autoreply.js",
"groupTitle": "Autoreplies"
},
{
"type": "delete",
"url": "/users/:user/filters/:filter",
"title": "Delete a Filter",
"name": "DeleteFilter",
"group": "Filters",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "user",
"description": "<p>Users unique ID</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "filter",
"description": "<p>Filters unique ID</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"This filter does not exist\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i -XDELETE http://localhost:8080/users/59fc66a03e54454869460e45/filters/5a1c0ee490a34c67e266931c",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/filters.js",
"groupTitle": "Filters"
},
{
"type": "get",
"url": "/users/:user/filters/:filter",
"title": "Request Filter information",
"name": "GetFilter",
"group": "Filters",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "user",
"description": "<p>Users unique ID.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "filter",
"description": "<p>Filters unique ID.</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>ID for the Filter</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "name",
"description": "<p>Name of the Filter</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "query_from",
"description": "<p>Partial match for the From: header (case insensitive)</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "query_to",
"description": "<p>Partial match for the To:/Cc: headers (case insensitive)</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "query_subject",
"description": "<p>Partial match for the Subject: header (case insensitive)</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "query_text",
"description": "<p>Fulltext search against message text</p>"
},
{
"group": "Success 200",
"type": "Bolean",
"optional": false,
"field": "query_ha",
"description": "<p>Does a message have to have an attachment or not</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "query_size",
"description": "<p>Message size in bytes. If the value is a positive number then message needs to be larger, if negative then message needs to be smaller than abs(size) value</p>"
},
{
"group": "Success 200",
"type": "Bolean",
"optional": false,
"field": "action_seen",
"description": "<p>If true then mark matching messages as Seen</p>"
},
{
"group": "Success 200",
"type": "Bolean",
"optional": false,
"field": "action_flag",
"description": "<p>If true then mark matching messages as Flagged</p>"
},
{
"group": "Success 200",
"type": "Bolean",
"optional": false,
"field": "action_delete",
"description": "<p>If true then do not store matching messages</p>"
},
{
"group": "Success 200",
"type": "Bolean",
"optional": false,
"field": "action_spam",
"description": "<p>If true then store matching messags to Junk Mail folder</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "action_mailbox",
"description": "<p>Mailbox ID to store matching messages to</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "action_forward",
"description": "<p>An email address where matching messages should be forwarded to</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "action_targetUrl",
"description": "<p>An URL where matching messages should be POSTed to</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"id\": \"5a1c0ee490a34c67e266931c\",\n \"created\": \"2017-11-27T13:11:00.835Z\",\n \"query_from\": \"Mäger\",\n \"action_seen\": true\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"This filter does not exist\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i http://localhost:8080/users/59fc66a03e54454869460e45/filters/5a1c0ee490a34c67e266931c",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/filters.js",
"groupTitle": "Filters"
},
{
"type": "get",
"url": "/users/:user/filters",
"title": "List Filters for an User",
"name": "GetFilters",
"group": "Filters",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "user",
"description": "<p>Users unique ID</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
},
{
"group": "Success 200",
"type": "Object[]",
"optional": false,
"field": "results",
"description": "<p>Filter description</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.id",
"description": "<p>Filter ID</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.name",
"description": "<p>Name for the filter</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.created",
"description": "<p>Datestring of the time the filter was created</p>"
},
{
"group": "Success 200",
"type": "Array[]",
"optional": false,
"field": "results.query",
"description": "<p>A list of query descriptions</p>"
},
{
"group": "Success 200",
"type": "Array[]",
"optional": false,
"field": "results.action",
"description": "<p>A list of action descriptions</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"results\": [\n {\n \"id\": \"5a1c0ee490a34c67e266931c\",\n \"query\": [\n [\n \"from\",\n \"(Mäger)\"\n ]\n ],\n \"action\": [\n [\n \"mark as read\"\n ]\n ],\n \"created\": \"2017-11-27T13:11:00.835Z\"\n }\n ]\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"This user does not exist\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i http://localhost:8080/users/5a1bda70bfbd1442cd96c6f0/filters",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/filters.js",
"groupTitle": "Filters"
},
{
"type": "post",
"url": "/users/:user/filters",
"title": "Create new Filter",
"name": "PostFilter",
"group": "Filters",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "user",
"description": "<p>Users unique ID.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "name",
"description": "<p>Name of the Filter</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "query_from",
"description": "<p>Partial match for the From: header (case insensitive)</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "query_to",
"description": "<p>Partial match for the To:/Cc: headers (case insensitive)</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "query_subject",
"description": "<p>Partial match for the Subject: header (case insensitive)</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "query_text",
"description": "<p>Fulltext search against message text</p>"
},
{
"group": "Parameter",
"type": "Bolean",
"optional": true,
"field": "query_ha",
"description": "<p>Does a message have to have an attachment or not</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "query_size",
"description": "<p>Message size in bytes. If the value is a positive number then message needs to be larger, if negative then message needs to be smaller than abs(size) value</p>"
},
{
"group": "Parameter",
"type": "Bolean",
"optional": true,
"field": "action_seen",
"description": "<p>If true then mark matching messages as Seen</p>"
},
{
"group": "Parameter",
"type": "Bolean",
"optional": true,
"field": "action_flag",
"description": "<p>If true then mark matching messages as Flagged</p>"
},
{
"group": "Parameter",
"type": "Bolean",
"optional": true,
"field": "action_delete",
"description": "<p>If true then do not store matching messages</p>"
},
{
"group": "Parameter",
"type": "Bolean",
"optional": true,
"field": "action_spam",
"description": "<p>If true then store matching messags to Junk Mail folder</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "action_mailbox",
"description": "<p>Mailbox ID to store matching messages to</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "action_forward",
"description": "<p>An email address where matching messages should be forwarded to</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "action_targetUrl",
"description": "<p>An URL where matching messages should be POSTed to</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>ID for the created Filter</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"id\": \"5a1c0ee490a34c67e266931c\"\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"Empty filter query\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i -XPOST http://localhost:8080/users/5a1bda70bfbd1442cd96c6f0/filters \\\n-H 'Content-type: application/json' \\\n-d '{\n \"query_from\": \"Mäger\",\n \"action_seen\": true\n}'",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/filters.js",
"groupTitle": "Filters"
},
{
"type": "put",
"url": "/users/:user/filters/:filter",
"title": "Update Filter information",
"name": "PutFilter",
"group": "Filters",
"description": "<p>This method updates Filter data. To unset a value, use empty strings</p>",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "user",
"description": "<p>Users unique ID.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "filter",
"description": "<p>Filters unique ID.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "name",
"description": "<p>Name of the Filter</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "query_from",
"description": "<p>Partial match for the From: header (case insensitive)</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "query_to",
"description": "<p>Partial match for the To:/Cc: headers (case insensitive)</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "query_subject",
"description": "<p>Partial match for the Subject: header (case insensitive)</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "query_text",
"description": "<p>Fulltext search against message text</p>"
},
{
"group": "Parameter",
"type": "Bolean",
"optional": true,
"field": "query_ha",
"description": "<p>Does a message have to have an attachment or not</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "query_size",
"description": "<p>Message size in bytes. If the value is a positive number then message needs to be larger, if negative then message needs to be smaller than abs(size) value</p>"
},
{
"group": "Parameter",
"type": "Bolean",
"optional": true,
"field": "action_seen",
"description": "<p>If true then mark matching messages as Seen</p>"
},
{
"group": "Parameter",
"type": "Bolean",
"optional": true,
"field": "action_flag",
"description": "<p>If true then mark matching messages as Flagged</p>"
},
{
"group": "Parameter",
"type": "Bolean",
"optional": true,
"field": "action_delete",
"description": "<p>If true then do not store matching messages</p>"
},
{
"group": "Parameter",
"type": "Bolean",
"optional": true,
"field": "action_spam",
"description": "<p>If true then store matching messags to Junk Mail folder</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "action_mailbox",
"description": "<p>Mailbox ID to store matching messages to</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "action_forward",
"description": "<p>An email address where matching messages should be forwarded to</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "action_targetUrl",
"description": "<p>An URL where matching messages should be POSTed to</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>ID for the created Filter</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"Empty filter query\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i -XPUT http://localhost:8080/users/59fc66a03e54454869460e45/filters/5a1c0ee490a34c67e266931c \\\n-H 'Content-type: application/json' \\\n-d '{\n \"action_seen\": \"\",\n \"action_flag\": true\n}'",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/filters.js",
"groupTitle": "Filters"
},
{
"type": "delete",
"url": "/users/:user/mailboxes/:mailbox",
"title": "Delete a Mailbox",
"name": "DeleteMailbox",
"group": "Mailboxes",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "user",
"description": "<p>Users unique ID</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "mailbox",
"description": "<p>Mailbox unique ID. Special use folders and INBOX can not be deleted</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"Mailbox deletion failed with code CANNOT\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i -XDELETE http://localhost:8080/users/59fc66a03e54454869460e45/mailboxes/5a1d2816153888cdcd62a715",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/mailboxes.js",
"groupTitle": "Mailboxes"
},
{
"type": "get",
"url": "/users/:user/mailboxes/:mailbox",
"title": "Request Mailbox information",
"name": "GetMailbox",
"group": "Mailboxes",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "user",
"description": "<p>Users unique ID</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "mailbox",
"description": "<p>Mailbox unique ID</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>Mailbox ID</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "name",
"description": "<p>Name for the mailbox (unicode string)</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "path",
"description": "<p>Full path of the mailbox, folders are separated by slashes, ends with the mailbox name (unicode string)</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "specialUse",
"description": "<p>Either special use identifier or <code>null</code>. One of <code>\\Drafts</code>, <code>\\Junk</code>, <code>\\Sent</code> or <code>\\Trash</code></p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "modifyIndex",
"description": "<p>Modification sequence number. Incremented on every change in the mailbox.</p>"
},
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "subscribed",
"description": "<p>Mailbox subscription status. IMAP clients may unsubscribe from a folder.</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "total",
"description": "<p>How many messages are stored in this mailbox</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "unseen",
"description": "<p>How many unseen messages are stored in this mailbox</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": " HTTP/1.1 200 OK\n{\n \"success\": true,\n \"id\": \"59fc66a03e54454869460e46\",\n \"name\": \"INBOX\",\n \"path\": \"INBOX\",\n \"specialUse\": null,\n \"modifyIndex\": 1808,\n \"subscribed\": true,\n \"total\": 20,\n \"unseen\": 2\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"This mailbox does not exist\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i http://localhost:8080/users/59fc66a03e54454869460e45/mailboxes/59fc66a03e54454869460e46",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/mailboxes.js",
"groupTitle": "Mailboxes"
},
{
"type": "get",
"url": "/users/:user/mailboxes",
"title": "List Mailboxes for an User",
"name": "GetMailboxes",
"group": "Mailboxes",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "user",
"description": "<p>Users unique ID</p>"
},
{
"group": "Parameter",
"type": "Boolean",
"optional": true,
"field": "counters",
"defaultValue": "false",
"description": "<p>Should the response include counters (total + unseen). Counters come with some overhead.</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
},
{
"group": "Success 200",
"type": "Object[]",
"optional": false,
"field": "results",
"description": "<p>List of user mailboxes</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.id",
"description": "<p>Mailbox ID</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.name",
"description": "<p>Name for the mailbox (unicode string)</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.path",
"description": "<p>Full path of the mailbox, folders are separated by slashes, ends with the mailbox name (unicode string)</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.specialUse",
"description": "<p>Either special use identifier or <code>null</code>. One of <code>\\Drafts</code>, <code>\\Junk</code>, <code>\\Sent</code> or <code>\\Trash</code></p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "results.modifyIndex",
"description": "<p>Modification sequence number. Incremented on every change in the mailbox.</p>"
},
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "results.subscribed",
"description": "<p>Mailbox subscription status. IMAP clients may unsubscribe from a folder.</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "results.total",
"description": "<p>How many messages are stored in this mailbox</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "results.unseen",
"description": "<p>How many unseen messages are stored in this mailbox</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"results\": [\n {\n \"id\": \"59fc66a03e54454869460e46\",\n \"name\": \"INBOX\",\n \"path\": \"INBOX\",\n \"specialUse\": null,\n \"modifyIndex\": 1808,\n \"subscribed\": true,\n \"total\": 20,\n \"unseen\": 2\n },\n {\n \"id\": \"59fc66a03e54454869460e47\",\n \"name\": \"Sent Mail\",\n \"path\": \"Sent Mail\",\n \"specialUse\": \"\\\\Sent\",\n \"modifyIndex\": 145,\n \"subscribed\": true,\n \"total\": 15,\n \"unseen\": 0\n }\n ]\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"This mailbox does not exist\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i http://localhost:8080/users/59fc66a03e54454869460e45/mailboxes?counters=true",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/mailboxes.js",
"groupTitle": "Mailboxes"
},
{
"type": "post",
"url": "/users/:user/mailboxes",
"title": "Create new Mailbox",
"name": "PostMailboxes",
"group": "Mailboxes",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "user",
"description": "<p>Users unique ID</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "path",
"description": "<p>Full path of the mailbox, folders are separated by slashes, ends with the mailbox name (unicode string)</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "retention",
"defaultValue": "0",
"description": "<p>Retention policy for the created Mailbox. Milliseconds after a message added to mailbox expires. Set to 0 to disable.</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>Mailbox ID</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"id\": \"5a1d2816153888cdcd62a715\"\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"Mailbox creation failed with code ALREADYEXISTS\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i -XPOST http://localhost:8080/users/59fc66a03e54454869460e45/mailboxes \\\n-H 'Content-type: application/json' \\\n-d '{\n \"path\": \"First Level/Second 😎 Level/Folder Name\"\n}'",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/mailboxes.js",
"groupTitle": "Mailboxes"
},
{
"type": "put",
"url": "/users/:user/mailboxes/:mailbox",
"title": "Update Mailbox information",
"name": "PutMailbox",
"group": "Mailboxes",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "user",
"description": "<p>Users unique ID</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "mailbox",
"description": "<p>Mailbox unique ID</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "path",
"description": "<p>Full path of the mailbox, use this to rename an existing Mailbox</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "retention",
"description": "<p>Retention policy for the created Mailbox. Chaning retention value only affects messages added to this folder after the change</p>"
},
{
"group": "Parameter",
"type": "Boolean",
"optional": true,
"field": "subscribed",
"description": "<p>Change Mailbox subscription state</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"Mailbox update failed with code ALREADYEXISTS\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i -XPUT http://localhost:8080/users/59fc66a03e54454869460e45/mailboxes/5a1d2816153888cdcd62a715 \\\n-H 'Content-type: application/json' \\\n-d '{\n \"path\": \"Updated Folder Name\"\n}'",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/mailboxes.js",
"groupTitle": "Mailboxes"
},
{
"type": "delete",
"url": "/users/:id",
"title": "Delete an User",
"name": "DeleteUser",
"group": "Users",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>Users unique ID.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "sess",
"description": "<p>Session identifier for the logs</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "ip",
"description": "<p>IP address for the logs</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"This user does not exist\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i -XDELETE http://localhost:8080/users/5a1bda70bfbd1442cd96c6f0?ip=127.0.0.1",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/users.js",
"groupTitle": "Users"
},
{
"type": "get",
"url": "/users/:id/updates",
"title": "Open change stream",
"name": "GetUpdates",
"group": "Users",
"description": "<p>This api call returns an EventSource response. Listen on this stream to get notifications about changes in messages and mailboxes. Returned events are JSON encoded strings</p>",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>Users unique ID.</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "command",
"description": "<p>Indicates data event type</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\nContent-Type: text/event-stream\n\ndata: {\ndata: \"command\": \"CREATE\",\ndata: \"mailbox\": \"5a1d3061153888cdcd62a719\",\ndata: \"path\": \"First Level/Second 😎 Level/Folder Name\"\ndata: }",
"type": "text"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"This user does not exist\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "var stream = new EventSource('/users/59fc66a03e54454869460e45/updates');\nstream.onmessage = function(e) {\n console.log(JSON.parse(e.data));\n};",
"type": "javascript"
}
],
"version": "0.0.0",
"filename": "lib/api/updates.js",
"groupTitle": "Users"
},
{
"type": "get",
"url": "/users/:id",
"title": "Request User information",
"name": "GetUser",
"group": "Users",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>Users unique ID.</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>Users unique ID (24 byte hex)</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "username",
"description": "<p>Username of the User</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "name",
"description": "<p>Name of the User</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "address",
"description": "<p>Main email address of the User</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "retention",
"description": "<p>Default retention time in ms. <code>false</code> if not enabled</p>"
},
{
"group": "Success 200",
"type": "String[]",
"optional": false,
"field": "enabled2fa",
"description": "<p>List of enabled 2FA methods</p>"
},
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "encryptMessages",
"description": "<p>If <code>true</code> then received messages are encrypted</p>"
},
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "encryptForwarded",
"description": "<p>If <code>true</code> then forwarded messages are encrypted</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "pubKey",
"description": "<p>Public PGP key for the User that is used for encryption</p>"
},
{
"group": "Success 200",
"type": "Object",
"optional": false,
"field": "keyInfo",
"description": "<p>Information about public key or <code>false</code> if key is not available</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "keyInfo.name",
"description": "<p>Name listed in public key</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "keyInfo.address",
"description": "<p>E-mail address listed in public key</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "keyInfo.fingerprint",
"description": "<p>Fingerprint of the public key</p>"
},
{
"group": "Success 200",
"type": "String[]",
"optional": false,
"field": "forward",
"description": "<p>A list of email addresses to forward all incoming emails</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "targetUrl",
"description": "<p>An URL to post all incoming emails</p>"
},
{
"group": "Success 200",
"type": "Object",
"optional": false,
"field": "limits",
"description": "<p>Account limits and usage</p>"
},
{
"group": "Success 200",
"type": "Object",
"optional": false,
"field": "limits.quota",
"description": "<p>Quota usage limits</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "limits.quota.allowed",
"description": "<p>Allowed quota of the user in bytes</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "limits.quota.used",
"description": "<p>Space used in bytes</p>"
},
{
"group": "Success 200",
"type": "Object",
"optional": false,
"field": "limits.recipients",
"description": "<p>Sending quota</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "limits.recipients.allowed",
"description": "<p>How many messages per 24 hour can be sent</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "limits.recipients.used",
"description": "<p>How many messages are sent during current 24 hour period</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "limits.recipients.ttl",
"description": "<p>Time until the end of current 24 hour period</p>"
},
{
"group": "Success 200",
"type": "Object",
"optional": false,
"field": "limits.forwards",
"description": "<p>Forwarding quota</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "limits.forwards.allowed",
"description": "<p>How many messages per 24 hour can be forwarded</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "limits.forwards.used",
"description": "<p>How many messages are forwarded during current 24 hour period</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "limits.forwards.ttl",
"description": "<p>Time until the end of current 24 hour period</p>"
},
{
"group": "Success 200",
"type": "String[]",
"optional": false,
"field": "tags",
"description": "<p>List of tags associated with the User</p>"
},
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "hasPasswordSet",
"description": "<p>If <code>true</code> then the User has a password set and can authenticate</p>"
},
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "activated",
"description": "<p>Is the account activated</p>"
},
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "disabled",
"description": "<p>If <code>true</code> then the user can not authenticate or receive any new mail</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"id\": \"59fc66a03e54454869460e45\",\n \"username\": \"testuser01\",\n \"name\": null,\n \"address\": \"testuser01@example.com\",\n \"retention\": false,\n \"enabled2fa\": [],\n \"encryptMessages\": false,\n \"encryptForwarded\": false,\n \"pubKey\": \"\",\n \"keyInfo\": false,\n \"forward\": [],\n \"targetUrl\": \"\",\n \"limits\": {\n \"quota\": {\n \"allowed\": 107374182400,\n \"used\": 289838\n },\n \"recipients\": {\n \"allowed\": 2000,\n \"used\": 0,\n \"ttl\": false\n },\n \"forwards\": {\n \"allowed\": 2000,\n \"used\": 0,\n \"ttl\": false\n }\n },\n \"tags\": [\"green\", \"blue\"],\n \"hasPasswordSet\": true,\n \"activated\": true,\n \"disabled\": false\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"This user does not exist\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i http://localhost:8080/users/59fc66a03e54454869460e45",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/users.js",
"groupTitle": "Users"
},
{
"type": "get",
"url": "/users",
"title": "List registered Users",
"name": "GetUsers",
"group": "Users",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "query",
"description": "<p>Partial match of username or default email address</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "tags",
"description": "<p>Comma separated list of tags. The User must have at least one to be set</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "requiredTags",
"description": "<p>Comma separated list of tags. The User must have all listed tags to be set</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "limit",
"defaultValue": "20",
"description": "<p>How many records to return</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "page",
"defaultValue": "1",
"description": "<p>Current page number. Informational only, page numbers start from 1</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "next",
"description": "<p>Cursor value for next page, retrieved from <code>nextCursor</code> response value</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "previous",
"description": "<p>Cursor value for previous page, retrieved from <code>previousCursor</code> response value</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "total",
"description": "<p>How many results were found</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "page",
"description": "<p>Current page number. Derived from <code>page</code> query argument</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "previousCursor",
"description": "<p>Either a cursor string or false if there are not any previous results</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "nextCursor",
"description": "<p>Either a cursor string or false if there are not any next results</p>"
},
{
"group": "Success 200",
"type": "Object[]",
"optional": false,
"field": "results",
"description": "<p>User listing</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.id",
"description": "<p>Users unique ID (24 byte hex)</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.username",
"description": "<p>Username of the User</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.name",
"description": "<p>Name of the User</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "results.address",
"description": "<p>Main email address of the User</p>"
},
{
"group": "Success 200",
"type": "String[]",
"optional": false,
"field": "results.tags",
"description": "<p>List of tags associated with the User'</p>"
},
{
"group": "Success 200",
"type": "String[]",
"optional": false,
"field": "results.forward",
"description": "<p>A list of email addresses to forward all incoming emails</p>"
},
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "results.encryptMessages",
"description": "<p>If <code>true</code> then received messages are encrypted</p>"
},
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "results.encryptForwarded",
"description": "<p>If <code>true</code> then forwarded messages are encrypted</p>"
},
{
"group": "Success 200",
"type": "Object",
"optional": false,
"field": "results.quota",
"description": "<p>Quota usage limits</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "results.quota.allowed",
"description": "<p>Allowed quota of the user in bytes</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "results.quota.used",
"description": "<p>Space used in bytes</p>"
},
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "results.hasPasswordSet",
"description": "<p>If <code>true</code> then the User has a password set and can authenticate</p>"
},
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "results.activated",
"description": "<p>Is the account activated</p>"
},
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "results.disabled",
"description": "<p>If <code>true</code> then the user can not authenticate or receive any new mail</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"total\": 1,\n \"page\": 1,\n \"previousCursor\": false,\n \"nextCursor\": false,\n \"results\": [\n {\n \"id\": \"59cb948ad80a820b68f05230\",\n \"username\": \"myuser\",\n \"name\": \"John Doe\",\n \"address\": \"john@example.com\",\n \"tags\": [],\n \"forward\": [],\n \"encryptMessages\": false,\n \"encryptForwarded\": false,\n \"quota\": {\n \"allowed\": 1073741824,\n \"used\": 17799833\n },\n \"hasPasswordSet\": true,\n \"activated\": true,\n \"disabled\": false\n }\n ]\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"Database error\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i http://localhost:8080/users",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/users.js",
"groupTitle": "Users"
},
{
"type": "post",
"url": "/users",
"title": "Create new user",
"name": "PostUser",
"group": "Users",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "name",
"description": "<p>Username of the User</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "password",
"description": "<p>New password for the account</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "address",
"description": "<p>Default email address for the User (autogenerated if not set)</p>"
},
{
"group": "Parameter",
"type": "Boolean",
"optional": true,
"field": "emptyAddress",
"description": "<p>If true then do not autogenerate missing email address for the User. Only needed if you want to create an user account that does not have any email address associated</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "retention",
"description": "<p>Default retention time in ms. Set to <code>0</code> to disable</p>"
},
{
"group": "Parameter",
"type": "Boolean",
"optional": true,
"field": "encryptMessages",
"description": "<p>If <code>true</code> then received messages are encrypted</p>"
},
{
"group": "Parameter",
"type": "Boolean",
"optional": true,
"field": "encryptForwarded",
"description": "<p>If <code>true</code> then forwarded messages are encrypted</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "pubKey",
"description": "<p>Public PGP key for the User that is used for encryption. Use empty string to remove the key</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "language",
"description": "<p>Language code for the User</p>"
},
{
"group": "Parameter",
"type": "String[]",
"optional": true,
"field": "forward",
"description": "<p>A list of email addresses to forward all incoming emails</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "targetUrl",
"description": "<p>An URL to post all incoming emails</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "quota",
"description": "<p>Allowed quota of the user in bytes</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "recipients",
"description": "<p>How many messages per 24 hour can be sent</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "forwards",
"description": "<p>How many messages per 24 hour can be forwarded</p>"
},
{
"group": "Parameter",
"type": "Boolean",
"optional": true,
"field": "disabled",
"description": "<p>If true then disables user account (can not login, can not receive messages)</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "sess",
"description": "<p>Session identifier for the logs</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "ip",
"description": "<p>IP address for the logs</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>ID for the created User</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"id\": \"5a1bda70bfbd1442cd96c6f0\"\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"This username already exists\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i -XPOST http://localhost:8080/users \\\n-H 'Content-type: application/json' \\\n-d '{\n \"username\": \"myuser\",\n \"password\": \"verysecret\",\n \"name\": \"John Doe\"\n}'",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/users.js",
"groupTitle": "Users"
},
{
"type": "post",
"url": "/users/:id/quota/reset",
"title": "Recalculate User quota",
"name": "PostUserQuota",
"group": "Users",
"description": "<p>This method recalculates quota usage for an User. Normally not needed, only use it if quota numbers are way off. This method is not transactional, so if the user is currently receiving new messages then the resulting value is not exact.</p>",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>Users unique ID.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "reason",
"description": "<p>Message to be shown to connected IMAP client</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "storageUsed",
"description": "<p>Calculated quota usage for the user</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"storageUsed\": 1234567\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"This user does not exist\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i -XPOST http://localhost:8080/users/59fc66a03e54454869460e45/quota/reset \\\n-H 'Content-type: application/json' \\\n-d '{}'",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/users.js",
"groupTitle": "Users"
},
{
"type": "put",
"url": "/users/:id",
"title": "Update User information",
"name": "PutUser",
"group": "Users",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>Users unique ID.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "name",
"description": "<p>Name of the User</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "existingPassword",
"description": "<p>If provided then validates against account password before applying any changes</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "password",
"description": "<p>New password for the account</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "retention",
"description": "<p>Default retention time in ms. Set to <code>0</code> to disable</p>"
},
{
"group": "Parameter",
"type": "Boolean",
"optional": true,
"field": "encryptMessages",
"description": "<p>If <code>true</code> then received messages are encrypted</p>"
},
{
"group": "Parameter",
"type": "Boolean",
"optional": true,
"field": "encryptForwarded",
"description": "<p>If <code>true</code> then forwarded messages are encrypted</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "pubKey",
"description": "<p>Public PGP key for the User that is used for encryption. Use empty string to remove the key</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "language",
"description": "<p>Language code for the User</p>"
},
{
"group": "Parameter",
"type": "String[]",
"optional": true,
"field": "forward",
"description": "<p>A list of email addresses to forward all incoming emails</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "targetUrl",
"description": "<p>An URL to post all incoming emails</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "quota",
"description": "<p>Allowed quota of the user in bytes</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "recipients",
"description": "<p>How many messages per 24 hour can be sent</p>"
},
{
"group": "Parameter",
"type": "Number",
"optional": true,
"field": "forwards",
"description": "<p>How many messages per 24 hour can be forwarded</p>"
},
{
"group": "Parameter",
"type": "Boolean",
"optional": true,
"field": "disabled",
"description": "<p>If true then disables user account (can not login, can not receive messages)</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "sess",
"description": "<p>Session identifier for the logs</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "ip",
"description": "<p>IP address for the logs</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"This user does not exist\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i -XPUT http://localhost:8080/users/59fc66a03e54454869460e45 \\\n-H 'Content-type: application/json' \\\n-d '{\n \"name\": \"Updated user name\"\n}'",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/users.js",
"groupTitle": "Users"
},
{
"type": "put",
"url": "/users/:id/logout",
"title": "Log out User",
"name": "PutUserLogout",
"group": "Users",
"description": "<p>This method logs out all user sessions in IMAP</p>",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>Users unique ID.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "reason",
"description": "<p>Message to be shown to connected IMAP client</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"This user does not exist\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i -XPUT http://localhost:8080/users/59fc66a03e54454869460e45/logout \\\n-H 'Content-type: application/json' \\\n-d '{\n \"reason\": \"Logout requested from API\"\n}'",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/users.js",
"groupTitle": "Users"
},
{
"type": "post",
"url": "/users/:id/password/reset",
"title": "Reset password for an User",
"name": "ResetUserPassword",
"group": "Users",
"description": "<p>This method generates a new temporary password for an User. Additionally it removes all two-factor authentication settings</p>",
"header": {
"fields": {
"Header": [
{
"group": "Header",
"type": "String",
"optional": false,
"field": "X-Access-Token",
"description": "<p>Optional access token if authentication is enabled</p>"
}
]
},
"examples": [
{
"title": "Header-Example:",
"content": "{\n \"X-Access-Token\": \"59fc66a03e54454869460e45\"\n}",
"type": "json"
}
]
},
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>Users unique ID.</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "sess",
"description": "<p>Session identifier for the logs</p>"
},
{
"group": "Parameter",
"type": "String",
"optional": true,
"field": "ip",
"description": "<p>IP address for the logs</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Boolean",
"optional": false,
"field": "success",
"description": "<p>Indicates successful response</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "password",
"description": "<p>Temporary password</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"success\": true,\n \"password\": \"temporarypass\"\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"optional": false,
"field": "error",
"description": "<p>Description of the error</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 200 OK\n{\n \"error\": \"This user does not exist\"\n}",
"type": "json"
}
]
},
"examples": [
{
"title": "Example usage:",
"content": "curl -i -XPOST http://localhost:8080/users/5a1bda70bfbd1442cd96/password/reset \\\n-H 'Content-type: application/json' \\\n-d '{\n \"ip\": \"127.0.0.1\"\n}'",
"type": "curl"
}
],
"version": "0.0.0",
"filename": "lib/api/users.js",
"groupTitle": "Users"
}
]