Emails

Manage all emails sent to clients

Get all emails

GET https://wemx.app/api/v1/emails

Returns all emails sent to users

```json
{
    "status": true,
    "current_page": 1,
    "data": [
        {
            "id": 1128,
            "user_id": 1,
            "sender": "example@wemx.app",
            "receiver": "yourclient@wemx.net",
            "subject": "Thank you for your purchase",
            "content": "We are emailing you to confirm your payment was received and is being processed",
            "button": null,
            "attachment": null,
            "is_sent": 1,
            "resent": 0,
            "scheduled_at": null,
            "created_at": "2023-12-22T14:53:43.000000Z",
            "updated_at": "2023-12-22T14:54:03.000000Z"
        }
        // more results
    ],
    "first_page_url": "https://wemx.app/api/v1/emails?page=1",
    "from": 1,
    "last_page": 759,
    "last_page_url": "https://wemx.app/api/v1/emails?page=759",
    "links": [
        {
            "url": null,
            "label": "Previous",
            "active": false
        },
        {
            "url": "https://wemx.app/api/v1/emails?page=1",
            "label": "1",
            "active": true
        },
        // links
        {
            "url": "https://wemx.app/api/v1/emails?page=10",
            "label": "10",
            "active": false
        },
        {
            "url": "https://wemx.app/api/v1/emails?page=2",
            "label": "Next",
            "active": false
        }
    ],
    "next_page_url": "https://wemx.app/api/v1/emails?page=2",
    "path": "https://wemx.app/api/v1/emails",
    "per_page": 1,
    "prev_page_url": null,
    "to": 1,
    "total": 759
}
```

Available Relationships (optional)

https://wemx.app/api/v1/emails?include=user

Available relationships:

user

Filters (optional)

https://wemx.app/api/v1/emails?filter[receiver]=client@example.com

Available Filters:

id, user_id, sender, receiver, subject, content, button, attachment, is_sent

Sorting (optional)

https://wemx.app/api/v1/emails?sort[created_at]=asc

Available Sorting Parameters:

id, user_id, receiver, sender, is_sent, created_at

Sorting operators

asc, desc, random

Dates (optional)

https://wemx.app/api/v1/emails?date=30days
OperatorDescription

today

Get emails created today

yesterday

Get emails created yesterday

3days, 7days, 14days, 30days, 90days

Get emails created last x days

YYYY-MM-DD,YYY-MM-DD

Get emails created between a range of dates

Last updated