Audiences


Search

Search for audience.

Endpoint

Method URI Description
GET /users/{user_id}/audiences Search user assigned audience

Example Response

{
    "data": [
        {
            "id": 1,
            "name": "Sphere",
            "status": "Active",
            "send_type": "Automatic",
            "send_period": 22,
            "send_unit": "days",
            "send_days": {
                "Friday": true,
                "Monday": true,
                "Sunday": true,
                "Tuesday": true,
                "Saturday": true,
                "Thursday": true,
                "Wednesday": true
            },
            "signature_id": 1,
            "contacts_count": 4,
            "tags_count": 2,
            "created_at": "2020-07-06T00:48:59Z",
            "updated_at": "2020-07-06T00:49:00Z",
            "next_send": "2020-07-06T04:00:00Z"
        }
    ],
    "links": {
        "first": "https://api.happygrasshopper.com/v3/users/77179/audiences?page=1",
        "last": "https://api.happygrasshopper.com/v3/users/77179/audiences?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://api.happygrasshopper.com/v3/users/77179/audiences",
        "per_page": 15,
        "to": 1,
        "total": 1
    }
}

Read

Retrieve an audience.

Endpoint

Method URI Description
GET /audiences/{audience_id} Retrieve a user assigned audience email by it's id

Example Response

{
    "id": 1,
    "name": "Sphere",
    "status": "Active",
    "send_type": "Automatic",
    "send_period": 22,
    "send_unit": "days",
    "send_days": {
        "Friday": true,
        "Monday": true,
        "Sunday": true,
        "Tuesday": true,
        "Saturday": true,
        "Thursday": true,
        "Wednesday": true
    },
    "signature_id": 1,
    "contacts_count": 4,
    "tags_count": 2,
    "created_at": "2020-07-06T00:48:59Z",
    "updated_at": "2020-07-06T00:49:00Z",
    "next_send": "2020-07-06T04:00:00Z"
}

Update

Update an audience email.

Endpoint

Method URI Description
PUT /audiences/{audience_id} Update an audience email

Body Params

{
    "send_type": "Automatic",
    "send_period": 22,
    "send_unit": "days",
    "send_days": {
        "Friday": true,
        "Monday": true,
        "Sunday": true,
        "Tuesday": true,
        "Saturday": true,
        "Thursday": true,
        "Wednesday": true
    },
    "signature_id": 1
}

Example Response

{
    "id": 1,
    "name": "Sphere",
    "status": "Active",
    "send_type": "Automatic",
    "send_period": 22,
    "send_unit": "days",
    "send_days": {
        "Friday": true,
        "Monday": true,
        "Sunday": true,
        "Tuesday": true,
        "Saturday": true,
        "Thursday": true,
        "Wednesday": true
    },
    "signature_id": 1,
    "contacts_count": 4,
    "tags_count": 2,
    "created_at": "2020-07-06T00:48:59Z",
    "updated_at": "2020-07-06T00:49:00Z",
    "next_send": "2020-07-06T04:00:00Z"
}