Document List

Create lists

Below, we listed the request parameters that required on /lists API and resource url.

POST https://app-a.nipamail.com/api/v1/lists
Parameter Type Description Required
session_key string The session_key from Authentication API. Yes
list_name string The name of the list you want to create. Yes
Example Request
POST /api/v1/lists HTTP/1.1 
session_key: ffa67286202c04c8af6aeb512579ead5d5896054aabb071
Host: app-a.nipamail.com

list_name=userGroup1
Example Result
Once you execute the above API call, you will receive either a success data or error data in JSON format

{
  "status": "success",
  "code": 200,
  "data": {
    "lists_count": 1,
    "lists_result": [
      {
      "list_id": "ALT8762129678",
      "list_name": "userGroup1",
      "list_created": "2017-04-29 15:15:09"
      }
    ]
  }
}

Show all lists

Below, we listed the request parameters that required on /lists API and resource url.

GET https://app-a.nipamail.com/api/v1/lists
Parameter Type Description Required
session_key string The session_key from Authentication API. Yes
page integer set limit of result page.
Defaults to 1 of limit 25 item
Example Request
GET /api/v1/lists HTTP/1.1 
session_key: ffa67286202c04c8af6aeb512579ead5d5896054aabb071
Host: app-a.nipamail.com
Example Result
Once you execute the above API call, you will receive either a success data or error data in JSON format

{
  "status": "success",
  "code": 200,
  "data": {
    "lists_count": 1,
    "lists_result": [
      {
      "list_id": "ALT8762129678",
      "list_name": "userGroup1",
      "list_created": "2017-04-29 15:15:09"
      }
    ]
  }
}

View lists

Below, we listed the request parameters that required on /lists API and resource url.

GET https://app-a.nipamail.com/api/v1/lists/{$id}
Parameter Type Description Required
session_key string The session_key from Authentication API. Yes
Example Request
GET /api/v1/lists/ALT8762129678 HTTP/1.1 
session_key: ffa67286202c04c8af6aeb512579ead5d5896054aabb071
Host: app-a.nipamail.com
Example Result
Once you execute the above API call, you will receive either a success data or error data in JSON format

{
  "status": "success",
  "code": 200,
  "data": {
    "lists_count": 1,
    "lists_result": [
      {
      "list_id": "ALT8762129678",
      "list_name": "userGroup1",
      "total_subscriber": "0",
      "total_unsubscriber": "0",
      "total_bounce": "0",
      "total_spam": "0",
      "list_status": "disabled",
      "list_created": "2017-04-29 15:15:09"
      }
    ]
  }
}

Update lists

Below, we listed the request parameters that required on /lists API and resource url.

POST https://app-a.nipamail.com/api/v1/lists/{$id}/update
Parameter Type Description Required
session_key string The session_key from Authentication API. Yes
list_name string The name of the list you want to update. Yes
Example Request
POST /api/v1/lists/ALT8762129678/update HTTP/1.1 
session_key: ffa67286202c04c8af6aeb512579ead5d5896054aabb071
Host: app-a.nipamail.com
Example Result
Once you execute the above API call, you will receive either a success data or error data in JSON format

{
  "status": "success",
  "code": 200,
  "data": {
    "result": "Update list /ALT8762129678/ successfully."
  }
}

Delete lists

Below, we listed the request parameters that required on /lists API and resource url.

POST https://app-a.nipamail.com/api/v1/lists/{$id}/delete
Parameter Type Description Required
session_key string The session_key from Authentication API. Yes
Example Request
POST /api/v1/lists/ALT8762129678/delete HTTP/1.1 
session_key: ffa67286202c04c8af6aeb512579ead5d5896054aabb071
Host: app-a.nipamail.com
Example Result
Once you execute the above API call, you will receive either a success data or error data in JSON format

{
  "status": "success",
  "code": 200,
  "data": {
    "result": "Delete list group successfully."
  }
}

Response Code
Code Result Description
200 success Response to a successful request.
400 error The request is malformed or missing some required parameters.
401 error Unauthorized or the session_id was expired.
404 error The list not found.