GreenArrow Email Software Documentation

Virtual MTAs API

Virtual MTA Attributes

id

integer

The id of the Virtual MTA

type

string

The type of the Virtual MTA. Can be one of: ipaddr, relay, virtualmta, default_route

name

string

The name of the Virtual MTA

Get a List of Virtual MTAs

Get a list of the basic details of all Virtual MTAs available to user’s organization.

URL

GET /ga/api/v2/virtual_mtas

Request Parameters

The following parameters may be included as part of the query string:

name

string

Get a list of Virtual MTA with this exact, case-insensitive name.

name_contains

string

Get a list of Virtual MTAs fields whose name contains this case-insensitive string.

type

string

Get a list of Virtual MTA with this exact, case-insensitive type.

order_by

string

Specify a Virtual MTA field by which to sort the results.

Valid values include: type, name, and id

Sorting by name is case-insensitive. Sorting by type will be sub-ordered by name. Defaults to sorting by id.

Response

The response will be a JSON array where each element contains the “Virtual MTA Attributes” above.

This endpoint returns paginated records with a default page size of 2000.

Example

GET /ga/api/v2/virtual_mtas

HTTP/1.1 200 OK

{
  "success": true,
  "data": [
    {
      "id": 0,
      "name": "System Default Route",
      "type": "default_route"
    }
  ],
  "error_code": null,
  "error_message": null,
  "page": 0,
  "per_page": 2000,
  "num_records": 1,
  "num_pages": 1
}

Get a Single Virtual MTA

Get all the basic details of a single Virtual MTA.

URL

GET /ga/api/v2/virtual_mta/:id

Request Parameters

This API method does not require any additional parameters.

Response

The response will be a JSON object containing the “Virtual MTA Attributes” above.

Example

Note that the JSON response will not be “pretty formatted” as it is below.

GET /ga/api/v2/virtual_mtas/23

HTTP/1.1 200 OK

{
  "success": true,
  "data": {
    "id": 23,
    "name": "My ip address",
    "type": "ipaddr"
  },
  "error_code": null,
  "error_message": null
}


Copyright © 2012–2024 GreenArrow Email