Lists Endpoints

Lists Endpoints (v1)


Subscribe to a List (programmatically) [public]


Subscribe to email or/and phone list.
Also any additional fields on your request will be picked up and attached to specified email/phone number.

  • URL

    /api/v1/lists/subscribe/json

  • Method:

    POST

  • Data Params

    Required:
    email_list_id=[url](required if phone_list_id is not supplied)
    phone_list_id=[url](required if email_list_id is not supplied)
    email=[string](required if email_list_id is supplied)
    phone=[string](required if phone_list_id is supplied)

  • Response Examples:

    • Code: 200
      Content:
{
    "error": 0,
    "msg": "You were successfully subscribed",
    "errors": [],
    "data": []
}
  • Code: 401
    Content:
{
    "error": 1,
    "msg": "Validation errors",
    "errors": [
        "Specified 'email_list_id' is invalid"
    ],
    "data": []
}
  • Code: 404
    Content:
{
    "error": 1,
    "msg": "Error",
    "errors": [
        "Specified 'list_id' does not exist"
    ],
    "data": []
}

Subscribe to a List [public]


Subscribe to email or/and phone list and redirect to specified url (can be used as regular form's action url).
Also any additional fields on your request will be picked up and attached to specified email/phone number.

  • URL

    /api/v1/lists/subscribe

  • Method:

    POST

  • Data Params

    Required:
    successfully_subscribed_url=[url]
    already_subscribed_url=[url]
    email_list_id=[url](required if phone_list_id is not supplied)
    phone_list_id=[url](required if email_list_id is not supplied)
    email=[string](required if email_list_id is supplied)
    phone=[string](required if phone_list_id is supplied)

  • Response Examples:
    Redirect to supplied 'successfully_subscribed_url' or 'already_subscribed_url'


Unsubscribe Email from List [public]


Unsubscribe email from list.

  • URL

    /api/v1/lists/{list_id}/unsubscribe

  • Method:

    POST

  • Data Params

    Required:
    email=[string]

  • Response Examples:

    • Code: 200
      Content:
{
    "error": 0,
    "msg": "You were successfully unsubscribed from the list",
    "errors": [],
    "data": []
}

Get Email List


Get email list details by id

  • URL

    /api/v1/lists/email/{list_id}

  • Method:

    GET

  • Response Examples:

    • Code: 200
      Content:
{
    "error": 0,
    "msg": "OK",
    "errors": [],
    "data": {
        "list": {
            "id": 16,
            "owner_id": 1,
            "name": "test",
            "description": null,
            "notify_for_subscribe": 1,
            "sender_name": "TEST USER",
            "mail_from": null,
            "updated_at": "2019-04-15 14:47:09",
            "created_at": "2019-04-01 13:50:25"
        }
    }
}
  • Code: 404
    Content:
{
    "error": 1,
    "msg": "Error",
    "errors": [
        "Specified list id does not exist"
    ],
    "data": []
}

Get Phone List


Get phone list details by id

  • URL

    /api/v1/lists/phone/{list_id}

  • Method:

    GET

  • Response Examples:

    • Code: 200
      Content:
{
    "error": 0,
    "msg": "OK",
    "errors": [],
    "data": {
        "list": {
            "id": 1,
            "owner_id": 1,
            "name": "test phone",
            "description": null,
            "notify_for_subscribe": 0,
            "created_at": "2019-04-03 13:24:05",
            "updated_at": "2019-04-15 14:47:30"
        }
    }
}
  • Code: 404
    Content:
{
    "error": 1,
    "msg": "Error",
    "errors": [
        "Specified list id does not exist"
    ],
    "data": []
}

Get Email Lists


Get all email lists belonging to the current user

  • URL

    /api/v1/lists/email

  • Method:

    GET

  • Response Examples:

    • Code: 200
      Content:
{
    "error": 0,
    "msg": "OK",
    "errors": [],
    "data": {
        "lists": [
            {
                "id": 16,
                "owner_id": 1,
                "name": "test",
                "description": null,
                "notify_for_subscribe": 1,
                "sender_name": "TEST USER",
                "mail_from": null,
                "updated_at": "2019-04-15 14:47:09",
                "created_at": "2019-04-01 13:50:25"
            }
        ]
    }
}

Get Phone Lists


Get all phone lists belonging to the current user

  • URL

    /api/v1/lists/phone

  • Method:

    GET

  • Response Examples:

    • Code: 200
      Content:
{
    "error": 0,
    "msg": "OK",
    "errors": [],
    "data": {
        "lists": [
            {
                "id": 1,
                "owner_id": 1,
                "name": "test phone",
                "description": null,
                "notify_for_subscribe": 0,
                "created_at": "2019-04-03 13:24:05",
                "updated_at": "2019-04-15 14:47:30"
            }
        ]
    }
}