The Flowmailer API is a RESTful API. Everything you can manipulate is a resource with its own unique URL. The API calls are identified by their resource URL and HTTP method.
The following HTTP methods are used:GET
for retrieving a resourcePUT
for updating a resourcePOST
for creating a resourceDELETE
for deleting a resourceThe requests and responses for all requests (except the OAuth2 authentication calls) are in JSON format. There is no guarantee about the field ordering in JSON responses.
All requests should contain the Accept
header with value application/vnd.flowmailer.v1.12+json
.
The OAuth2 authentication requests are in application/x-www-form-urlencoded
format. The authentication responses are in JSON format.
OAuth2 https | https://login.flowmailer.net |
---|---|
http | http://api.flowmailer.net |
https | https://api.flowmailer.net |
Name | Format | Example | Description |
---|---|---|---|
integer | 12640 | A whole number | |
boolean | true, false | true | |
string | Test flow | Text string | |
base64 | RXhhbXBsZQo= | Base64 encoded binary data as described by rfc4648 | |
items_range | items={start}-{end} | items=0-10 | Range header |
ref_range | items={reference}:{count} | items=:10 or items=REFERENCE:10 | Range header |
content_range (when call used items_range) | items {start}-{end}/{total} | items 0-10/22 or items 0-10/>10000 | Content-Range header |
content_range (when call used ref_range) | items {startref}:{endref}/* | items REFERENCE:REFERENCE/* | Content-Range header |
date | yyyy-MM-dd'T'HH:mm:ssZZ | 2014-12-16T05:50:11Z | ISO8601 datetime format without milliseconds |
date_range | yyyy-MM-dd'T'HH:mm:ssZZ,yyyy-MM-dd'T'HH:mm:ssZZ | 2014-12-16T05:50:00Z,2014-12-16T06:00:00Z | Start and end date in ISO8601 format (without milliseconds) separated by a comma. Start date is inclusive and end date is exclusive. |
The Flowmailer REST API uses request parameters in different locations: path, matrix, query, form and body.
Arrays (types ending with []) in path and matrix parameters should be structured as comma-separated values.
Path parameters appear in the URL path component as a complete path segment.
Example url with path parameter with value123
:http://api.flowmailer.net/123/flows
Matrix parameters appear in the URL path component, at the end of a path segment and begin with a semicolon (;). Matrix parameters are separated by a semicolon (;), each parameter is a name value pair separated by an equal sign (=).
Example url with matrix parameterdaterange
with value 2014-12-16T05:50:00Z,2014-12-16T06:00:00Z
:http://api.flowmailer.net/123/messages;daterange=2014-12-16T05:50:00Z,2014-12-16T06:00:00Z
Query parameters appear in the URL query component, the query component starts with a question mark (?). Query parameters separated by ampersand (&), each parameter is a name value pair separated by an equal sign (=).
Example url with query parameteraddreturns
with value true
:http://api.flowmailer.net/123/messages?addreturns=true
Form parameters do not appear in the URL. They are encoded as application/x-www-form-urlencoded
and supplied as request body.
grant_type
with value client_credentials
and scope
with value api
:grant_type=client_credentials&scope=api
There can only be one body parameter per request and it is an model object encoded as json and supplied as the request body.
The Content-Type
header for the request should be application/vnd.flowmailer.v1.12+json
.
{
"name" : "value",
"name2" : "value2"
}
All API responses are in JSON format and have the with mime type application/vnd.flowmailer.v1.12+json
.
HTTP Status code | Extra headers | Description |
---|---|---|
200 Ok | Used to indicate that the request was successful | |
201 Created | Location header |
Used to indicate that the response contains a Location header with the URL of the newly created API resource |
206 Partial Content | Content-Range and Next-Range header |
Used as indication that a subset of the requested data is returned. Only applicable to requests with the Range header |
HTTP Status code | Description | Extra headers | Response Model |
---|---|---|---|
400 | Bad Request | Errors | |
403 | Forbidden | Exception | |
404 | Not Found | Exception | |
401 | Unauthorized, reason is specified in the WWW-Authenticate header and response body, used for example when the access token is expired |
WWW-Authenticate header |
OAuthErrorResponse |
500 | Internal Server Error |
The Flowmailer REST API requires authentication using OAuth 2. A full specification for OAuth 2 is available in rfc6749.
Supported authentication types:
To use the Flowmailer API, an access token must be requested using the client id and secret.
The access token must be included with every API call in the Authorization
header using authentication scheme Bearer
.
Access tokens are valid for 1 minute. When an access token expires, API calls using that token will result in a 401 Unauthorized
http response.
The 401
response will have a JSON encoded response body of type OAuthErrorResponse with error invalid_token
.
This response signals that the current access token is expired or invalid and a new access token should be requested.
Authorization
header:
Authorization: Bearer e600a31c-cf8f-4c0a-8f26-386c555f6a54
401 Unauthorized
This call is used to request an access token using the client id and secret provided by flowmailer.
The form parameters must be posted in application/x-www-form-urlencoded
format. But the response will be in JSON format.
Type | URL format |
---|---|
POST | https://login.flowmailer.net/oauth/token |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
client_id | form | string | yes | The API client id provided by Flowmailer | |
client_secret | form | string | yes | The API client secret provided by Flowmailer | |
grant_type | form | string | yes | must be client_credentials |
|
scope | form | string | no | api | Must be absent or api |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | OAuthTokenResponse | The request was successfull, the access token can be found in the JSON encoded response | |
400 | OAuthErrorResponse | Bad Request, could also be an text/html response if the credentials are invalid |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'POST',
'header' =>
array (
'Accept: application/vnd.flowmailer.v1.12+json',
'Content-Type: application/x-www-form-urlencoded',
),
'content' => http_build_query(
array (
'client_id' => $client_id,
'client_secret' => $client_secret,
'grant_type' => $grant_type,
'scope' => $scope,
)
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://login.flowmailer.net/oauth/token',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Get flow rule list for all event flows
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/event_flow_rules |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | FlowRuleItem[] |
GET /520/event_flow_rules HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
[ ]
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/event_flow_rules',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Get flow rule list for all event flows
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/event_flow_rules/hierarchy |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | FlowRuleHierarchyItem[] |
GET /520/event_flow_rules/hierarchy HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
[ ]
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/event_flow_rules/hierarchy',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
List flows per account
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/event_flows |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | EventFlow[] |
GET /520/event_flows HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
[ ]
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/event_flows',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Create a new flow
Type | URL format |
---|---|
POST | https://api.flowmailer.net/{account_id}/event_flows |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
body | body | EventFlow | yes | Flow object |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
201 | Location |
Name | Type | HTTP status code | Description |
---|---|---|---|
Location | url | 201 | Contains the URL of the newly created API resource |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'POST',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
'Content-Type: application/vnd.flowmailer.v1.12+json',
),
'content' => json_encode($requestbody),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/event_flows',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Delete flow by id
Type | URL format |
---|---|
DELETE | https://api.flowmailer.net/{account_id}/event_flows/{event_flow_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
event_flow_id | path | string | yes | Flow ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'DELETE',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/event_flows/'.$event_flow_id.'',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Get flow by id
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/event_flows/{event_flow_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
event_flow_id | path | string | yes | Flow ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | EventFlow |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/event_flows/'.$event_flow_id.'',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Save flow
Type | URL format |
---|---|
PUT | https://api.flowmailer.net/{account_id}/event_flows/{event_flow_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
body | body | EventFlow | yes | Flow object |
|
event_flow_id | path | string | yes | Flow ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | EventFlow |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'PUT',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/event_flows/'.$event_flow_id.'',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Get flow conditions for a flow
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/event_flows/{event_flow_id}/rule |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
event_flow_id | path | string | yes | Flow ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | EventFlowRuleSimple |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/event_flows/'.$event_flow_id.'/rule',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Set conditions for a flow
Type | URL format |
---|---|
PUT | https://api.flowmailer.net/{account_id}/event_flows/{event_flow_id}/rule |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
body | body | EventFlowRuleSimple | yes | Flow conditions |
|
event_flow_id | path | string | yes | Flow ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'PUT',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/event_flows/'.$event_flow_id.'/rule',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
List filters per account
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/filters |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
daterange | matrix | date_range | no | Date range the filter was added in |
|
range | header | ref_range | yes | Limits the returned list |
|
sortorder | query | string | no |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
206 | Filter[] | Content-Range, Next-Range |
Name | Type | HTTP status code | Description |
---|---|---|---|
Content-Range | content_range | 206 | Used to specify which subset of the requested data is returned |
Next-Range | ref_range | 206 | Used to specify the range that should be used in the next api call |
GET /520/filters;daterange=2021-06-11T00:00:00Z,2021-06-12T00:00:00Z HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
Range: items=:10
HTTP/1.1 206 Partial Content Content-Range: items :10/* Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
[ ]
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
'range: '.$range,
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/filters'
.';'.http_build_query(array(
'daterange' => $daterange,
), '', ';')
.'?'.http_build_query(array(
'sortorder' => $sortorder,
)),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Delete a recipient from the filter
Type | URL format |
---|---|
DELETE | https://api.flowmailer.net/{account_id}/filters/{filter_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
filter_id | path | string | yes | Filter ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'DELETE',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/filters/'.$filter_id.'',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Get flow rule list for all flows
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/flow_rules |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | FlowRuleItem[] |
GET /520/flow_rules HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
[ { "flow" : { "id" : "16773", "description" : "BCC messages" }, "conditions" : [ { "type" : "sourceId", "name" : null, "value" : "6937", "matchType" : null }, { "type" : "header", "name" : "X-Flowmailer", "value" : "bccmail", "matchType" : null } ] }, { "flow" : { "id" : "16774", "description" : "Re-sent messages" }, "conditions" : [ { "type" : "sourceId", "name" : null, "value" : "6937", "matchType" : null }, { "type" : "header", "name" : "X-Flowmailer", "value" : "resend", "matchType" : null } ] }, { "flow" : { "id" : "16799", "description" : "test flow 1 (updated)" }, "conditions" : [ { "type" : "sourceId", "name" : null, "value" : "6952", "matchType" : null }, { "type" : "header", "name" : "X-Flow", "value" : "flow1", "matchType" : null } ] }, { "flow" : { "id" : "16811", "description" : "test flow 2" }, "conditions" : [ { "type" : "sourceId", "name" : null, "value" : "6952", "matchType" : null }, { "type" : "header", "name" : "X-Flow", "value" : "flow2", "matchType" : null } ] }, { "flow" : { "id" : "16772", "description" : "Default" }, "conditions" : [ ] } ]
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/flow_rules',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
List flow templates per account
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/flow_templates |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | FlowTemplate[] |
GET /520/flow_templates HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
[ { "id" : "3122", "templateId" : "1", "description" : "Default", "steps" : null, "editable" : true }, { "id" : "1", "templateId" : null, "description" : "System Default", "steps" : null, "editable" : false } ]
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/flow_templates',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
List flows per account
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/flows |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
statistics | query | boolean | no | true | Whether to return statistics per flow |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | Flow[] |
GET /520/flows?statistics=false HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
[ { "id" : "16773", "templateId" : "3122", "description" : "BCC messages", "steps" : null }, { "id" : "16772", "templateId" : "3122", "description" : "Default", "steps" : null }, { "id" : "16774", "templateId" : "3122", "description" : "Re-sent messages", "steps" : null }, { "id" : "16799", "templateId" : "3122", "description" : "test flow 1 (updated)", "steps" : null }, { "id" : "16811", "templateId" : "3122", "description" : "test flow 2", "steps" : null } ]
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/flows'
.';'.http_build_query(array(
), '', ';')
.'?'.http_build_query(array(
'statistics' => $statistics,
)),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Create a new flow
Type | URL format |
---|---|
POST | https://api.flowmailer.net/{account_id}/flows |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
body | body | Flow | yes | Flow object |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
201 | Location |
Name | Type | HTTP status code | Description |
---|---|---|---|
Location | url | 201 | Contains the URL of the newly created API resource |
POST /520/flows HTTP/1.1 Host: api.flowmailer.net Authorization: Bearer {access_token} Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8 Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
{ "description" : "test flow 2", "steps" : [ { "template" : { "id" : "48680" }, "type" : "template" }, { "archive" : { "onlineLink" : true }, "type" : "archive" } ], "templateId" : "3122" }
HTTP/1.1 201 Created
Location: https://api.flowmailer.net/520/flows/16811
Content-Length: 0
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'POST',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
'Content-Type: application/vnd.flowmailer.v1.12+json',
),
'content' => json_encode($requestbody),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/flows',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Delete flow by id
Type | URL format |
---|---|
DELETE | https://api.flowmailer.net/{account_id}/flows/{flow_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
flow_id | path | string | yes | Flow ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'DELETE',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/flows/'.$flow_id.'',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Get flow by id
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/flows/{flow_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
flow_id | path | string | yes | Flow ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | Flow |
GET /520/flows/16811 HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
{ "id" : "16811", "templateId" : "3122", "description" : "test flow 2", "steps" : [ { "type" : "template", "id" : "49749", "template" : { "id" : "48680", "description" : "template 2" } }, { "type" : "archive", "id" : "49750", "archive" : { "onlineLink" : true } } ] }
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/flows/'.$flow_id.'',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Save flow
Type | URL format |
---|---|
PUT | https://api.flowmailer.net/{account_id}/flows/{flow_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
body | body | Flow | yes | Flow object |
|
flow_id | path | string | yes | Flow ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | Flow |
PUT /520/flows/16799 HTTP/1.1 Host: api.flowmailer.net Authorization: Bearer {access_token} Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8 Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
{ "description" : "test flow 1 (updated)", "steps" : [ { "template" : { "id" : "48675" }, "type" : "template" }, { "archive" : { "onlineLink" : true }, "type" : "archive" } ], "templateId" : "3122" }
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
{ "id" : "16799", "templateId" : "3122", "description" : "test flow 1 (updated)", "steps" : [ { "type" : "template", "id" : "49726", "template" : { "id" : "48675", "description" : "template 1" } }, { "type" : "archive", "id" : "49727", "archive" : { "onlineLink" : true } } ] }
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'PUT',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/flows/'.$flow_id.'',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
List messages per flow
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/flows/{flow_id}/messages |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
addheaders | query | boolean | no | false | Whether to add e-mail headers |
addonlinelink | query | boolean | no | false | |
addtags | query | boolean | no | false | |
daterange | matrix | date_range | yes | Date range the message was submitted in |
|
flow_id | path | string | yes | Flow ID |
|
range | header | items_range | yes | Limits the returned list |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
206 | Message[] | Content-Range, Next-Range |
Name | Type | HTTP status code | Description |
---|---|---|---|
Content-Range | content_range | 206 | Used to specify which subset of the requested data is returned |
Next-Range | ref_range | 206 | Used to specify the range that should be used in the next api call |
GET /520/flows/16811/messages;daterange=2021-06-11T00:00:00Z,2021-06-12T00:00:00Z?addheaders=true&addonlinelink=true HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
Range: items=0-10
HTTP/1.1 206 Partial Content Content-Range: items 0-10/2 Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
[ { "submitted" : "2021-06-11T09:44:46.000Z", "id" : "20210611094446f5938cdb6938051b5f", "transactionId" : "c3cbcbf8d4584f98a0124e661eb958b5", "messageIdHeader" : "<20210611094446f5938cdb6938051b5f@return.flowmailer.local>", "messageType" : "EMAIL", "source" : { "id" : "6952", "description" : "test source a" }, "flow" : { "id" : "16811", "description" : "test flow 2" }, "senderAddress" : "support@flowmailer.local", "recipientAddress" : "richard@flowmailer.local", "backendStart" : "2021-06-11T09:45:00.309Z", "backendDone" : "2021-06-11T09:45:00.784Z", "headersIn" : [ { "name" : "MIME-Version", "value" : "1.0" }, { "name" : "From", "value" : "Casper Mout <casper@flowmailer.local>" }, { "name" : "To", "value" : "Richard van Looijen <richard@flowmailer.local>" }, { "name" : "X-Flow", "value" : "flow2" }, { "name" : "Subject", "value" : "test message 2" }, { "name" : "Content-Type", "value" : "text/plain; charset=UTF-8" }, { "name" : "Content-Transfer-Encoding", "value" : "quoted-printable" } ], "headersOut" : [ { "name" : "MIME-Version", "value" : "1.0" }, { "name" : "From", "value" : "Casper Mout <casper@flowmailer.local>" }, { "name" : "To", "value" : "Richard van Looijen <richard@flowmailer.local>" }, { "name" : "X-Flow", "value" : "flow2" }, { "name" : "Subject", "value" : "test message 2" }, { "name" : "Content-Type", "value" : "text/plain; charset=UTF-8" }, { "name" : "Content-Transfer-Encoding", "value" : "quoted-printable" }, { "name" : "Feedback-ID", "value" : "520:520-6952:520-16811:flowmailer" }, { "name" : "Message-ID", "value" : "<20210611094446f5938cdb6938051b5f@return.flowmailer.local>" }, { "name" : "Date", "value" : "Fri, 11 Jun 2021 09:45:00 +0000" }, { "name" : "X-Job", "value" : "fm-6952-16811" } ], "onlineLink" : "https://web.flowmailer.net/viewonline.html?id=20210611094446637d7495fdf0190de0134c145c083a94960105ac76a53c69364dd155dac05c2c37", "status" : "DELIVERED", "subject" : "test message 2", "from" : "casper@flowmailer.local", "events" : null, "messageDetailsLink" : "https://web.flowmailer.net/viewmessage.html?id=20210611094446637d7495fdf0190de0134c145c083a94960105ac76a53c69364dd155dac05c2c37&code=99992e45240b4d64b7ea8d956499111452a1e4ae", "fromAddress" : { "name" : "Casper Mout", "address" : "casper@flowmailer.local" }, "toAddressList" : [ { "name" : "Richard van Looijen", "address" : "richard@flowmailer.local" } ] }, { "submitted" : "2021-06-11T09:44:46.000Z", "id" : "202106110944460bfd0ca81fd281ef9e", "transactionId" : "d3058c5f23964b09a3ea90bad2d231b6", "messageIdHeader" : null, "messageType" : "EMAIL", "source" : { "id" : "6952", "description" : "test source a" }, "flow" : { "id" : "16811", "description" : "test flow 2" }, "senderAddress" : "support@flowmailer.local", "recipientAddress" : "richard@flowmailer.local", "backendStart" : "2021-06-11T09:45:05.727Z", "backendDone" : null, "headersIn" : [ { "name" : "MIME-Version", "value" : "1.0" }, { "name" : "From", "value" : "Casper Mout <casper@flowmailer.local>" }, { "name" : "To", "value" : "Richard van Looijen <richard@flowmailer.local>" }, { "name" : "X-Flow", "value" : "flow2" }, { "name" : "Subject", "value" : "test message 3" }, { "name" : "Content-Type", "value" : "text/plain; charset=UTF-8" }, { "name" : "Content-Transfer-Encoding", "value" : "quoted-printable" } ], "status" : "ERROR", "subject" : "test message 3", "from" : "casper@flowmailer.local", "events" : null, "fromAddress" : { "name" : "Casper Mout", "address" : "casper@flowmailer.local" }, "toAddressList" : [ { "name" : "Richard van Looijen", "address" : "richard@flowmailer.local" } ] } ]
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
'range: '.$range,
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/flows/'.$flow_id.'/messages'
.';'.http_build_query(array(
'daterange' => $daterange,
), '', ';')
.'?'.http_build_query(array(
'addheaders' => $addheaders,
'addonlinelink' => $addonlinelink,
'addtags' => $addtags,
)),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Get flow conditions for a flow
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/flows/{flow_id}/rule |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
flow_id | path | string | yes | Flow ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | FlowRuleSimple |
GET /520/flows/16811/rule HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
{ "flowId" : "16811", "sourceId" : "6952", "sender" : null, "headers" : [ { "name" : "X-Flow", "value" : "flow2" } ] }
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/flows/'.$flow_id.'/rule',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Set conditions for a flow
Type | URL format |
---|---|
PUT | https://api.flowmailer.net/{account_id}/flows/{flow_id}/rule |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
body | body | FlowRuleSimple | yes | Flow conditions |
|
flow_id | path | string | yes | Flow ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 |
PUT /520/flows/16811/rule HTTP/1.1 Host: api.flowmailer.net Authorization: Bearer {access_token} Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8 Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
{ "headers" : [ { "name" : "X-Flow", "value" : "flow2" } ], "sourceId" : "6952" }
HTTP/1.1 200 OK
Content-Length: 0
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'PUT',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/flows/'.$flow_id.'/rule',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Get time based message statistics for a message flow
The resolution of the returned data may be lower than specified in the interval
parameter
if the data is old or the requested date range is too large.
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/flows/{flow_id}/stats |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
daterange | matrix | date_range | yes | Date range the messages were submitted in |
|
flow_id | path | string | yes | Flow ID |
|
interval | matrix | integer | no | Time difference between samples |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | DataSets |
GET /520/flows/16811/stats;daterange=2021-06-11T00:00:00Z,2021-06-12T00:00:00Z;interval=86400 HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
{ "list" : [ { "name" : "processed", "samples" : [ { "timestamp" : "2021-06-11T00:00:00.000Z", "value" : 1 } ] }, { "name" : "email", "samples" : [ { "timestamp" : "2021-06-11T00:00:00.000Z", "value" : 1 } ] }, { "name" : "sms", "samples" : [ { "timestamp" : "2021-06-11T00:00:00.000Z", "value" : 0 } ] }, { "name" : "sent", "samples" : [ { "timestamp" : "2021-06-11T00:00:00.000Z", "value" : 1 } ] }, { "name" : "delivered", "samples" : [ { "timestamp" : "2021-06-11T00:00:00.000Z", "value" : 1 } ] }, { "name" : "deliver_time", "samples" : [ { "timestamp" : "2021-06-11T00:00:00.000Z", "value" : 0 } ] }, { "name" : "opened", "samples" : [ { "timestamp" : "2021-06-11T00:00:00.000Z", "value" : 0 } ] }, { "name" : "unique_opened", "samples" : [ { "timestamp" : "2021-06-11T00:00:00.000Z", "value" : 0 } ] }, { "name" : "clicked", "samples" : [ { "timestamp" : "2021-06-11T00:00:00.000Z", "value" : 0 } ] }, { "name" : "unique_clicked", "samples" : [ { "timestamp" : "2021-06-11T00:00:00.000Z", "value" : 0 } ] } ] }
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/flows/'.$flow_id.'/stats'
.';'.http_build_query(array(
'daterange' => $daterange,
'interval' => $interval,
), '', ';'),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
List message events
Ordered by received, new events first.
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/message_events |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
addmessagetags | query | boolean | no | false | Message tags will be included with each event if this parameter is true |
daterange | matrix | date_range | no | ||
flow_ids | matrix | string[] | no | Filter results on message flow ID |
|
range | header | ref_range | yes | Limits the returned list |
|
receivedrange | matrix | date_range | no | ||
sortorder | query | string | no | ||
source_ids | matrix | string[] | no | Filter results on message source ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
206 | MessageEvent[] | Content-Range, Next-Range |
Name | Type | HTTP status code | Description |
---|---|---|---|
Content-Range | content_range | 206 | Used to specify which subset of the requested data is returned |
Next-Range | ref_range | 206 | Used to specify the range that should be used in the next api call |
GET /520/message_events HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
Range: items=:10
HTTP/1.1 206 Partial Content Content-Range: items 7KOJCCHJ6GO38DPG6KS3IE1Q64P32DB664P6AB9P6THJAB9K6CRJ4B9O6SOM2BB36KO6CE1OCCO68E9N6C:64R34CPK60Q3EC1M68OJ4EHJ6DJ64E9G75J2QC36CGO2QD336OQIQE1HCKQ2QPHMCCO3APJ66OQ3EC9H/* Next-Range: items=64R34CPK60Q3EC1M68OJ4EHJ6DJ64E9G75J2QC36CGO2QD336OQIQE1HCKQ2QPHMCCO3APJ66OQ3EC9H:10 Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
[ { "id" : "1215f12e-97c5-4372-871a-c50f88c0d973", "messageId" : "202106110944460bfd0ca81fd281ef9e", "type" : "ERROR", "received" : "2021-06-11T09:45:05.834Z", "inserted" : "2021-06-11T09:45:05.898Z", "snippet" : "The following has evaluated to null or missing:", "mta" : null, "data" : null }, { "id" : "13f5bf3c-a8cc-4810-b700-6e987d9d7954", "messageId" : "202106110944431f2d30c5ed05b16baf", "type" : "DELIVERED", "received" : "2021-06-11T09:45:01.096Z", "inserted" : "2021-06-11T09:45:06.097Z", "snippet" : "smtp;250 Ok", "mta" : "[127.0.0.1] (127.0.0.1)", "data" : null }, { "id" : "33fb909f-0fd0-4c65-81e4-f6c05ff64711", "messageId" : "20210611094446f5938cdb6938051b5f", "type" : "DELIVERED", "received" : "2021-06-11T09:45:01.096Z", "inserted" : "2021-06-11T09:45:06.212Z", "snippet" : "smtp;250 Ok", "mta" : "[127.0.0.1] (127.0.0.1)", "data" : null } ]
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
'range: '.$range,
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/message_events'
.';'.http_build_query(array(
'daterange' => $daterange,
'flow_ids' => $flow_ids,
'receivedrange' => $receivedrange,
'source_ids' => $source_ids,
), '', ';')
.'?'.http_build_query(array(
'addmessagetags' => $addmessagetags,
'sortorder' => $sortorder,
)),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
List messages which could not be processed
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/message_hold |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
daterange | matrix | date_range | no | Date range the message was submitted in |
|
range | header | items_range | yes | Limits the returned list |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
206 | MessageHold[] | Content-Range, Next-Range |
Name | Type | HTTP status code | Description |
---|---|---|---|
Content-Range | content_range | 206 | Used to specify which subset of the requested data is returned |
Next-Range | ref_range | 206 | Used to specify the range that should be used in the next api call |
GET /520/message_hold;daterange=2021-06-11T00:00:00Z,2021-06-12T00:00:00Z HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
Range: items=0-10
HTTP/1.1 206 Partial Content Content-Range: items 0-10/1 Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
[ { "messageId" : "202106110944460bfd0ca81fd281ef9e", "transactionId" : "d3058c5f23964b09a3ea90bad2d231b6", "submitted" : "2021-06-11T09:44:46.000Z", "sender" : null, "recipient" : "richard@flowmailer.local", "messageType" : "EMAIL", "source" : { "id" : "6952", "description" : "test source a" }, "flow" : { "id" : "16811", "description" : "test flow 2" }, "status" : "NEW", "dataCoding" : 0, "data" : null, "backendDone" : "2021-06-11T09:45:05.834Z", "reason" : "ERROR", "exceptionText" : null, "errorText" : "The following has evaluated to null or missing:\n==> var1 [in template \"48680\" at line 1, column 29]\n\n----\nTip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??\n----\n\n\t- Failed at: ${var1} [in template \"48680\" at line 1, column 27]\n" } ]
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
'range: '.$range,
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/message_hold'
.';'.http_build_query(array(
'daterange' => $daterange,
), '', ';'),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Get a held message by its id
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/message_hold/{message_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
message_id | path | string | yes | Message ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | MessageHold |
GET /520/message_hold/202106110944460bfd0ca81fd281ef9e HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
{ "messageId" : "202106110944460bfd0ca81fd281ef9e", "transactionId" : "d3058c5f23964b09a3ea90bad2d231b6", "submitted" : "2021-06-11T09:44:46.000Z", "sender" : null, "recipient" : "richard@flowmailer.local", "messageType" : "EMAIL", "source" : { "id" : "6952", "description" : "test source a" }, "flow" : { "id" : "16811", "description" : "test flow 2" }, "status" : "NEW", "dataCoding" : 0, "data" : null, "backendDone" : "2021-06-11T09:45:05.834Z", "reason" : "ERROR", "exceptionText" : null, "errorText" : "The following has evaluated to null or missing:\n==> var1 [in template \"48680\" at line 1, column 29]\n\n----\nTip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??\n----\n\n\t- Failed at: ${var1} [in template \"48680\" at line 1, column 27]\n" }
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/message_hold/'.$message_id.''
.'?'.http_build_query(array(
)),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
List messages
This API call can be used to retrieve all messages and keep your database up to date (without missing messages due to paging issues). To do this sortfield must be set to INSERTED, and sortorder should be set to ASC.
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/messages |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
addevents | query | boolean | no | false | Whether to add message events |
addheaders | query | boolean | no | false | Whether to add e-mail headers |
addonlinelink | query | boolean | no | false | |
addtags | query | boolean | no | false | |
daterange | matrix | date_range | no | Date range the message was submitted in |
|
flow_ids | matrix | string[] | no | Filter results on flow ID |
|
range | header | ref_range | yes | Limits the returned list |
|
sortfield | query | string | no | Sort by INSERTED or SUBMITTED (default INSERTED) |
|
sortorder | query | string | no |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
206 | Message[] | Content-Range, Next-Range |
Name | Type | HTTP status code | Description |
---|---|---|---|
Content-Range | content_range | 206 | Used to specify which subset of the requested data is returned |
Next-Range | ref_range | 206 | Used to specify the range that should be used in the next api call |
GET /520/messages;daterange=2021-06-11T00:00:00Z,2021-06-12T00:00:00Z?addevents=true&addheaders=true&addonlinelink=true HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
Range: items=:10
HTTP/1.1 206 Partial Content Content-Range: items D4U34C1I64O3CC9H60SJ8D1L60P30CHH60R32C9G74Q38D1J65J34P1J61HJAPB460QM4C9MC9GMC:D4V34C1I64O3CC9H60SJ8D9G6KP30CHH60R32C9G74Q38D1M61H6CP1GCDGJGCB6CGP3GCB5COSMA/* Next-Range: items=D4V34C1I64O3CC9H60SJ8D9G6KP30CHH60R32C9G74Q38D1M61H6CP1GCDGJGCB6CGP3GCB5COSMA:10 Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
[ { "submitted" : "2021-06-11T09:44:43.000Z", "id" : "202106110944431f2d30c5ed05b16baf", "transactionId" : "667e30bbc2094ae1bb05b813fdb59635", "messageIdHeader" : "<202106110944431f2d30c5ed05b16baf@return.flowmailer.local>", "messageType" : "EMAIL", "source" : { "id" : "6952", "description" : "test source a" }, "flow" : { "id" : "16799", "description" : "test flow 1 (updated)" }, "senderAddress" : "support@flowmailer.local", "recipientAddress" : "richard@flowmailer.local", "backendStart" : "2021-06-11T09:44:48.301Z", "backendDone" : "2021-06-11T09:45:00.765Z", "headersIn" : [ { "name" : "MIME-Version", "value" : "1.0" }, { "name" : "From", "value" : "Casper Mout <casper@flowmailer.local>" }, { "name" : "To", "value" : "Richard van Looijen <richard@flowmailer.local>" }, { "name" : "X-Flow", "value" : "flow1" }, { "name" : "Subject", "value" : "test message 1" }, { "name" : "Content-Type", "value" : "text/plain; charset=UTF-8" }, { "name" : "Content-Transfer-Encoding", "value" : "quoted-printable" } ], "headersOut" : [ { "name" : "MIME-Version", "value" : "1.0" }, { "name" : "From", "value" : "Casper Mout <casper@flowmailer.local>" }, { "name" : "To", "value" : "Richard van Looijen <richard@flowmailer.local>" }, { "name" : "X-Flow", "value" : "flow1" }, { "name" : "Subject", "value" : "test message 1" }, { "name" : "Content-Type", "value" : "text/plain; charset=UTF-8" }, { "name" : "Content-Transfer-Encoding", "value" : "quoted-printable" }, { "name" : "Feedback-ID", "value" : "520:520-6952:520-16799:flowmailer" }, { "name" : "Message-ID", "value" : "<202106110944431f2d30c5ed05b16baf@return.flowmailer.local>" }, { "name" : "Date", "value" : "Fri, 11 Jun 2021 09:44:57 +0000" }, { "name" : "X-Job", "value" : "fm-6952-16799" } ], "onlineLink" : "https://web.flowmailer.net/viewonline.html?id=2021061109444331ce947822ae6eefa9fdb4c1859b72486162e532beea0cc0da82cca1f2eae76b01", "status" : "DELIVERED", "subject" : "test message 1", "from" : "casper@flowmailer.local", "events" : [ { "id" : "13f5bf3c-a8cc-4810-b700-6e987d9d7954", "messageId" : "202106110944431f2d30c5ed05b16baf", "type" : "DELIVERED", "received" : "2021-06-11T09:45:01.096Z", "inserted" : "2021-06-11T09:45:06.097Z", "snippet" : "smtp;250 Ok", "mta" : "[127.0.0.1] (127.0.0.1)", "data" : null, "sourceMta" : "mta.flowmailer.local" }, { "id" : null, "messageId" : "202106110944431f2d30c5ed05b16baf", "type" : "PROCESSED", "received" : "2021-06-11T09:45:00.765Z", "inserted" : "2021-06-11T09:44:50.750Z", "snippet" : null, "mta" : null, "data" : null }, { "id" : null, "messageId" : "202106110944431f2d30c5ed05b16baf", "type" : "SUBMITTED", "received" : "2021-06-11T09:44:43.000Z", "inserted" : "2021-06-11T09:44:50.750Z", "snippet" : null, "mta" : null, "data" : null } ], "messageDetailsLink" : "https://web.flowmailer.net/viewmessage.html?id=2021061109444331ce947822ae6eefa9fdb4c1859b72486162e532beea0cc0da82cca1f2eae76b01&code=8a558461c945b78c943bea4b1af9d2b765dcecc4", "fromAddress" : { "name" : "Casper Mout", "address" : "casper@flowmailer.local" }, "toAddressList" : [ { "name" : "Richard van Looijen", "address" : "richard@flowmailer.local" } ] }, { "submitted" : "2021-06-11T09:44:46.000Z", "id" : "20210611094446f5938cdb6938051b5f", "transactionId" : "c3cbcbf8d4584f98a0124e661eb958b5", "messageIdHeader" : "<20210611094446f5938cdb6938051b5f@return.flowmailer.local>", "messageType" : "EMAIL", "source" : { "id" : "6952", "description" : "test source a" }, "flow" : { "id" : "16811", "description" : "test flow 2" }, "senderAddress" : "support@flowmailer.local", "recipientAddress" : "richard@flowmailer.local", "backendStart" : "2021-06-11T09:45:00.309Z", "backendDone" : "2021-06-11T09:45:00.784Z", "headersIn" : [ { "name" : "MIME-Version", "value" : "1.0" }, { "name" : "From", "value" : "Casper Mout <casper@flowmailer.local>" }, { "name" : "To", "value" : "Richard van Looijen <richard@flowmailer.local>" }, { "name" : "X-Flow", "value" : "flow2" }, { "name" : "Subject", "value" : "test message 2" }, { "name" : "Content-Type", "value" : "text/plain; charset=UTF-8" }, { "name" : "Content-Transfer-Encoding", "value" : "quoted-printable" } ], "headersOut" : [ { "name" : "MIME-Version", "value" : "1.0" }, { "name" : "From", "value" : "Casper Mout <casper@flowmailer.local>" }, { "name" : "To", "value" : "Richard van Looijen <richard@flowmailer.local>" }, { "name" : "X-Flow", "value" : "flow2" }, { "name" : "Subject", "value" : "test message 2" }, { "name" : "Content-Type", "value" : "text/plain; charset=UTF-8" }, { "name" : "Content-Transfer-Encoding", "value" : "quoted-printable" }, { "name" : "Feedback-ID", "value" : "520:520-6952:520-16811:flowmailer" }, { "name" : "Message-ID", "value" : "<20210611094446f5938cdb6938051b5f@return.flowmailer.local>" }, { "name" : "Date", "value" : "Fri, 11 Jun 2021 09:45:00 +0000" }, { "name" : "X-Job", "value" : "fm-6952-16811" } ], "onlineLink" : "https://web.flowmailer.net/viewonline.html?id=20210611094446637d7495fdf0190de0134c145c083a94960105ac76a53c69364dd155dac05c2c37", "status" : "DELIVERED", "subject" : "test message 2", "from" : "casper@flowmailer.local", "events" : [ { "id" : "33fb909f-0fd0-4c65-81e4-f6c05ff64711", "messageId" : "20210611094446f5938cdb6938051b5f", "type" : "DELIVERED", "received" : "2021-06-11T09:45:01.096Z", "inserted" : "2021-06-11T09:45:06.212Z", "snippet" : "smtp;250 Ok", "mta" : "[127.0.0.1] (127.0.0.1)", "data" : null, "sourceMta" : "mta.flowmailer.local" }, { "id" : null, "messageId" : "20210611094446f5938cdb6938051b5f", "type" : "PROCESSED", "received" : "2021-06-11T09:45:00.784Z", "inserted" : "2021-06-11T09:45:00.337Z", "snippet" : null, "mta" : null, "data" : null }, { "id" : null, "messageId" : "20210611094446f5938cdb6938051b5f", "type" : "SUBMITTED", "received" : "2021-06-11T09:44:46.000Z", "inserted" : "2021-06-11T09:45:00.337Z", "snippet" : null, "mta" : null, "data" : null } ], "messageDetailsLink" : "https://web.flowmailer.net/viewmessage.html?id=20210611094446637d7495fdf0190de0134c145c083a94960105ac76a53c69364dd155dac05c2c37&code=99992e45240b4d64b7ea8d956499111452a1e4ae", "fromAddress" : { "name" : "Casper Mout", "address" : "casper@flowmailer.local" }, "toAddressList" : [ { "name" : "Richard van Looijen", "address" : "richard@flowmailer.local" } ] }, { "submitted" : "2021-06-11T09:44:46.000Z", "id" : "202106110944460bfd0ca81fd281ef9e", "transactionId" : "d3058c5f23964b09a3ea90bad2d231b6", "messageIdHeader" : null, "messageType" : "EMAIL", "source" : { "id" : "6952", "description" : "test source a" }, "flow" : { "id" : "16811", "description" : "test flow 2" }, "senderAddress" : "support@flowmailer.local", "recipientAddress" : "richard@flowmailer.local", "backendStart" : "2021-06-11T09:45:05.727Z", "backendDone" : null, "headersIn" : [ { "name" : "MIME-Version", "value" : "1.0" }, { "name" : "From", "value" : "Casper Mout <casper@flowmailer.local>" }, { "name" : "To", "value" : "Richard van Looijen <richard@flowmailer.local>" }, { "name" : "X-Flow", "value" : "flow2" }, { "name" : "Subject", "value" : "test message 3" }, { "name" : "Content-Type", "value" : "text/plain; charset=UTF-8" }, { "name" : "Content-Transfer-Encoding", "value" : "quoted-printable" } ], "status" : "ERROR", "subject" : "test message 3", "from" : "casper@flowmailer.local", "events" : [ { "id" : "1215f12e-97c5-4372-871a-c50f88c0d973", "messageId" : "202106110944460bfd0ca81fd281ef9e", "type" : "ERROR", "received" : "2021-06-11T09:45:05.834Z", "inserted" : "2021-06-11T09:45:05.898Z", "snippet" : "The following has evaluated to null or missing:", "mta" : null, "data" : null, "extraData" : { "errorText" : "The following has evaluated to null or missing:\n==> var1 [in template \"48680\" at line 1, column 29]\n\n----\nTip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??\n----\n\n\t- Failed at: ${var1} [in template \"48680\" at line 1, column 27]\n", "errorAfter" : "QUEUE" } }, { "id" : null, "messageId" : "202106110944460bfd0ca81fd281ef9e", "type" : "SUBMITTED", "received" : "2021-06-11T09:44:46.000Z", "inserted" : "2021-06-11T09:45:05.759Z", "snippet" : null, "mta" : null, "data" : null } ], "fromAddress" : { "name" : "Casper Mout", "address" : "casper@flowmailer.local" }, "toAddressList" : [ { "name" : "Richard van Looijen", "address" : "richard@flowmailer.local" } ] } ]
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
'range: '.$range,
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/messages'
.';'.http_build_query(array(
'daterange' => $daterange,
'flow_ids' => $flow_ids,
), '', ';')
.'?'.http_build_query(array(
'addevents' => $addevents,
'addheaders' => $addheaders,
'addonlinelink' => $addonlinelink,
'addtags' => $addtags,
'sortfield' => $sortfield,
'sortorder' => $sortorder,
)),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Simulate an email or sms message
Type | URL format |
---|---|
POST | https://api.flowmailer.net/{account_id}/messages/simulate |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
body | body | SimulateMessage | yes |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | SimulateMessageResult |
POST /520/messages/simulate HTTP/1.1 Host: api.flowmailer.net Authorization: Bearer {access_token} Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8 Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
{ "data" : { "var1" : "value3" }, "headerFromAddress" : "casper@flowmailer.local", "headerFromName" : "Casper Mout", "headerToName" : "Richard van Looijen", "headers" : [ { "name" : "X-Flow", "value" : "flow2" } ], "messageType" : "EMAIL", "recipientAddress" : "richard@flowmailer.local", "senderAddress" : "support@flowmailer.local", "sourceId" : "6952", "subject" : "test message 3" }
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
{ "messageType" : "EMAIL", "subject" : "test message 3", "text" : "<html><body>html template value3<br/>\\n\\nmet twee regions<br/>\\n\\nnog wat onaanpasbare tekst<br/>\\n\\ntekst in de tweede region<br/>\\nnog een regel<br/>\\n\\nnog meer onaanpasbare tekst\\n<br/></body></html>", "html" : null, "attachments" : [ ], "mimedata" : "TUlNRS1WZXJzaW9uOiAxLjANCkZyb206IENhc3BlciBNb3V0IDxjYXNwZXJAZmxvd21haWxlci5sb2NhbD4NClRvOiBSaWNoYXJkIHZhbiBMb29pamVuIDxyaWNoYXJkQGZsb3dtYWlsZXIubG9jYWw+DQpYLUZsb3c6IGZsb3cyDQpTdWJqZWN0OiB0ZXN0IG1lc3NhZ2UgMw0KQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PVVURi04DQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBxdW90ZWQtcHJpbnRhYmxlDQpGZWVkYmFjay1JRDogNTIwOjUyMC02OTUyOjUyMC0xNjgxMTpmbG93bWFpbGVyDQpNZXNzYWdlLUlEOiA8MTExMTAxMDEwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDBAcmV0dXJuLmZsb3dtYWlsZXIubG9jYWw+DQpEYXRlOiBGcmksIDExIEp1biAyMDIxIDA5OjQ1OjEzICswMDAwDQpYLUpvYjogZm0tNjk1Mi0xNjgxMQ0KDQo8aHRtbD48Ym9keT5odG1sIHRlbXBsYXRlIHZhbHVlMzxici8+XG5cbm1ldCB0d2VlIHJlZ2lvbnM8YnIvPlxuXG5ub2cgd2F0IG89DQpuYWFucGFzYmFyZSB0ZWtzdDxici8+XG5cbnRla3N0IGluIGRlIHR3ZWVkZSByZWdpb248YnIvPlxubm9nIGVlbiByZWdlbDxici89DQo+XG5cbm5vZyBtZWVyIG9uYWFucGFzYmFyZSB0ZWtzdFxuPGJyLz48L2JvZHk+PC9odG1sPg==", "flow" : { "id" : "16811", "description" : "test flow 2" }, "data" : { "var1" : "value3" } }
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'POST',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
'Content-Type: application/vnd.flowmailer.v1.12+json',
),
'content' => json_encode($requestbody),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/messages/simulate',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Send an email or sms message
Type | URL format |
---|---|
POST | https://api.flowmailer.net/{account_id}/messages/submit |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
body | body | SubmitMessage | yes |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
201 | Location |
Name | Type | HTTP status code | Description |
---|---|---|---|
Location | url | 201 | Contains the URL of the newly created API resource |
POST /520/messages/submit HTTP/1.1 Host: api.flowmailer.net Authorization: Bearer {access_token} Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8 Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
{ "data" : { "var2" : "value3" }, "headerFromAddress" : "casper@flowmailer.local", "headerFromName" : "Casper Mout", "headerToName" : "Richard van Looijen", "headers" : [ { "name" : "X-Flow", "value" : "flow2" } ], "messageType" : "EMAIL", "recipientAddress" : "richard@flowmailer.local", "senderAddress" : "support@flowmailer.local", "subject" : "test message 3" }
HTTP/1.1 201 Created
Location: https://api.flowmailer.net/520/messages/202106110944460bfd0ca81fd281ef9e
Content-Length: 0
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'POST',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
'Content-Type: application/vnd.flowmailer.v1.12+json',
),
'content' => json_encode($requestbody),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/messages/submit',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Get message by id
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/messages/{message_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
addtags | query | boolean | no | false | |
message_id | path | string | yes | Message ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | Message |
GET /520/messages/202106110944431f2d30c5ed05b16baf HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
{ "submitted" : "2021-06-11T09:44:43.000Z", "id" : "202106110944431f2d30c5ed05b16baf", "transactionId" : "667e30bbc2094ae1bb05b813fdb59635", "messageIdHeader" : "<202106110944431f2d30c5ed05b16baf@return.flowmailer.local>", "messageType" : "EMAIL", "source" : { "id" : "6952", "description" : "test source a" }, "flow" : { "id" : "16799", "description" : "test flow 1 (updated)" }, "senderAddress" : "support@flowmailer.local", "recipientAddress" : "richard@flowmailer.local", "backendStart" : "2021-06-11T09:44:48.301Z", "backendDone" : "2021-06-11T09:45:00.765Z", "headersIn" : [ { "name" : "MIME-Version", "value" : "1.0" }, { "name" : "From", "value" : "Casper Mout <casper@flowmailer.local>" }, { "name" : "To", "value" : "Richard van Looijen <richard@flowmailer.local>" }, { "name" : "X-Flow", "value" : "flow1" }, { "name" : "Subject", "value" : "test message 1" }, { "name" : "Content-Type", "value" : "text/plain; charset=UTF-8" }, { "name" : "Content-Transfer-Encoding", "value" : "quoted-printable" } ], "headersOut" : [ { "name" : "MIME-Version", "value" : "1.0" }, { "name" : "From", "value" : "Casper Mout <casper@flowmailer.local>" }, { "name" : "To", "value" : "Richard van Looijen <richard@flowmailer.local>" }, { "name" : "X-Flow", "value" : "flow1" }, { "name" : "Subject", "value" : "test message 1" }, { "name" : "Content-Type", "value" : "text/plain; charset=UTF-8" }, { "name" : "Content-Transfer-Encoding", "value" : "quoted-printable" }, { "name" : "Feedback-ID", "value" : "520:520-6952:520-16799:flowmailer" }, { "name" : "Message-ID", "value" : "<202106110944431f2d30c5ed05b16baf@return.flowmailer.local>" }, { "name" : "Date", "value" : "Fri, 11 Jun 2021 09:44:57 +0000" }, { "name" : "X-Job", "value" : "fm-6952-16799" } ], "onlineLink" : "https://web.flowmailer.net/viewonline.html?id=2021061109444331ce947822ae6eefa9fdb4c1859b72486162e532beea0cc0da82cca1f2eae76b01", "status" : "DELIVERED", "subject" : "test message 1", "from" : "casper@flowmailer.local", "events" : [ { "id" : "13f5bf3c-a8cc-4810-b700-6e987d9d7954", "messageId" : "202106110944431f2d30c5ed05b16baf", "type" : "DELIVERED", "received" : "2021-06-11T09:45:01.096Z", "inserted" : "2021-06-11T09:45:06.097Z", "snippet" : "smtp;250 Ok", "mta" : "[127.0.0.1] (127.0.0.1)", "data" : null, "sourceMta" : "mta.flowmailer.local" }, { "id" : null, "messageId" : "202106110944431f2d30c5ed05b16baf", "type" : "PROCESSED", "received" : "2021-06-11T09:45:00.765Z", "inserted" : "2021-06-11T09:44:50.750Z", "snippet" : null, "mta" : null, "data" : null }, { "id" : null, "messageId" : "202106110944431f2d30c5ed05b16baf", "type" : "SUBMITTED", "received" : "2021-06-11T09:44:43.000Z", "inserted" : "2021-06-11T09:44:50.750Z", "snippet" : null, "mta" : null, "data" : null } ], "messageDetailsLink" : "https://web.flowmailer.net/viewmessage.html?id=2021061109444331ce947822ae6eefa9fdb4c1859b72486162e532beea0cc0da82cca1f2eae76b01&code=8a558461c945b78c943bea4b1af9d2b765dcecc4", "fromAddress" : { "name" : "Casper Mout", "address" : "casper@flowmailer.local" }, "toAddressList" : [ { "name" : "Richard van Looijen", "address" : "richard@flowmailer.local" } ] }
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/messages/'.$message_id.''
.'?'.http_build_query(array(
'addtags' => $addtags,
)),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
List the message as archived by one or more flow steps
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/messages/{message_id}/archive |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
addattachments | query | boolean | no | false | |
adddata | query | boolean | no | false | |
message_id | path | string | yes | Message ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | MessageArchive[] |
GET /520/messages/202106110944431f2d30c5ed05b16baf/archive?addattachments=true&adddata=true HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
[ { "flowStepId" : "49727", "messageType" : "EMAIL", "onlineVersion" : true, "subject" : "test message 1", "text" : "<html><body>html template<br/>\\n\\nmet twee regions<br/>\\n\\nnog wat onaanpasbare tekst<br/>\\n\\ntekst in de tweede region<br/>\\nnog een regel<br/>\\n\\nnog meer onaanpasbare tekst\\n<br/></body></html>", "html" : null, "attachments" : [ ], "onlineLink" : "https://web.flowmailer.net/viewonline.html?id=2021061109444331ce947822ae6eefa9fdb4c1859b72486162e532beea0cc0da82cca1f2eae76b01", "messageDetailsLink" : "https://web.flowmailer.net/viewmessage.html?id=2021061109444331ce947822ae6eefa9fdb4c1859b72486162e532beea0cc0da82cca1f2eae76b01&code=8a558461c945b78c943bea4b1af9d2b765dcecc4", "mimedata" : "TUlNRS1WZXJzaW9uOiAxLjANCkZyb206IENhc3BlciBNb3V0IDxjYXNwZXJAZmxvd21haWxlci5sb2NhbD4NClRvOiBSaWNoYXJkIHZhbiBMb29pamVuIDxyaWNoYXJkQGZsb3dtYWlsZXIubG9jYWw+DQpYLUZsb3c6IGZsb3cxDQpTdWJqZWN0OiB0ZXN0IG1lc3NhZ2UgMQ0KQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PVVURi04DQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBxdW90ZWQtcHJpbnRhYmxlDQoNCjxodG1sPjxib2R5Pmh0bWwgdGVtcGxhdGU8YnIvPlxuXG5tZXQgdHdlZSByZWdpb25zPGJyLz5cblxubm9nIHdhdCBvbmFhbnBhcz0NCmJhcmUgdGVrc3Q8YnIvPlxuXG50ZWtzdCBpbiBkZSB0d2VlZGUgcmVnaW9uPGJyLz5cbm5vZyBlZW4gcmVnZWw8YnIvPlxuXG5ubz0NCmcgbWVlciBvbmFhbnBhc2JhcmUgdGVrc3Rcbjxici8+PC9ib2R5PjwvaHRtbD4=", "data" : { "var1" : "value1" } } ]
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/messages/'.$message_id.'/archive'
.'?'.http_build_query(array(
'addattachments' => $addattachments,
'adddata' => $adddata,
)),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Fetch an attachment including data for an archived message
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/messages/{message_id}/archive/{flow_step_id}/attachment/{content_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
content_id | path | string | yes | Attachment content ID |
|
flow_step_id | path | string | yes | Flow step ID |
|
message_id | path | string | yes | Message ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | Attachment |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/messages/'.$message_id.'/archive/'.$flow_step_id.'/attachment/'.$content_id.'',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/messages/{message_id}/error_archive |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | ||
addattachments | query | boolean | no | false | |
adddata | query | boolean | no | false | |
message_id | path | string | yes |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | MessageArchive |
GET /520/messages/202106110944460bfd0ca81fd281ef9e/error_archive?addattachments=true&adddata=true HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
{ "messageType" : "EMAIL", "onlineVersion" : false, "subject" : "test message 3", "text" : "", "html" : null, "attachments" : [ ], "mimedata" : "TUlNRS1WZXJzaW9uOiAxLjANCkZyb206IENhc3BlciBNb3V0IDxjYXNwZXJAZmxvd21haWxlci5sb2NhbD4NClRvOiBSaWNoYXJkIHZhbiBMb29pamVuIDxyaWNoYXJkQGZsb3dtYWlsZXIubG9jYWw+DQpYLUZsb3c6IGZsb3cyDQpTdWJqZWN0OiB0ZXN0IG1lc3NhZ2UgMw0KQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PVVURi04DQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBxdW90ZWQtcHJpbnRhYmxlDQoNCg==", "data" : { "var2" : "value3" } }
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/messages/'.$message_id.'/error_archive'
.'?'.http_build_query(array(
'addattachments' => $addattachments,
'adddata' => $adddata,
)),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Resend message by id
Type | URL format |
---|---|
POST | https://api.flowmailer.net/{account_id}/messages/{message_id}/resend |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
body | body | ResendMessage | yes | ||
message_id | path | string | yes | Message ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
201 | Location |
Name | Type | HTTP status code | Description |
---|---|---|---|
Location | url | 201 | Contains the URL of the newly created API resource |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'POST',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
'Content-Type: application/vnd.flowmailer.v1.12+json',
),
'content' => json_encode($requestbody),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/messages/'.$message_id.'/resend',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Get time based message statistics for whole account
The resolution of the returned data may be lower than specified in the interval
parameter
if the data is old or the requested date range is too large.
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/messagestats |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
daterange | matrix | date_range | yes | Date range the messages were submitted in |
|
flow_ids | matrix | string[] | no | ||
interval | query | integer | no | Time difference between samples |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | DataSets |
GET /520/messagestats;daterange=2021-06-11T00:00:00Z,2021-06-12T00:00:00Z?interval=86400 HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
{ "list" : [ { "name" : "processed", "samples" : [ { "timestamp" : "2021-06-11T00:00:00.000Z", "value" : 2 } ] }, { "name" : "email", "samples" : [ { "timestamp" : "2021-06-11T00:00:00.000Z", "value" : 2 } ] }, { "name" : "sms", "samples" : [ { "timestamp" : "2021-06-11T00:00:00.000Z", "value" : 0 } ] }, { "name" : "sent", "samples" : [ { "timestamp" : "2021-06-11T00:00:00.000Z", "value" : 2 } ] }, { "name" : "delivered", "samples" : [ { "timestamp" : "2021-06-11T00:00:00.000Z", "value" : 2 } ] }, { "name" : "deliver_time", "samples" : [ { "timestamp" : "2021-06-11T00:00:00.000Z", "value" : 0 } ] }, { "name" : "opened", "samples" : [ { "timestamp" : "2021-06-11T00:00:00.000Z", "value" : 0 } ] }, { "name" : "unique_opened", "samples" : [ { "timestamp" : "2021-06-11T00:00:00.000Z", "value" : 0 } ] }, { "name" : "clicked", "samples" : [ { "timestamp" : "2021-06-11T00:00:00.000Z", "value" : 0 } ] }, { "name" : "unique_clicked", "samples" : [ { "timestamp" : "2021-06-11T00:00:00.000Z", "value" : 0 } ] } ] }
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/messagestats'
.';'.http_build_query(array(
'daterange' => $daterange,
'flow_ids' => $flow_ids,
), '', ';')
.'?'.http_build_query(array(
'interval' => $interval,
)),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Get information about a recipient
Message statistics are only included if a date range is specified.
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/recipient/{recipient} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
daterange | matrix | date_range | no | Specifies the date range for message statistics |
|
recipient | path | string | yes | Recipient email address or phone number |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | Recipient |
GET /520/recipient/richard@flowmailer.local;daterange=2021-06-11T00:00:00Z,2021-06-12T00:00:00Z HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
{ "address" : "richard@flowmailer.local", "filters" : [ ], "messageSummary" : { "processed" : 2, "sent" : 2, "delivered" : 2, "opened" : 0, "uniqueOpened" : 0, "clicked" : 0, "uniqueClicked" : 0, "averageDeliverTimeMillis" : 0 } }
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/recipient/'.$recipient.''
.';'.http_build_query(array(
'daterange' => $daterange,
), '', ';'),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
List messages per recipient
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/recipient/{recipient}/messages |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
addheaders | query | boolean | no | false | Whether to add e-mail headers |
addonlinelink | query | boolean | no | false | Whether to add online link |
addtags | query | boolean | no | false | |
daterange | matrix | date_range | no | Date range the messages were submitted in |
|
range | header | ref_range | yes | Limits the returned list |
|
recipient | path | string | yes | Recipient email address or phone number |
|
sortorder | query | string | no |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
206 | Message[] | Content-Range, Next-Range |
Name | Type | HTTP status code | Description |
---|---|---|---|
Content-Range | content_range | 206 | Used to specify which subset of the requested data is returned |
Next-Range | ref_range | 206 | Used to specify the range that should be used in the next api call |
GET /520/recipient/richard@flowmailer.local/messages;daterange=2021-06-11T00:00:00Z,2021-06-12T00:00:00Z?addheaders=true&addonlinelink=true HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
Range: items=0-10
HTTP/1.1 206 Partial Content Content-Range: items 0-10/3 Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
[ { "submitted" : "2021-06-11T09:44:46.000Z", "id" : "20210611094446f5938cdb6938051b5f", "transactionId" : "c3cbcbf8d4584f98a0124e661eb958b5", "messageIdHeader" : "<20210611094446f5938cdb6938051b5f@return.flowmailer.local>", "messageType" : "EMAIL", "source" : { "id" : "6952", "description" : "test source a" }, "flow" : { "id" : "16811", "description" : "test flow 2" }, "senderAddress" : "support@flowmailer.local", "recipientAddress" : "richard@flowmailer.local", "backendStart" : "2021-06-11T09:45:00.309Z", "backendDone" : "2021-06-11T09:45:00.784Z", "headersIn" : [ { "name" : "MIME-Version", "value" : "1.0" }, { "name" : "From", "value" : "Casper Mout <casper@flowmailer.local>" }, { "name" : "To", "value" : "Richard van Looijen <richard@flowmailer.local>" }, { "name" : "X-Flow", "value" : "flow2" }, { "name" : "Subject", "value" : "test message 2" }, { "name" : "Content-Type", "value" : "text/plain; charset=UTF-8" }, { "name" : "Content-Transfer-Encoding", "value" : "quoted-printable" } ], "headersOut" : [ { "name" : "MIME-Version", "value" : "1.0" }, { "name" : "From", "value" : "Casper Mout <casper@flowmailer.local>" }, { "name" : "To", "value" : "Richard van Looijen <richard@flowmailer.local>" }, { "name" : "X-Flow", "value" : "flow2" }, { "name" : "Subject", "value" : "test message 2" }, { "name" : "Content-Type", "value" : "text/plain; charset=UTF-8" }, { "name" : "Content-Transfer-Encoding", "value" : "quoted-printable" }, { "name" : "Feedback-ID", "value" : "520:520-6952:520-16811:flowmailer" }, { "name" : "Message-ID", "value" : "<20210611094446f5938cdb6938051b5f@return.flowmailer.local>" }, { "name" : "Date", "value" : "Fri, 11 Jun 2021 09:45:00 +0000" }, { "name" : "X-Job", "value" : "fm-6952-16811" } ], "onlineLink" : "https://web.flowmailer.net/viewonline.html?id=20210611094446637d7495fdf0190de0134c145c083a94960105ac76a53c69364dd155dac05c2c37", "status" : "DELIVERED", "subject" : "test message 2", "from" : "casper@flowmailer.local", "events" : [ { "id" : "33fb909f-0fd0-4c65-81e4-f6c05ff64711", "messageId" : "20210611094446f5938cdb6938051b5f", "type" : "DELIVERED", "received" : "2021-06-11T09:45:01.096Z", "inserted" : "2021-06-11T09:45:06.212Z", "snippet" : "smtp;250 Ok", "mta" : "[127.0.0.1] (127.0.0.1)", "data" : null, "sourceMta" : "mta.flowmailer.local" }, { "id" : null, "messageId" : "20210611094446f5938cdb6938051b5f", "type" : "PROCESSED", "received" : "2021-06-11T09:45:00.784Z", "inserted" : "2021-06-11T09:45:00.337Z", "snippet" : null, "mta" : null, "data" : null }, { "id" : null, "messageId" : "20210611094446f5938cdb6938051b5f", "type" : "SUBMITTED", "received" : "2021-06-11T09:44:46.000Z", "inserted" : "2021-06-11T09:45:00.337Z", "snippet" : null, "mta" : null, "data" : null } ], "messageDetailsLink" : "https://web.flowmailer.net/viewmessage.html?id=20210611094446637d7495fdf0190de0134c145c083a94960105ac76a53c69364dd155dac05c2c37&code=99992e45240b4d64b7ea8d956499111452a1e4ae", "fromAddress" : { "name" : "Casper Mout", "address" : "casper@flowmailer.local" }, "toAddressList" : [ { "name" : "Richard van Looijen", "address" : "richard@flowmailer.local" } ] }, { "submitted" : "2021-06-11T09:44:46.000Z", "id" : "202106110944460bfd0ca81fd281ef9e", "transactionId" : "d3058c5f23964b09a3ea90bad2d231b6", "messageIdHeader" : null, "messageType" : "EMAIL", "source" : { "id" : "6952", "description" : "test source a" }, "flow" : { "id" : "16811", "description" : "test flow 2" }, "senderAddress" : "support@flowmailer.local", "recipientAddress" : "richard@flowmailer.local", "backendStart" : "2021-06-11T09:45:05.727Z", "backendDone" : null, "headersIn" : [ { "name" : "MIME-Version", "value" : "1.0" }, { "name" : "From", "value" : "Casper Mout <casper@flowmailer.local>" }, { "name" : "To", "value" : "Richard van Looijen <richard@flowmailer.local>" }, { "name" : "X-Flow", "value" : "flow2" }, { "name" : "Subject", "value" : "test message 3" }, { "name" : "Content-Type", "value" : "text/plain; charset=UTF-8" }, { "name" : "Content-Transfer-Encoding", "value" : "quoted-printable" } ], "status" : "ERROR", "subject" : "test message 3", "from" : "casper@flowmailer.local", "events" : [ { "id" : "1215f12e-97c5-4372-871a-c50f88c0d973", "messageId" : "202106110944460bfd0ca81fd281ef9e", "type" : "ERROR", "received" : "2021-06-11T09:45:05.834Z", "inserted" : "2021-06-11T09:45:05.898Z", "snippet" : "The following has evaluated to null or missing:", "mta" : null, "data" : null, "extraData" : { "errorText" : "The following has evaluated to null or missing:\n==> var1 [in template \"48680\" at line 1, column 29]\n\n----\nTip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??\n----\n\n\t- Failed at: ${var1} [in template \"48680\" at line 1, column 27]\n", "errorAfter" : "QUEUE" } }, { "id" : null, "messageId" : "202106110944460bfd0ca81fd281ef9e", "type" : "SUBMITTED", "received" : "2021-06-11T09:44:46.000Z", "inserted" : "2021-06-11T09:45:05.759Z", "snippet" : null, "mta" : null, "data" : null } ], "fromAddress" : { "name" : "Casper Mout", "address" : "casper@flowmailer.local" }, "toAddressList" : [ { "name" : "Richard van Looijen", "address" : "richard@flowmailer.local" } ] }, { "submitted" : "2021-06-11T09:44:43.000Z", "id" : "202106110944431f2d30c5ed05b16baf", "transactionId" : "667e30bbc2094ae1bb05b813fdb59635", "messageIdHeader" : "<202106110944431f2d30c5ed05b16baf@return.flowmailer.local>", "messageType" : "EMAIL", "source" : { "id" : "6952", "description" : "test source a" }, "flow" : { "id" : "16799", "description" : "test flow 1 (updated)" }, "senderAddress" : "support@flowmailer.local", "recipientAddress" : "richard@flowmailer.local", "backendStart" : "2021-06-11T09:44:48.301Z", "backendDone" : "2021-06-11T09:45:00.765Z", "headersIn" : [ { "name" : "MIME-Version", "value" : "1.0" }, { "name" : "From", "value" : "Casper Mout <casper@flowmailer.local>" }, { "name" : "To", "value" : "Richard van Looijen <richard@flowmailer.local>" }, { "name" : "X-Flow", "value" : "flow1" }, { "name" : "Subject", "value" : "test message 1" }, { "name" : "Content-Type", "value" : "text/plain; charset=UTF-8" }, { "name" : "Content-Transfer-Encoding", "value" : "quoted-printable" } ], "headersOut" : [ { "name" : "MIME-Version", "value" : "1.0" }, { "name" : "From", "value" : "Casper Mout <casper@flowmailer.local>" }, { "name" : "To", "value" : "Richard van Looijen <richard@flowmailer.local>" }, { "name" : "X-Flow", "value" : "flow1" }, { "name" : "Subject", "value" : "test message 1" }, { "name" : "Content-Type", "value" : "text/plain; charset=UTF-8" }, { "name" : "Content-Transfer-Encoding", "value" : "quoted-printable" }, { "name" : "Feedback-ID", "value" : "520:520-6952:520-16799:flowmailer" }, { "name" : "Message-ID", "value" : "<202106110944431f2d30c5ed05b16baf@return.flowmailer.local>" }, { "name" : "Date", "value" : "Fri, 11 Jun 2021 09:44:57 +0000" }, { "name" : "X-Job", "value" : "fm-6952-16799" } ], "onlineLink" : "https://web.flowmailer.net/viewonline.html?id=2021061109444331ce947822ae6eefa9fdb4c1859b72486162e532beea0cc0da82cca1f2eae76b01", "status" : "DELIVERED", "subject" : "test message 1", "from" : "casper@flowmailer.local", "events" : [ { "id" : "13f5bf3c-a8cc-4810-b700-6e987d9d7954", "messageId" : "202106110944431f2d30c5ed05b16baf", "type" : "DELIVERED", "received" : "2021-06-11T09:45:01.096Z", "inserted" : "2021-06-11T09:45:06.097Z", "snippet" : "smtp;250 Ok", "mta" : "[127.0.0.1] (127.0.0.1)", "data" : null, "sourceMta" : "mta.flowmailer.local" }, { "id" : null, "messageId" : "202106110944431f2d30c5ed05b16baf", "type" : "PROCESSED", "received" : "2021-06-11T09:45:00.765Z", "inserted" : "2021-06-11T09:44:50.750Z", "snippet" : null, "mta" : null, "data" : null }, { "id" : null, "messageId" : "202106110944431f2d30c5ed05b16baf", "type" : "SUBMITTED", "received" : "2021-06-11T09:44:43.000Z", "inserted" : "2021-06-11T09:44:50.750Z", "snippet" : null, "mta" : null, "data" : null } ], "messageDetailsLink" : "https://web.flowmailer.net/viewmessage.html?id=2021061109444331ce947822ae6eefa9fdb4c1859b72486162e532beea0cc0da82cca1f2eae76b01&code=8a558461c945b78c943bea4b1af9d2b765dcecc4", "fromAddress" : { "name" : "Casper Mout", "address" : "casper@flowmailer.local" }, "toAddressList" : [ { "name" : "Richard van Looijen", "address" : "richard@flowmailer.local" } ] } ]
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
'range: '.$range,
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/recipient/'.$recipient.'/messages'
.';'.http_build_query(array(
'daterange' => $daterange,
), '', ';')
.'?'.http_build_query(array(
'addheaders' => $addheaders,
'addonlinelink' => $addonlinelink,
'addtags' => $addtags,
'sortorder' => $sortorder,
)),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
List messages per sender
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/sender/{sender}/messages |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
addheaders | query | boolean | no | false | Whether to add e-mail headers |
addonlinelink | query | boolean | no | false | Whether to add online link |
addtags | query | boolean | no | false | |
daterange | matrix | date_range | no | Date range the messages were submitted in |
|
range | header | ref_range | yes | Limits the returned list |
|
sender | path | string | yes | Sender email address or phone number |
|
sortorder | query | string | no |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
206 | Message[] | Content-Range, Next-Range |
Name | Type | HTTP status code | Description |
---|---|---|---|
Content-Range | content_range | 206 | Used to specify which subset of the requested data is returned |
Next-Range | ref_range | 206 | Used to specify the range that should be used in the next api call |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
'range: '.$range,
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sender/'.$sender.'/messages'
.';'.http_build_query(array(
'daterange' => $daterange,
), '', ';')
.'?'.http_build_query(array(
'addheaders' => $addheaders,
'addonlinelink' => $addonlinelink,
'addtags' => $addtags,
'sortorder' => $sortorder,
)),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
List sender domains by account
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/sender_domains |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | SenderDomain[] |
GET /520/sender_domains HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
[ ]
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sender_domains'
.'?'.http_build_query(array(
)),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Create sender domain
Type | URL format |
---|---|
POST | https://api.flowmailer.net/{account_id}/sender_domains |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
body | body | SenderDomain | yes |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
201 | Location |
Name | Type | HTTP status code | Description |
---|---|---|---|
Location | url | 201 | Contains the URL of the newly created API resource |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'POST',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
'Content-Type: application/vnd.flowmailer.v1.12+json',
),
'content' => json_encode($requestbody),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sender_domains',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Get sender domain by domain name
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/sender_domains/by_domain/{domain} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
domain | path | string | yes | Sender domain name |
|
validate | query | boolean | no | false | Validate DNS records for this SenderDomain |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | SenderDomain |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sender_domains/by_domain/'.$domain.''
.'?'.http_build_query(array(
'validate' => $validate,
)),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Validates but does not save a sender domain.
Type | URL format |
---|---|
POST | https://api.flowmailer.net/{account_id}/sender_domains/validate |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | ||
body | body | SenderDomain | yes | the sender domain to validate |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | SenderDomain |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'POST',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
'Content-Type: application/vnd.flowmailer.v1.12+json',
),
'content' => json_encode($requestbody),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sender_domains/validate'
.'?'.http_build_query(array(
)),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Delete sender domain
Type | URL format |
---|---|
DELETE | https://api.flowmailer.net/{account_id}/sender_domains/{domain_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
domain_id | path | string | yes | Sender domain ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'DELETE',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sender_domains/'.$domain_id.'',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Get sender domain by id
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/sender_domains/{domain_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
domain_id | path | string | yes | Sender domain ID |
|
validate | query | boolean | no | false | Validate DNS records for this SenderDomain |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | SenderDomain |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sender_domains/'.$domain_id.''
.'?'.http_build_query(array(
'validate' => $validate,
)),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Save sender domain
Type | URL format |
---|---|
PUT | https://api.flowmailer.net/{account_id}/sender_domains/{domain_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
body | body | SenderDomain | yes | ||
domain_id | path | string | yes | Sender domain ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'PUT',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sender_domains/'.$domain_id.'',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
List sender identities by account
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/sender_identities |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | SenderIdentity[] |
GET /520/sender_identities HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
[ ]
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sender_identities',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Create sender identity
Type | URL format |
---|---|
POST | https://api.flowmailer.net/{account_id}/sender_identities |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
body | body | SenderIdentity | yes |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
201 | Location |
Name | Type | HTTP status code | Description |
---|---|---|---|
Location | url | 201 | Contains the URL of the newly created API resource |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'POST',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
'Content-Type: application/vnd.flowmailer.v1.12+json',
),
'content' => json_encode($requestbody),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sender_identities',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Delete sender identity
Type | URL format |
---|---|
DELETE | https://api.flowmailer.net/{account_id}/sender_identities/{identity_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
identity_id | path | string | yes | Sender identity ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'DELETE',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sender_identities/'.$identity_id.'',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Get sender identity by id
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/sender_identities/{identity_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
identity_id | path | string | yes | Sender identity ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | SenderIdentity |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sender_identities/'.$identity_id.''
.'?'.http_build_query(array(
)),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Save sender identity
Type | URL format |
---|---|
PUT | https://api.flowmailer.net/{account_id}/sender_identities/{identity_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
body | body | SenderIdentity | yes | ||
identity_id | path | string | yes | Sender identity ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'PUT',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sender_identities/'.$identity_id.'',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
List source systems per account
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/sources |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
statistics | query | boolean | no | true | Whether to include message statistics or not |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | Source[] |
GET /534/sources?statistics=false HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
[ { "id" : "6941", "type" : "FLOWMAILER", "description" : "Flowmailer", "maxMessageSize" : null, "dsnAddress" : null, "feedbackLoopAddress" : null, "lastActive" : "2021-08-18T14:13:34.000+0000", "statistics" : null, "messageSummary" : null }, { "id" : "6953", "type" : "SMTP", "description" : "test source a", "maxMessageSize" : 26214400, "humanReadableDsnAddress" : "support@example.test", "humanReadableDsnEnable" : true, "dsnAddress" : "dsn@example.test", "dsnDisable" : true, "feedbackLoopAddress" : "feedbackloop@example.test", "lastActive" : "2021-08-18T14:13:52.000+0000", "statistics" : null, "messageSummary" : null } ]
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sources'
.';'.http_build_query(array(
), '', ';')
.'?'.http_build_query(array(
'statistics' => $statistics,
)),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Type | URL format |
---|---|
POST | https://api.flowmailer.net/{account_id}/sources |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | ||
body | body | Source | yes |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
201 | Location |
Name | Type | HTTP status code | Description |
---|---|---|---|
Location | url | 201 | Contains the URL of the newly created API resource |
POST /534/sources HTTP/1.1 Host: api.flowmailer.net Authorization: Bearer {access_token} Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8 Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
{ "description" : "test source a", "dsnAddress" : "dsn@example.test", "dsnDisable" : true, "feedbackLoopAddress" : "feedbackloop@example.test", "humanReadableDsnAddress" : "support@example.test", "humanReadableDsnEnable" : true, "maxMessageSize" : 26214400, "tlsRequired" : false, "type" : "SMTP" }
HTTP/1.1 201 Created
Location: https://api.flowmailer.net/534/sources/6953
Content-Length: 0
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'POST',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
'Content-Type: application/vnd.flowmailer.v1.12+json',
),
'content' => json_encode($requestbody),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sources',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Type | URL format |
---|---|
DELETE | https://api.flowmailer.net/{account_id}/sources/{source_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | ||
source_id | path | string | yes |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'DELETE',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sources/'.$source_id.'',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Get a source by id
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/sources/{source_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
source_id | path | string | yes | Source ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | Source |
GET /534/sources/6953 HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
{ "id" : "6953", "type" : "SMTP", "description" : "test source a", "maxMessageSize" : 26214400, "humanReadableDsnAddress" : "support@example.test", "humanReadableDsnEnable" : true, "dsnAddress" : "dsn@example.test", "dsnDisable" : true, "feedbackLoopAddress" : "feedbackloop@example.test", "lastActive" : "2021-08-18T14:13:52.000+0000", "statistics" : null, "messageSummary" : null }
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sources/'.$source_id.'',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Type | URL format |
---|---|
PUT | https://api.flowmailer.net/{account_id}/sources/{source_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | ||
body | body | Source | yes | ||
source_id | path | string | yes |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'PUT',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sources/'.$source_id.'',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
List messages per source
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/sources/{source_id}/messages |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
addheaders | query | boolean | no | false | Whether to add e-mail headers |
addonlinelink | query | boolean | no | false | |
addtags | query | boolean | no | false | |
daterange | matrix | date_range | yes | Date range the message was submitted in |
|
range | header | items_range | yes | Limits the returned list |
|
source_id | path | string | yes | Source ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
206 | Message[] | Content-Range, Next-Range |
Name | Type | HTTP status code | Description |
---|---|---|---|
Content-Range | content_range | 206 | Used to specify which subset of the requested data is returned |
Next-Range | ref_range | 206 | Used to specify the range that should be used in the next api call |
GET /520/sources/6952/messages;daterange=2021-06-11T00:00:00Z,2021-06-12T00:00:00Z?addheaders=true&addonlinelink=true HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
Range: items=0-10
HTTP/1.1 206 Partial Content Content-Range: items 0-10/3 Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
[ { "submitted" : "2021-08-18T14:14:12.000Z", "id" : "20210818141412949bcead2faf1c380d", "transactionId" : "274b9c4136a1483b8c50ea190312f72a", "messageIdHeader" : "<20210818141412949bcead2faf1c380d@return.flowmailer.local>", "messageType" : "EMAIL", "source" : { "id" : "6953", "description" : "test source a" }, "flow" : { "id" : "16812", "description" : "test flow 2" }, "senderAddress" : "support@flowmailer.local", "recipientAddress" : "richard@flowmailer.local", "backendStart" : "2021-08-18T14:14:26.188Z", "backendDone" : "2021-08-18T14:14:26.444Z", "headersIn" : [ { "name" : "MIME-Version", "value" : "1.0" }, { "name" : "From", "value" : "Casper Mout <casper@flowmailer.local>" }, { "name" : "To", "value" : "Richard van Looijen <richard@flowmailer.local>" }, { "name" : "X-Flow", "value" : "flow2" }, { "name" : "Subject", "value" : "test message 2" }, { "name" : "Content-Type", "value" : "text/plain; charset=UTF-8" }, { "name" : "Content-Transfer-Encoding", "value" : "quoted-printable" } ], "headersOut" : [ { "name" : "MIME-Version", "value" : "1.0" }, { "name" : "From", "value" : "Casper Mout <casper@flowmailer.local>" }, { "name" : "To", "value" : "Richard van Looijen <richard@flowmailer.local>" }, { "name" : "X-Flow", "value" : "flow2" }, { "name" : "Subject", "value" : "test message 2" }, { "name" : "Content-Type", "value" : "text/plain; charset=UTF-8" }, { "name" : "Content-Transfer-Encoding", "value" : "quoted-printable" }, { "name" : "Feedback-ID", "value" : "534:534-6953:534-16812:flowmailer" }, { "name" : "Message-ID", "value" : "<20210818141412949bcead2faf1c380d@return.flowmailer.local>" }, { "name" : "Date", "value" : "Wed, 18 Aug 2021 14:14:26 +0000" }, { "name" : "X-Job", "value" : "fm-6953-16812" } ], "onlineLink" : "https://web.flowmailer.net/viewonline.html?id=202108181414121a4a985602b98b47d54b2cc6777a57582c09fe0894bc584b85ea340516bb21f100", "status" : "DELIVERED", "subject" : "test message 2", "from" : "casper@flowmailer.local", "events" : null, "messageDetailsLink" : "https://web.flowmailer.net/viewmessage.html?id=202108181414121a4a985602b98b47d54b2cc6777a57582c09fe0894bc584b85ea340516bb21f100&code=fc31a527263d857339b218ba80dae4619ad0d4e4", "fromAddress" : { "name" : "Casper Mout", "address" : "casper@flowmailer.local" }, "toAddressList" : [ { "name" : "Richard van Looijen", "address" : "richard@flowmailer.local" } ] }, { "submitted" : "2021-08-18T14:14:12.000Z", "id" : "202108181414125beb6d7c0346ad1d91", "transactionId" : "5af2563e63c046368a7c679bbc4a8be3", "messageIdHeader" : null, "messageType" : "EMAIL", "source" : { "id" : "6953", "description" : "test source a" }, "flow" : { "id" : "16812", "description" : "test flow 2" }, "senderAddress" : "support@flowmailer.local", "recipientAddress" : "richard@flowmailer.local", "backendStart" : "2021-08-18T14:14:31.431Z", "backendDone" : null, "headersIn" : [ { "name" : "MIME-Version", "value" : "1.0" }, { "name" : "From", "value" : "Casper Mout <casper@flowmailer.local>" }, { "name" : "To", "value" : "Richard van Looijen <richard@flowmailer.local>" }, { "name" : "X-Flow", "value" : "flow2" }, { "name" : "Subject", "value" : "test message 3" }, { "name" : "Content-Type", "value" : "text/plain; charset=UTF-8" }, { "name" : "Content-Transfer-Encoding", "value" : "quoted-printable" } ], "status" : "ERROR", "subject" : "test message 3", "from" : "casper@flowmailer.local", "events" : null, "fromAddress" : { "name" : "Casper Mout", "address" : "casper@flowmailer.local" }, "toAddressList" : [ { "name" : "Richard van Looijen", "address" : "richard@flowmailer.local" } ] }, { "submitted" : "2021-08-18T14:14:07.000Z", "id" : "20210818141407458f8ff8f89b02eac3", "transactionId" : "1e222a761fee437bade0942ecab4b5b0", "messageIdHeader" : "<20210818141407458f8ff8f89b02eac3@return.flowmailer.local>", "messageType" : "EMAIL", "source" : { "id" : "6953", "description" : "test source a" }, "flow" : { "id" : "16800", "description" : "test flow 1 (updated)" }, "senderAddress" : "support@flowmailer.local", "recipientAddress" : "richard@flowmailer.local", "backendStart" : "2021-08-18T14:14:14.680Z", "backendDone" : "2021-08-18T14:14:26.435Z", "headersIn" : [ { "name" : "MIME-Version", "value" : "1.0" }, { "name" : "From", "value" : "Casper Mout <casper@flowmailer.local>" }, { "name" : "To", "value" : "Richard van Looijen <richard@flowmailer.local>" }, { "name" : "X-Flow", "value" : "flow1" }, { "name" : "Subject", "value" : "test message 1" }, { "name" : "Content-Type", "value" : "text/plain; charset=UTF-8" }, { "name" : "Content-Transfer-Encoding", "value" : "quoted-printable" } ], "headersOut" : [ { "name" : "MIME-Version", "value" : "1.0" }, { "name" : "From", "value" : "Casper Mout <casper@flowmailer.local>" }, { "name" : "To", "value" : "Richard van Looijen <richard@flowmailer.local>" }, { "name" : "X-Flow", "value" : "flow1" }, { "name" : "Subject", "value" : "test message 1" }, { "name" : "Content-Type", "value" : "text/plain; charset=UTF-8" }, { "name" : "Content-Transfer-Encoding", "value" : "quoted-printable" }, { "name" : "Feedback-ID", "value" : "534:534-6953:534-16800:flowmailer" }, { "name" : "Message-ID", "value" : "<20210818141407458f8ff8f89b02eac3@return.flowmailer.local>" }, { "name" : "Date", "value" : "Wed, 18 Aug 2021 14:14:23 +0000" }, { "name" : "X-Job", "value" : "fm-6953-16800" } ], "onlineLink" : "https://web.flowmailer.net/viewonline.html?id=20210818141407f0873bab5ce13fa8167f0023e5540d309a48c1cf96fe1461cac780302b0b7c136d", "status" : "DELIVERED", "subject" : "test message 1", "from" : "casper@flowmailer.local", "events" : null, "messageDetailsLink" : "https://web.flowmailer.net/viewmessage.html?id=20210818141407f0873bab5ce13fa8167f0023e5540d309a48c1cf96fe1461cac780302b0b7c136d&code=7fddef56ce2f925257a6b7f3991ba930e474590a", "fromAddress" : { "name" : "Casper Mout", "address" : "casper@flowmailer.local" }, "toAddressList" : [ { "name" : "Richard van Looijen", "address" : "richard@flowmailer.local" } ] } ]
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
'range: '.$range,
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sources/'.$source_id.'/messages'
.';'.http_build_query(array(
'daterange' => $daterange,
), '', ';')
.'?'.http_build_query(array(
'addheaders' => $addheaders,
'addonlinelink' => $addonlinelink,
'addtags' => $addtags,
)),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Get time based message statistics for a message source
The resolution of the returned data may be lower than specified in the interval
parameter
if the data is old or the requested date range is too large.
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/sources/{source_id}/stats |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
daterange | matrix | date_range | yes | Date range the messages were submitted in |
|
interval | matrix | integer | no | Time difference between samples |
|
source_id | path | string | yes | Source ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | DataSets |
GET /532/sources/6953/stats;daterange=2020-03-19T00:00:00Z,2020-03-20T00:00:00Z;interval=86400 HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
{ "list" : [ { "name" : "processed", "samples" : [ { "timestamp" : "2020-03-19T00:00:00.000Z", "value" : 2 } ] }, { "name" : "email", "samples" : [ { "timestamp" : "2020-03-19T00:00:00.000Z", "value" : 2 } ] }, { "name" : "sms", "samples" : [ { "timestamp" : "2020-03-19T00:00:00.000Z", "value" : 0 } ] }, { "name" : "sent", "samples" : [ { "timestamp" : "2020-03-19T00:00:00.000Z", "value" : 2 } ] }, { "name" : "delivered", "samples" : [ { "timestamp" : "2020-03-19T00:00:00.000Z", "value" : 2 } ] }, { "name" : "deliver_time", "samples" : [ { "timestamp" : "2020-03-19T00:00:00.000Z", "value" : 0 } ] }, { "name" : "opened", "samples" : [ { "timestamp" : "2020-03-19T00:00:00.000Z", "value" : 0 } ] }, { "name" : "unique_opened", "samples" : [ { "timestamp" : "2020-03-19T00:00:00.000Z", "value" : 0 } ] }, { "name" : "clicked", "samples" : [ { "timestamp" : "2020-03-19T00:00:00.000Z", "value" : 0 } ] }, { "name" : "unique_clicked", "samples" : [ { "timestamp" : "2020-03-19T00:00:00.000Z", "value" : 0 } ] } ] }
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sources/'.$source_id.'/stats'
.';'.http_build_query(array(
'daterange' => $daterange,
'interval' => $interval,
), '', ';'),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
List credentials per source system
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/sources/{source_id}/users |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
source_id | path | string | yes | Source ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | Credentials[] |
GET /534/sources/6953/users HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
[ { "id" : "10269", "sourceId" : "6953", "username" : "atlJLybKB8RYCI6Q", "password" : null, "contactInfo" : "Contact support@flowmailer.com for information about these source credentials", "description" : "source credentials 1", "protocol" : "SMTP", "allowedSenders" : [ "support2@example.test", "support@example.test" ], "allowedAddresses" : [ "123.123.123.0/24", "124.124.124.124" ] } ]
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sources/'.$source_id.'/users',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Type | URL format |
---|---|
POST | https://api.flowmailer.net/{account_id}/sources/{source_id}/users |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | ||
body | body | Credentials | yes | ||
source_id | path | string | yes |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
201 | Credentials | Location |
Name | Type | HTTP status code | Description |
---|---|---|---|
Location | url | 201 | Contains the URL of the newly created API resource |
POST /534/sources/6953/users HTTP/1.1 Host: api.flowmailer.net Authorization: Bearer {access_token} Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8 Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
{ "allowedAddresses" : [ "123.123.123.0/24", "124.124.124.124" ], "allowedSenders" : [ "support@example.test", "support2@example.test" ], "contactInfo" : "Contact support@flowmailer.com for information about these source credentials", "description" : "source credentials 1", "protocol" : "SMTP", "sourceId" : "6953" }
HTTP/1.1 201 Created Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
{ "id" : "10269", "sourceId" : "6953", "username" : "atlJLybKB8RYCI6Q", "password" : "1BudAALcJKCqOomT", "contactInfo" : "Contact support@flowmailer.com for information about these source credentials", "description" : "source credentials 1", "protocol" : "SMTP", "allowedSenders" : [ "support2@example.test", "support@example.test" ], "allowedAddresses" : [ "123.123.123.0/24", "124.124.124.124" ] }
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'POST',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
'Content-Type: application/vnd.flowmailer.v1.12+json',
),
'content' => json_encode($requestbody),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sources/'.$source_id.'/users',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Type | URL format |
---|---|
DELETE | https://api.flowmailer.net/{account_id}/sources/{source_id}/users/{user_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | ||
source_id | path | string | yes | ||
user_id | path | string | yes |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'DELETE',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sources/'.$source_id.'/users/'.$user_id.'',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/sources/{source_id}/users/{user_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | ||
source_id | path | string | yes | ||
user_id | path | string | yes |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | Credentials |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sources/'.$source_id.'/users/'.$user_id.'',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Type | URL format |
---|---|
PUT | https://api.flowmailer.net/{account_id}/sources/{source_id}/users/{user_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | ||
body | body | Credentials | yes | ||
source_id | path | string | yes | ||
user_id | path | string | yes |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | Credentials |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'PUT',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/sources/'.$source_id.'/users/'.$user_id.'',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
List messages per tag
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/tag/{tag}/messages |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
addheaders | query | boolean | no | false | Whether to add e-mail headers |
addonlinelink | query | boolean | no | false | Whether to add online link |
addtags | query | boolean | no | false | |
daterange | matrix | date_range | no | Date range the messages were submitted in |
|
range | header | ref_range | yes | Limits the returned list |
|
sortorder | query | string | no | ||
tag | path | string | yes | Tag |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
206 | Message[] | Content-Range, Next-Range |
Name | Type | HTTP status code | Description |
---|---|---|---|
Content-Range | content_range | 206 | Used to specify which subset of the requested data is returned |
Next-Range | ref_range | 206 | Used to specify the range that should be used in the next api call |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
'range: '.$range,
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/tag/'.$tag.'/messages'
.';'.http_build_query(array(
'daterange' => $daterange,
), '', ';')
.'?'.http_build_query(array(
'addheaders' => $addheaders,
'addonlinelink' => $addonlinelink,
'addtags' => $addtags,
'sortorder' => $sortorder,
)),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
List templates by account
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/templates |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | Template[] |
GET /532/templates HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
[ { "id" : "26462", "description" : "template 1", "mimeType" : "text/plain", "templateEngine" : "freemarker-2.3.20", "data" : null }, { "id" : "26464", "description" : "template 2", "mimeType" : "text/plain", "templateEngine" : "freemarker-2.3.20", "data" : null } ]
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/templates',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Create template
Type | URL format |
---|---|
POST | https://api.flowmailer.net/{account_id}/templates |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
body | body | Template | yes | Template object |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
201 | Location |
Name | Type | HTTP status code | Description |
---|---|---|---|
Location | url | 201 | Contains the URL of the newly created API resource |
POST /532/templates HTTP/1.1 Host: api.flowmailer.net Authorization: Bearer {access_token} Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8 Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
{ "data" : "<html><body>html template ${var1}<br/>\\n<#-- REGION: region1 -->\\nmet twee regions<br/>\\n<#-- END REGION: region1 -->\\nnog wat onaanpasbare tekst<br/>\\n<#-- REGION: region2 -->\\ntekst in de tweede region<br/>\\nnog een regel<br/>\\n<#-- END REGION: region2 -->\\nnog meer onaanpasbare tekst\\n<br/></body></html>", "description" : "template 2", "mimeType" : "text/plain", "templateEngine" : "freemarker-2.3.20" }
HTTP/1.1 201 Created
Location: https://api.flowmailer.net/532/templates/26464
Content-Length: 0
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'POST',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
'Content-Type: application/vnd.flowmailer.v1.12+json',
),
'content' => json_encode($requestbody),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/templates',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Delete template by id
Type | URL format |
---|---|
DELETE | https://api.flowmailer.net/{account_id}/templates/{template_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
template_id | path | string | yes | Template ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'DELETE',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/templates/'.$template_id.'',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Get template by id
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/templates/{template_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
template_id | path | string | yes | Template ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 | Template |
GET /532/templates/26462 HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
HTTP/1.1 200 OK Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
{ "id" : "26462", "description" : "template 1", "mimeType" : "text/plain", "templateEngine" : "freemarker-2.3.20", "data" : "<html><body>html template<br/>\\n<#-- REGION: region1 -->\\nmet twee regions<br/>\\n<#-- END REGION: region1 -->\\nnog wat onaanpasbare tekst<br/>\\n<#-- REGION: region2 -->\\ntekst in de tweede region<br/>\\nnog een regel<br/>\\n<#-- END REGION: region2 -->\\nnog meer onaanpasbare tekst\\n<br/></body></html>" }
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/templates/'.$template_id.'',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Save template
Type | URL format |
---|---|
PUT | https://api.flowmailer.net/{account_id}/templates/{template_id} |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
body | body | Template | yes | Template object |
|
template_id | path | string | yes | Template ID |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
200 |
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'PUT',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/templates/'.$template_id.'',
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
List undeliverable messages
Type | URL format |
---|---|
GET | https://api.flowmailer.net/{account_id}/undeliveredmessages |
Name | Location | Type | Required | Default | Description |
---|---|---|---|---|---|
account_id | path | string | yes | Account ID |
|
addevents | query | boolean | no | false | Whether to add message events |
addheaders | query | boolean | no | false | Whether to add e-mail headers |
addonlinelink | query | boolean | no | false | |
addtags | query | boolean | no | false | |
daterange | matrix | date_range | no | Date range the message was submitted in |
|
range | header | ref_range | yes | Limits the returned list |
|
receivedrange | matrix | date_range | no | Date range the message bounced |
|
sortorder | query | string | no |
HTTP Status Code | Response Model | Response Headers | Description |
---|---|---|---|
206 | BouncedMessage[] | Content-Range, Next-Range |
Name | Type | HTTP status code | Description |
---|---|---|---|
Content-Range | content_range | 206 | Used to specify which subset of the requested data is returned |
Next-Range | ref_range | 206 | Used to specify the range that should be used in the next api call |
GET /532/undeliveredmessages;daterange=2020-03-19T00:00:00Z,2020-03-20T00:00:00Z?addevents=true&addheaders=true&addonlinelink=true HTTP/1.1
Host: api.flowmailer.net
Authorization: Bearer {access_token}
Accept: application/vnd.flowmailer.v1.12+json;charset=UTF-8
Range: items=:10
HTTP/1.1 206 Partial Content Content-Range: items :10/* Content-Type: application/vnd.flowmailer.v1.12+json;charset=UTF-8
[ ]
<?php
$options = array(
'http' =>
array (
'ignore_errors' => true,
'method' => 'GET',
'header' =>
array (
'Authorization: Bearer '.$access_token,
'Accept: application/vnd.flowmailer.v1.12+json',
'range: '.$range,
),
),
);
$context = stream_context_create($options);
$response = file_get_contents(
'https://api.flowmailer.net/'.$account_id.'/undeliveredmessages'
.';'.http_build_query(array(
'daterange' => $daterange,
'receivedrange' => $receivedrange,
), '', ';')
.'?'.http_build_query(array(
'addevents' => $addevents,
'addheaders' => $addheaders,
'addonlinelink' => $addonlinelink,
'addtags' => $addtags,
'sortorder' => $sortorder,
)),
false,
$context
);
$response = json_decode($response);
$headers = http_parse_headers(implode("\r\n", $http_response_header));
$statuscode = $headers["Response Code"];
?>
Name | Type | Description |
---|---|---|
address | string | Email address or phone number |
name | string | Display name, only used for email messages |
Name | Type | Description |
---|---|---|
content | base64 | |
contentId | string | Content-ID header (required for disposition Example: |
contentType | string | Examples: |
disposition | string | Content-Disposition header for the attachment. Supported values include: Special value |
filename | string |
Undeliverable message
Name | Type | Description |
---|---|---|
backendDone | date | The time flowmailer was done processing this message |
backendStart | date | The time flowmailer started processing this message |
bounceReceived | date | Date on which the message was bounced |
bounceSnippet | string | |
bounceSubType | string | |
bounceType | string | |
events | MessageEvent[] | Message events Ordered by received, new events first. |
flow | ObjectDescription | Flow this message was processed in |
from | string | The email address in |
fromAddress | Address | The address in |
headersIn | Header[] | E-Mail headers of the submitted email message. Only applicable when |
headersOut | Header[] | Headers of the final e-mail. Only applicable when |
id | string | Message id |
messageDetailsLink | string | Link for the message details page. With resend button. |
messageIdHeader | string | Content of the |
messageType | string | Message type: |
onlineLink | string | Last online link |
recipientAddress | string | Recipient address |
senderAddress | string | Sender address |
source | ObjectDescription | Source system that submitted this message |
status | string | Current message status |
subject | string | Message subject Only applicable when |
submitted | date | The time this message was submitted to flowmailer |
tags | string[] | Message tags, only available for api calls with |
toAddressList | Address[] | The recipients in the |
transactionId | string | The SMTP transaction id, returned with the SMTP |
Source system credentials
Name | Type | Description |
---|---|---|
allowedAddresses | string[] | Allowed IP addresses that can connect to Flowmailer using these credentials |
allowedSenders | string[] | |
contactInfo | string | Contact info for these credentials |
description | string | Description |
id | string | Source credentials ID |
inboundDomain | string | |
inboundRecipients | InboundRecipient[] | |
password | string | Password |
protocol | string | Protocol:
|
sourceId | string | Source ID |
username | string | Username |
Name | Type | Description |
---|---|---|
expression | string | Expression |
value | string | Value which must match the result of the expression |
Data set with statistics
Name | Type | Description |
---|---|---|
name | string | Data set name |
samples | Sample[] | List of samples in this dataset |
Multiple data sets
Name | Type | Description |
---|---|---|
list | DataSet[] | List of data sets |
Name | Type | Description |
---|---|---|
cnameTarget | string | |
domain | string | |
publicKey | string | |
selector | string |
DNS record that should be configured
Name | Type | Description |
---|---|---|
errorMessages | string[] | Error messages for this DNS record Only filled when DNS records are validated. |
name | string | Record name |
status | string | Current record status Only filled when DNS records are validated. Possible values:
|
type | string | Record type |
value | string | Record value description in HTML |
warningMessages | string[] | Warning messages for this DNS record Only filled when DNS records are validated. |
warnings |
Name | Type | Description |
---|---|---|
arguments | Object[] | |
code | string | |
defaultMessage | string | |
field | string | |
objectName | string | |
rejectedValue | Object |
Name | Type | Description |
---|---|---|
allErrors | Error[] | List of errors |
Event flow
Name | Type | Description |
---|---|---|
description | string | Flow description |
id | string | Flow ID |
parentId | string | Id of the flow parent |
steps | FlowStep[] | Flow steps that each message in this flow will be processed by |
Conditions which must be true for a event to use a flow
Name | Type | Description |
---|---|---|
dataExpression | DataExpression | |
dataExpressionValue | string | |
dataExpressions | DataExpression[] | Data expressions which must be present in the message |
eventFlowId | string | Flow ID of the flow the events will use if the specified conditions are true |
eventType | string | Match type of the event |
header | Header | |
headerValue | string | |
headers | Header[] | Email headers which must be present in the message |
linkName | string | Name of the link that was clicked for CLICK events |
linkTarget | string | Url of the link that was clicked for CLICK events |
messageFlowId | string | Message Flow ID which handled the original message |
Name | Type | Description |
---|---|---|
message | string | |
type | string |
Filtered recipient address
Name | Type | Description |
---|---|---|
accountId | string | Account ID |
address | string | Filtered recipient address |
date | date | Date on which this filter was added |
expiresOn | date | Date on which this filter expires |
id | string | Filter ID |
messageReturn | MessageReturn | Message event that was the reason for creating this filter |
messageType | string | This filter is for message type: |
reason | string | Filter reason |
Message flow
Name | Type | Description |
---|---|---|
description | string | Flow description |
id | string | Flow ID |
messageSummary | MessageSummary | |
statistics | Sample[] | |
steps | FlowStep[] | Flow steps that each message in this flow will be processed by |
templateId | string | Id of the flow template |
Conditions which must be true for a message to use a flow
Name | Type | Description |
---|---|---|
dataExpressions | DataExpression[] | Data expressions which must be present in the message |
flowId | string | Flow ID of the flow the messages will use if the specified conditions are true |
flowSelector | string | Flow selector |
headers | Header[] | Email headers which must be present in the message |
sender | string | Sender email address or phone number |
sourceId | string | Source ID which must have submitted the message |
A processing step in a flow
Name | Type | Description |
---|---|---|
addAttachment | FlowStepAddAttachment | Only applicable and required when |
aggregate | FlowStepAggregate | Only applicable when |
applyToLinkDomains | string | Comma separated list of link domains to modify for analytics parameters. Only applicable when |
archive | FlowStepArchive | Only applicable and required when |
divisor | integer | Only applicable when |
enabledExpression | string | |
errorOnNotFound | boolean | Indicates whether the contact is required or not. Only applicable when |
externalContent | FlowStepExternalContent | Only applicable and required when |
externalData | FlowStepExternalData | Only applicable and required when |
extractData | FlowStepExtractData | Only applicable and required when |
id | string | Flow step ID |
mailPlusApiCredentials | MailPlusAPICredentials | Credentials to use for retrieving contacts from MailPlus Only applicable when |
overwriteUrlParameters | boolean | Overwrite existing URL Parameters in links. Only applicable when |
resubmitMessage | FlowStepResubmitMessage | Only applicable when |
rewriteRecipient | FlowStepRewriteRecipient | Only applicable and required when |
schedule | FlowStepSchedule | Only applicable when |
setHeader | FlowStepSetHeader | Only applicable and required when |
setSender | FlowStepSetSender | Only applicable and required when |
subjectTemplate | string | Template for the new subject. Template variables can be used in this field. Only applicable when |
template | ObjectDescription | Only applicable when |
to | string | Email address the BCC mail will be sent to Only applicable and required when |
type | string | Flow step type |
urlParametersTemplate | string | URL Parameters to add to all links. Template variables can be used in this field. Only applicable when |
Name | Type | Description |
---|---|---|
urlTemplate | string | URL to load the external content from. Template variables can be used in this field. |
Name | Type | Description |
---|---|---|
alwaysSendFirst | boolean | |
maxTimeSeconds | integer | |
quietTimeSeconds | integer |
Name | Type | Description |
---|---|---|
onlineLink | boolean | Indicates whether this archive is available for online version link |
retention | string | ISO8601 period notation indicating a shorter retention time (than account settings) for message archives created by this flow step. The following values are valid P1M, P3M, P6M, P1Y Empty means that the account retention time will be applied. |
Name | Type | Description |
---|---|---|
resultVariable | string | Variable to store the external content in |
urlTemplate | string | URL to load the external content from. Template variables can be used in this field. |
Name | Type | Description |
---|---|---|
fullResponseInVariable | boolean | When true the result variable will be filled with a structure that also contains the response headers. When false the result variable will be filled with just the response body. |
requestBodyTemplate | string | Template text for the request body Only useful for the following request methods |
requestHeaders | Header[] | Request headers for external data HTTP request |
requestMethod | string | HTTP request method Valid values:
|
resultFormat | string | Format of the external data, |
resultVariable | string | Variable to store the external content in |
urlTemplate | string | URL to load the external content from. Template variables can be used in this field. |
Name | Type | Description |
---|---|---|
dataType | string | |
filename | string | |
htmlDecodeText | boolean | |
mimeType | string | |
removeMimePart | boolean | |
selector | string |
Name | Type | Description |
---|---|---|
account | ObjectDescription | Account to submit the message to |
duplicateMessage | boolean | |
flowSelector | string | Selector of the flow to submit the message to |
headerName | string | Name of the header to add to the email |
headerValue | string | Value to set in the header |
source | ObjectDescription | Source to submit the message to |
Name | Type | Description |
---|---|---|
messageType | string | |
recipientNameTemplate | string | |
recipientTemplate | string |
Name | Type | Description |
---|---|---|
maxMessagesPerHour | integer | |
offsetType | string | |
offsetValue | integer | |
scheduledTimeTemplate | string | |
timeRangeDay0 | string | |
timeRangeDay1 | string | |
timeRangeDay2 | string | |
timeRangeDay3 | string | |
timeRangeDay4 | string | |
timeRangeDay5 | string | |
timeRangeDay6 | string | |
timeZone | string |
Name | Type | Description |
---|---|---|
headerName | string | Name of the header to add to the email |
headerValue | string | Value to set in the header |
Name | Type | Description |
---|---|---|
senderNameTemplate | string | |
senderSetName | boolean | |
senderTemplate | string |
Message flow template
Name | Type | Description |
---|---|---|
description | string | Flow description |
editable | boolean | |
id | string | Flow template ID |
steps | FlowStep[] | Flow steps that each message in this flow will be processed by |
templateId | string | Id of the parent flow |
Name | Type | Description |
---|---|---|
name | string | Header name |
value | string | Header value |
Name | Type | Description |
---|---|---|
destinationRecipient | string | |
inboundAddress | string |
Spotler API credentials
Name | Type | Description |
---|---|---|
consumerKey | string | Consumer key |
consumerSecret | string | Consumer secret |
Name | Type | Description |
---|---|---|
backendDone | date | The time flowmailer was done processing this message |
backendStart | date | The time flowmailer started processing this message |
events | MessageEvent[] | Message events Ordered by received, new events first. |
flow | ObjectDescription | Flow this message was processed in |
from | string | The email address in |
fromAddress | Address | The address in |
headersIn | Header[] | E-Mail headers of the submitted email message. Only applicable when |
headersOut | Header[] | Headers of the final e-mail. Only applicable when |
id | string | Message id |
messageDetailsLink | string | Link for the message details page. With resend button. |
messageIdHeader | string | Content of the |
messageType | string | Message type: |
onlineLink | string | Last online link |
recipientAddress | string | Recipient address |
senderAddress | string | Sender address |
source | ObjectDescription | Source system that submitted this message |
status | string | Current message status |
subject | string | Message subject Only applicable when |
submitted | date | The time this message was submitted to flowmailer |
tags | string[] | Message tags, only available for api calls with |
toAddressList | Address[] | The recipients in the |
transactionId | string | The SMTP transaction id, returned with the SMTP |
Archived message text and/or html
Name | Type | Description |
---|---|---|
attachments | Attachment[] | Attachments, without the content Only applicable when |
data | Object | |
flowStepId | string | The archive flow step that created this archived message |
html | string | Archived message html |
messageDetailsLink | string | Link for the message details page. With resend button. Only applicable when |
messageType | string |
|
onlineLink | string | Online link Only applicable when |
onlineVersion | boolean | Indicates whether this archive is available for online version link |
subject | string | Archived message subject |
text | string | Archived message text |
Message event
Name | Type | Description |
---|---|---|
data | base64 | Event data |
deviceCategory | string | |
extraData | Event data |
|
id | string | Message event ID |
inserted | Database insert date |
|
linkName | string | |
linkTarget | string | |
messageId | string | Message ID |
messageTags | string[] | Message tags Only filled for the |
mta | string | MTA that reported this event |
operatingSystem | string | |
operatingSystemVersion | string | |
received | date | Event date |
referer | string | |
remoteAddr | string | |
snippet | string | Bounce snippet or SMTP conversation snippet |
subType | Bounce sub type |
|
tag | Custom event type |
|
type | string | Event type, must be |
userAgent | string | |
userAgentDisplayName | string | |
userAgentString | string | |
userAgentType | string | |
userAgentVersion | string |
Messages that could not be processed
Name | Type | Description |
---|---|---|
backendDone | date | The time flowmailer was done processing this message |
data | base64 | MIME message data or text for SMS messages |
dataCoding | byte | Only for SMS messages |
errorText | string | Message error text |
extraData | Object | |
flow | ObjectDescription | The selected flow |
messageId | string | Message ID |
messageType | string | Message type: |
reason | string | Message processing failure reason |
recipient | string | Message recipient address |
sender | string | Message sender address |
source | ObjectDescription | Source system that submitted this message |
status | string | Message status |
submitted | date | Message submit date |
transactionId | string | Transaction ID |
Message event
Name | Type | Description |
---|---|---|
data | base64 | Event data |
deviceCategory | string | |
extraData | Event data |
|
id | string | Message event ID |
inserted | Database insert date |
|
linkName | string | |
linkTarget | string | |
messageId | string | Message ID |
messageTags | string[] | Message tags Only filled for the |
mta | string | MTA that reported this event |
operatingSystem | string | |
operatingSystemVersion | string | |
received | date | Event date |
referer | string | |
remoteAddr | string | |
snippet | string | Bounce snippet or SMTP conversation snippet |
sourceMta | ||
subType | Bounce sub type |
|
tag | Custom event type |
|
type | string | Event type, must be |
userAgent | string | |
userAgentDisplayName | string | |
userAgentString | string | |
userAgentType | string | |
userAgentVersion | string |
Message statistics summary
Name | Type | Description |
---|---|---|
averageDeliverTimeMillis | integer | Average delivery time in milliseconds |
clicked | integer | Number of times a link has been clicked |
delivered | integer | Number of messages delivered |
opened | integer | Number of times a message has been opened |
processed | integer | Number of messages processed |
sent | integer | Number of messages sent |
uniqueClicked | integer | Number of messages in which a link has been clicked |
uniqueOpened | integer | Number of messages that have been opened |
Name | Type | Description |
---|---|---|
name | string | |
other | boolean | |
value | integer |
Name | Type | Description |
---|---|---|
error | string | |
error_description | string | |
error_uri | string |
Name | Type | Description |
---|---|---|
access_token | string | The requested access token |
expires_in | integer | The number of seconds this token is valid |
scope | string | Only api is supported |
token_type | string | Type of the returned token, only bearer is supported |
Generic resource model with an ID and description.
Name | Type | Description |
---|---|---|
description | string | Resource description |
id | string | Resource ID |
Statistics for a single recipient
Name | Type | Description |
---|---|---|
address | string | Recipient email address or phone number |
filters | Filter[] | One or more filters for this recipient |
messageSummary | MessageSummary | Message statistics for this recipient |
Name | Type | Description |
---|---|---|
recipientAddress | string | Override recipient email address or phone number. |
Name | Type | Description |
---|---|---|
timestamp | date | |
value | integer |
Name | Type | Description |
---|---|---|
created | date | |
description | string | |
extraData | Object | |
fromAddress | string | |
fromName | string | |
id | string | |
messageType | string | |
mimedata | base64 | |
sender | string | |
source | ObjectDescription |
a SenderDomain configures which return-path and online tracking domain is used to send messages
DKIM keys are created for each configured SenderDomain.
DNS records are filled for the following api calls:
1. POST /{account_id}/sender_domains/validate
2. GET /{account_id}/sender_domains/{domain_id}
3. GET /{account_id}/sender_domains/by_domain/{domain}
DNS records are validated for the following api calls:
1. POST /{account_id}/sender_domains/validate
2. GET /{account_id}/sender_domains/{domain_id}
when validate
parameter is true
3. GET /{account_id}/sender_domains/by_domain/{domain}
when validate
parameter is true
Name | Type | Description |
---|---|---|
dnsRecords | DnsRecord[] | List of DNS records that should exist |
id | string | ID of this SenderDomain |
returnPathDomain | string | Domain used for bounce receiving, usually a subdomain of the |
senderDomain | string | Domain used to select this SenderDomain for emails with a matching |
warnings | Error[] | Only filled when DNS records are validated. |
webDomain | string | Domain used for online tracking, usually a subdomain of the |
Sender identities are used to rewrite sender information.
Called 'sender rewrites' in Flowmailer dashboard.
Name | Type | Description |
---|---|---|
accountFallback | boolean | |
description | string | |
dkimKeys | DkimKey[] | |
id | string | |
returnPathDomain | string | |
selectionType | string | |
selectionValue | string | |
senderEmail | string | |
senderName | string | |
webDomain | string |
Name | Type | Description |
---|---|---|
attachments | Attachment[] | Attachments Only applicable when |
data | Object | Extra data that will be available in templates |
deliveryNotificationType | string |
Defaults to Only applicable when |
flowSelector | string | Freely configurable value that can be used to select a flow or one of its variants. Examples: invoice, previsit, ticket. |
headerFromAddress | string | From header address Only applicable when |
headerFromName | string | From header name Only applicable when |
headerToAddress | string | To header address Only applicable when |
headerToName | string | To header name Only applicable when |
headers | Header[] | Email headers |
html | string | Email HTML content Only applicable when |
messageType | string |
|
mimedata | base64 | Complete email MIME message with headers. Only applicable when |
recipientAddress | string | Recipient email address or phone number. For email messages this cannot contain a display name. |
scheduleAt | date | |
senderAddress | string | Sender email address or phone number. For email messages this cannot contain a display name. |
sourceId | string | |
subject | string | Email subject |
tags | string[] | Tags |
text | string | Text content |
Name | Type | Description |
---|---|---|
attachments | Attachment[] | Attachments, without the content Only applicable when |
data | Object | |
flow | ObjectDescription | |
html | string | Archived message html |
messageType | string |
|
subject | string | Archived message subject |
text | string | Archived message text |
Information about a source system
A source system can submit messages to flowmailer.
Name | Type | Description |
---|---|---|
description | string | Source description |
dsnAddress | string | Email DSN messages will be sent to this address |
dsnDisable | boolean | Disable sending DSN messages for this source |
feedbackLoopAddress | string | Email feedback loop messages will be sent to this address |
humanReadableDsnAddress | string | Human readable notifications for undelivered messages will be sent to this address |
humanReadableDsnEnable | boolean | Enable sending human readable notifications for undelivered messages for this source |
id | string | Source ID |
lastActive | date | Date this source was last active |
maxMessageSize | integer | Maximum message size in bytes |
messageSummary | MessageSummary | Message statistics summary for this source |
statistics | Sample[] | Message statistics for this source |
tlsRequired | boolean | |
type | Source type:
|
An email or sms message that can be submitted to Flowmailer.
Name | Type | Description |
---|---|---|
attachments | Attachment[] | Attachments Only applicable when |
data | Object | Extra data that will be available in templates |
deliveryNotificationType | string |
Defaults to Only applicable when |
flowSelector | string | Freely configurable value that can be used to select a flow or one of its variants. Examples: invoice, previsit, ticket. |
headerFromAddress | string | From header address Only applicable when |
headerFromName | string | From header name Only applicable when |
headerToAddress | string | To header address Only applicable when |
headerToName | string | To header name Only applicable when |
headers | Header[] | Email headers |
html | string | Email HTML content Only applicable when |
messageType | string |
|
mimedata | base64 | Complete email MIME message with headers. Only applicable when |
recipientAddress | string | Recipient email address or phone number. For email messages this cannot contain a display name. |
scheduleAt | date | |
senderAddress | string | Sender email address or phone number. For email messages this cannot contain a display name. |
subject | string | Email subject |
tags | string[] | Tags |
text | string | Text content |
A flowmailer content template
Name | Type | Description |
---|---|---|
contentId | string | Content-ID header (required for disposition Example: Only supported for custom content-types. |
data | string | Template content |
decodeBase64 | boolean | Decode Base64 Only supported for custom content-types. |
description | string | Template description |
disposition | string | Content-Disposition header for the attachment. Supported values include: Special value Only supported for custom content-types. |
filename | string | Content filename. Only supported for custom content-types and |
id | string | Template ID |
mimeType | string | Supported mime types:
|
templateEngine | string | The only supported template engine is |