MeiroDocs

Email Exports

+ Entity's `status` possible values: `waiting`, `running`, `finished`, `error`, `canceled`

Section: Group Email Exports. Base URL: https://instance_name.meiro.io/api/.

Email Exports [/emails/{email_id}/exports{?limit,offset}]

  • Entity's status possible values: waiting, running, finished, error, canceled

List All Email Segment Exports [GET]

Required feature (one of):

  • emails/view

  • Parameters

    • limit (number, optional) - Limit of the number of records returned
    • offset (number, optional) - Offset for the number of records returned
  • Request (application/json)

    • Headers

      X-Access-Token: 1234567890abcdef

  • Response 200 (application/json)

{
    "email_exports": [
        {
            "id": 100,
            "user_id": 200,
            "segments": [
                {
                    "id": 100,
                    "name": "segment name",
                    "type": "custom",
                    "deleted": false
                }
            ],
            "name": "export example",
            "status": "running",
            "stats": {
                "statuses_history": {
                    "waiting": "2017-01-01 15:35:00",
                    "running": "2017-01-01 15:35:00",
                    "finished": "2017-01-01 15:35:00"
                }
            },
            "message_counts": {
                "total": 123,
                "sent": 100,
                "excluded_invalid": 3,
                "excluded_by_frequency_cap": 20
            },
            "created": "2017-01-01 15:35:00"
        }
    ],
    "selection_settings": {
        "limit": 20,
        "offset": null
    }
}

Email Export [/emails/{email_id}/exports/{export_id}]

  • Entity's status possible values: waiting, running, finished, error, canceled

Retrieve Email Segment Export [GET]

Required feature (one of):

  • emails/view

  • Request (application/json)

    • Headers

      X-Access-Token: 1234567890abcdef

  • Response 200 (application/json)

{
    "email_export": {
        "id": 100,
        "user_id": 200,
        "segments": [
            {
                "id": 100,
                "name": "segment name",
                "type": "custom",
                "deleted": false
            }
        ],
        "name": "export example",
        "status": "running",
        "stats": {
            "statuses_history": {
                "waiting": "2017-01-01 15:35:00",
                "running": "2017-01-01 15:35:00",
                "finished": "2017-01-01 15:35:00"
            }
        },
        "message_counts": {
            "total": 123,
            "sent": 100,
            "excluded_invalid": 3,
            "excluded_by_frequency_cap": 20
        },
        "created": "2017-01-01 15:35:00"
    }
}
  • Response 404 (application/json)
{
    "message": "Email export not found"
}

Cancel Email Segment Export [DELETE]

Required feature (one of):

  • emails/edit

  • Request (application/json)

    • Headers

      X-Access-Token: 1234567890abcdef

  • Response 200 (application/json)

{
    "email_export": {
        "id": 100,
        "user_id": 200,
        "segments": [
            {
                "id": 100,
                "name": "segment name",
                "type": "custom",
                "deleted": false
            }
        ],
        "name": "export example",
        "status": "running",
        "stats": {
            "statuses_history": {
                "waiting": "2017-01-01 15:35:00",
                "running": "2017-01-01 15:35:00",
                "finished": "2017-01-01 15:35:00"
            }
        },
        "message_counts": {
            "total": 123,
            "sent": 100,
            "excluded_invalid": 3,
            "excluded_by_frequency_cap": 20
        },
        "created": "2017-01-01 15:35:00"
    }
}
  • Response 404 (application/json)
{
    "message": "Email export not found"
}
  • Response 400 (application/json)
{
    "message": "Finished export cannot be canceled"
}

Trashed Emails [/emails/trash{?limit,offset,searched_text}]

List All Trashed Emails [GET]

  • Parameters

    • limit (number, optional) - Limit of the number of records returned
    • offset (number, optional) - Offset for the number of records returned
    • searched_text (string, optional) - Searched items' name
  • Request (application/json)

    • Headers

      X-Access-Token: 1234567890abcdef

  • Response 200 (application/json)

{
    "trashed_emails": [
        {
            "id": "983d437d-eac6-423b-beb5-40a619be332f",
            "name": "My email",
            "subject": "subject",
            "preheader": "preheader",
            "from_email": {
                "email_address": "we.are@meiro.io",
                "name": "Mrs. Meiro"
            },
            "reply_to_email": {
                "email_address": "we.are@meiro.io",
                "name": "Mrs. Meiro"
            },
            "content_json": "json content",
            "content_html": "html content",
            "utm_parameters": {
                "source": "source",
                "medium": "medium",
                "campaign": "campaign",
                "term": "term",
                "content": "content"
            },
            "modified": "2018-11-07T10:19:48Z",
            "modified_by": 1,
            "last_activation": "2018-11-07T10:19:48Z",
            "last_activation_by": 1,
            "deleted": false,
            "schedules": [{
                "segment_id": 1,
                "schedules": [{
                    "minute": "*",
                    "hour": "*",
                    "day": "*",
                    "month": "*",
                    "day_of_week": "*"
                }]
            }]
        }
    ],
    "selection_settings": {
        "limit": 20,
        "offset": 0,
        "searched_text": null
    }
}

Trashed Email [/emails/trash/{email_id}]

Restore Trashed Email [PATCH]

Required feature: emails/edit

  • Request (application/json)

    • Headers

      X-Access-Token: 1234567890abcdef

  • Response 200 (application/json)

{
    "email": {
            "id": "983d437d-eac6-423b-beb5-40a619be332f",
            "name": "My email",
            "subject": "subject",
            "preheader": "preheader",
            "from_email": {
                "email_address": "we.are@meiro.io",
                "name": "Mrs. Meiro"
            },
            "reply_to_email": {
                "email_address": "we.are@meiro.io",
                "name": "Mrs. Meiro"
            },
            "content_json": "json content",
            "content_html": "html content",
            "utm_parameters": {
                "source": "source",
                "medium": "medium",
                "campaign": "campaign",
                "term": "term",
                "content": "content"
            },
            "modified": "2018-11-07T10:19:48Z",
            "modified_by": 1,
            "last_activation": "2018-11-07T10:19:48Z",
            "last_activation_by": 1,
            "deleted": false,
            "schedules": [{
                "segment_id": 1,
                "schedules": [{
                    "minute": "*",
                    "hour": "*",
                    "day": "*",
                    "month": "*",
                    "day_of_week": "*"
                }]
            }]
        }
}

On this page