Lists API

Lists API is used to manage lists under an Agenty account. You may use this API to create a list, get all lists, add new rows, update rows or delete rows from a list, etc.

Create a List

Endpoint:

Method: POST
URL: https://api.agenty.com/v2/lists

Headers:

Key Value Description
Content-Type application/json

Query params:

Key Value Description
apikey {{API_KEY}}

Body:

{
  "name": "my list",
  "description": "bookstore product list"
}

Responses:

Status: OK | Code: 200

{
    "status_code": "OK",
    "message": "A new list with id: 19 created successfully",
    "list_id": 19
}

Get List by id

Endpoint:

Method: GET
URL: https://api.agenty.com/v2/lists/{{LIST_ID}}

Headers:

Key Value Description
Content-Type application/json

Query params:

Key Value Description
apikey {{API_KEY}} Your api key

Responses:

Status: OK | Code: 200

{
    "list_id": 19,
    "account_id": 14,
    "user_id": 0,
    "name": "list 1",
    "description": "bookstore product list",
    "data": {
        "total": 0,
        "limit": 1000,
        "offset": 0,
        "returned": 0,
        "result": []
    },
    "created_at": "2022-01-10T06:41:25Z",
    "updated_at": null
}

Update a List by id

Endpoint:

Method: PUT
URL: https://api.agenty.com/v2/lists/{{LIST_ID}}

Headers:

Key Value Description
Content-Type application/json

Query params:

Key Value Description
apikey {{API_KEY}}

Body:

{
  "name": "list 2 [updated]",
  "description": "electroics products list [updated]"
}

Responses:

Status: OK | Code: 200

{
    "status_code": 200,
    "message": "List with id: 19 updated successfully"
}

Get all Lists

Endpoint:

Method: GET
URL: https://api.agenty.com/v2/lists

Headers:

Key Value Description
Content-Type application/json

Query params:

Key Value Description
apikey {{API_KEY}}

Responses:

Status: OK | Code: 200

{
    "total": 2,
    "limit": 1000,
    "offset": 0,
    "returned": 2,
    "result": [
        {
            "list_id": 20,
            "account_id": 14,
            "name": "list 1",
            "description": "bootstore products list",
            "created_at": "2022-01-10T06:53:38Z",
            "updated_at": null
        },
        {
            "list_id": 19,
            "account_id": 14,
            "name": "list 2",
            "description": "electroics products list",
            "created_at": "2022-01-10T06:41:25Z",
            "updated_at": "2022-01-10T06:50:16Z"
        }
    ]
}

Delete List by id

Endpoint:

Method: DELETE
URL: https://api.agenty.com/v2/lists/{{LIST_ID}}

Query params:

Key Value Description
apikey {{API_KEY}}

Responses:

Status: OK | Code: 200

{
    "status_code": 200,
    "message": "List with id: 20 deleted successfully"
}

Get list rows by list id

To fetch all the rows in the given list id

Endpoint:

Method: GET
Type: application/json
URL: https://api.agenty.com/v2/lists/{{LIST_ID}}/rows

Query params:

Key Value Description
apikey {{API_KEY}}
limit {{LIMIT}}
offset {{OFFSET}}
sort {{SORT}}
order {{ORDER}}

Responses:

Status: Ok | Code: 200

{
    "offset": 0,
    "limit": 1000,
    "returned": 3,
    "total": 8,
    "result": [
        {
            "_id": "61dbdbe71659fbc4670959dc",
            "col1": "https://www.domain.com/cat/1",
            "col2": "mobile",
            "col3": "1000",
            "col4": "33"
        },
        {
            "_id": "61dbdbe71659fbc4670959dd",
            "col1": "https://www.domain.com/cat/2",
            "col2": "tablet",
            "col3": "2400",
            "col4": "34"
        }
    ]
}

Get list row by row id

To fetch a single row from a list with given id and the row id

Endpoint:

Method: GET
Type: application/json
URL: https://api.agenty.com/v2/lists/{{LIST_ID}}/rows/{{ROW_ID}}

Query params:

Key Value Description
apikey {{API_KEY}}

Responses:

Status: Ok | Code: 200

 {
    "_id": "61dbdbe71659fbc4670959dd",
    "col1": "https://www.domain.com/cat/2",
    "col2": "tablet",
    "col3": "2400",
    "col4": "34"
 },

Update list row by id

To update a particular row in a list by given list id and row id

Endpoint:

Method: PUT
Type: application/json
URL: https://api.agenty.com/v2/lists/{{LIST_ID}}/rows/{{ROW_ID}}

Query params:

Key Value Description
apikey {{API_KEY}}

Body:

{
	"_id" : "61dbdbe71659fbc4670959dd",
	"col1" : "value5",
	"col2" : "value6",
	"col3" : "value7",
	"col4" : "value8"
}

Responses:

Status: Ok | Code: 200

{
    "status_code": 200,
    "message": "List row with id:61dbdbe71659fbc4670959dd updated successfully"
}

Insert new rows to list

To bulk insert one or many rows in a list.

Endpoint:

Method: POST
Type: application/json
URL: https://api.agenty.com/v2/lists/{{LIST_ID}}/rows

Query params:

Key Value Description
apikey {{API_KEY}}

Body:

An array of rows to insert in the list. Must have the same column names to auto-map with whatever values you want to insert in your list.

[
	{
		"col1" : "value1",
		"col2" : "value2",
		"col3" : "value3",
		"col4" : "value4"
	},
	{
		"col1" : "value1",
		"col2" : "value2",
		"col3" : "value3",
		"col4" : "value4"
	}
]

Responses:

{
   "status_code": 200,
   "message": "2 row(s) added successfully"
}

Delete list row by id

To delete a particular row in a list by given row id

Endpoint:

Method: DELETE
Type: application/json
URL: https://api.agenty.com/v2/lists/{{LIST_ID}}/rows/{{ROW_ID}}

Query params:

Key Value Description
apikey {{API_KEY}}

Responses:

{
    "status_code": 200,
    "message": "List row with id:61dbdbe71659fbc4670959dd deleted successfully"
}

Clear a list by id

To delete all rows in a list.

Endpoint:

Method: DELETE
Type: application/json
URL: https://api.agenty.com/v1/lists/{{LIST_ID}}/clear

Query params:

Key Value Description
apikey {{API_KEY}}

Responses:

Status: Ok | Code: 200

{
    "status_code": 200,
    "message": "List with id: 2 cleared successfully"
}

Signup now to get 100 pages credit free

14 days free trial, no credit card required!