Skip to content

Retrieving a list of Mailing Templates

GET /mailing-templates

Returns a list of Mailing Templates sorted by the name property.

Request Parameters

Parameter Required In Description Constraints
order no query Orders Mailing Templates asc (ascending) or desc (descending) based on the name property. Default is asc. The ordering is case insensitive.
isApproved no query Filters Mailing Templates based on whether they are approved (true) or not (false) (do or do not have an approved Mailing Template Version). Parameters hasDraft and isApproved cannot simultaneously have the value false.
hasDraft no query Filters Mailing Templates based on whether they have a draft Mailing Template Version (true) or not (false). Parameters hasDraft and isApproved cannot simultaneously have the value false.
pageSize no query Specifies the number of results per page. Default: 1000

Response Structure

Path Type Description
id String The ID of the Mailing Template instance
name String The name of the Mailing Template instance
isApproved Boolean Indicates whether an approved version exists for this Mailing Template
hasDraft Boolean Indicates whether a draft version exists for this Mailing Template

Basic Example

Request:

$ curl 'https://myka-1.my-api.inxmail.de/mailing-templates' -i -X GET \
    -H 'Authorization: Basic <base64Encoded user:password>'

Response:

HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Content-Length: ...

{
    "_embedded": {
        "inx:mailing-templates": [
            {
                "id": "0b8e30a3-d88f-4fac-991b-9bf231c86194",
                "name": "Example Mailing Template 1",
                "isApproved": true,
                "hasDraft": false
            },
            {
                "id": "624d03cc-6e59-4862-ac38-acf96d1769a3",
                "name": "Example Mailing Template 2",
                "isApproved": true,
                "hasDraft": true
            },
        ]
    },
    "_links": {
        "self": {
            "href": "https://myka-1.my-api.inxmail.de/mailing-templates"
        },
        "next": {
            "href": "https://myka-1.my-api.inxmail.de/mailing-templates?cursor=eyJsYXN0TmFtZSI6InRlbXBsYXRlIiwgImN1cnNvcklkIjogImFiYyJ9"
        },
        "curies": [
            {
                "href": "https://apidocs.inxmail.com/nxp/rest/v1/relations/{rel}",
                "name": "inx",
                "templated": true
            }
        ]
    }
}