Create List Group
Call this endpoint as a POST request to create a list group with the details that you have provided in the body.
Endpoint
Method | URL |
---|---|
POST | https://[Your URL]/api/2.0/list_groups |
Request Body
{
“name”: “List group name”,
“description”: “List group description”
}
Properties
Property | Description | Data type | Required |
---|---|---|---|
description | A description of the list group to be created | string | No |
name | The name of the list group to be created | string | Yes |
Example Request
curl –location ‘[Your URL]/api/2.0/list_groups’ \
–header ‘Content-Type: application/json’ \
–header ‘Authorization: Basic ‘ \
–data ‘{
“name”: “List group Name”,
“description”: “List group description”
}’
Response
Status code | Explanation |
---|---|
201 Created | The request was successfully processed |
401 Unauthorized | Invalid/Missing authorization credentials |
Example Responses
List group successfully created [201 Created]
{
“links”: [
{
“title”: “Self”,
“rel”: “self”,
“href”: “[Your URL]/api/2.0/list_groups”
},
{
“title”: “Home”,
“rel”: “home”,
“href”: “[Your URL]/api/2.0/”
}
],
“item”: {
“id”: 15,
“name”: “List group Name”,
“description”: “List group description”
}
}
Invalid/Missing authorization credentials [401 Unauthorized]
{
“links”: [
{
“title”: “Self”,
“rel”: “self”,
“href”: “[Your URL]/api/2.0/list_groups/999”
},
{
“title”: “Home”,
“rel”: “home”,
“href”: “[Your URL]/api/2.0/”
}
],
“error”: {
“code”: “02001”,
“message”: “List Error Occured: Access Denied: Access Denied”,
“additional”: null
}
}
Delete List Group
Call this endpoint using a DELETE request to delete a list group with the ID you’ve provided.
Endpoint
Method | URL | Parameters |
---|---|---|
DELETE | [Your URL]/api/2.0/list_groups/:id | [id] – ID of the list group to be deleted |
Request Body
{
“name”: “List group name”,
“description”: “List group description”
}
Example Request
curl –location –request DELETE ‘[Your URL]/api/2.0/list_groups/15’ \
–header ‘Authorization: Basic ‘
Response
Status code | Explanation |
---|---|
204 No Content | The request was successfully processed |
404 Not Found | The list group with the provided ID was not found |
401 Unauthorized | Invalid/Missing authorization credentials |
Example Responses
Invalid/Missing authorization credentials [401 Unauthorized]
{
“links”: [
{
“title”: “Self”,
“rel”: “self”,
“href”: “[Your URL]/api/2.0/list_groups/999”
},
{
“title”: “Home”,
“rel”: “home”,
“href”: “[Your URL]/api/2.0/”
}
],
“error”: {
“code”: “02001”,
“message”: “List Error Occured: Access Denied: Access Denied”,
“additional”: null
}
}
Not found [404 Not found]
{
“links”: [
{
“title”: “Self”,
“rel”: “self”,
“href”: “[Your URL]/api/2.0/list_groups/999”
},
{
“title”: “Home”,
“rel”: “home”,
“href”: “[Your URL]/api/2.0/”
}
],
“error”: {
“code”: “02404”,
“message”: “List Error Occured: Requested Resource Not Found”,
“additional”: null
}
}
Update List Group
Call this endpoint using a PUT request to update a list group.
Endpoint
Method | URL | Parameters |
---|---|---|
PUT | [Your URL]/api/2.0/list_groups/:id | [id] – ID of the list group to be updated. |
Request Body
{
“name”: “List group name”,
“description”: “List group description”
}
Properties
Property | Description | Data type | Required |
---|---|---|---|
name | The updated name of the list group | string | Yes |
description | An updated description of the list group | string | No |
Example Request
curl –location –request PUT [Your URL]/api/2.0/list_groups/14′ \
–header ‘Content-Type: application/json’ \
–header ‘Authorization: Basic ‘ \
–data ‘{
“name”: “Updated list group name”,
“description”: “Adding Description”
}’
Response
Status code | Explanation |
---|---|
204 No Content | The request was successfully processed |
404 Not Found | The list group with the provided ID was not found |
401 Unauthorized | Invalid/Missing authorization credentials |
Example Responses
Successfully updated list group [200 OK]
{
“links”: [
{
“title”: “Self”,
“rel”: “self”,
“href”: “[Your URL]/api/2.0/list_groups/14”
},
{
“title”: “Home”,
“rel”: “home”,
“href”: “[Your URL]/api/2.0/”
},
{
“title”: “ListListGroups”,
“rel”: “collection”,
“href”: “[Your URL]/api/2.0/list_groups”
}
],
“item”: {
“id”: 14,
“name”: “Updated list group name”,
“description”: “Adding Description”
}
}
Invalid/Missing authorization credentials [401 Unauthorized]
{
“links”: [
{
“title”: “Self”,
“rel”: “self”,
“href”: “[Your URL]/api/2.0/list_groups/999”
},
{
“title”: “Home”,
“rel”: “home”,
“href”: “[Your URL]/api/2.0/”
}
],
“error”: {
“code”: “02001”,
“message”: “List Error Occured: Access Denied: Access Denied”,
“additional”: null
}
}
Not found [404 Not found]
{
“links”: [
{
“title”: “Self”,
“rel”: “self”,
“href”: “[Your URL]/api/2.0/list_groups/999”
},
{
“title”: “Home”,
“rel”: “home”,
“href”: “[Your URL]/api/2.0/”
}
],
“error”: {
“code”: “02404”,
“message”: “List Error Occured: Requested Resource Not Found”,
“additional”: null
}
}
Get Single List Group
Call this endpoint as a GET request to retrieve the list group with the ID that you have provided in the URL.
Endpoint
Method | URL | Parameters |
---|---|---|
GET | [Your URL]/api/2.0/list_groups/:id | [id] – ID of the requested list group |
Example Request
curl –location ‘ [Your URL]/2.0/list_groups’ \
–header ‘Authorization: Basic
Response
Status code | Explanation |
---|---|
404 Not Found | The list group with the provided ID was not found |
401 Unauthorized | The provided authorization credentials are incorrect |
200 Ok | Request was processed successfully |
Example Responses
Successful request [200 OK]
{
“links”: [
{
“title”: “Self”,
“rel”: “self”,
“href”: “[Your URL]/api/2.0/list_groups/14”
},
{
“title”: “Home”,
“rel”: “home”,
“href”: “[Your URL]/api/2.0/”
},
{
“title”: “ListListGroups”,
“rel”: “collection”,
“href”: “[Your URL]/api/2.0/list_groups”
}
],
“item”: {
“id”: 14,
“name”: “List group name”,
“description”: “Description”
}
}
Not found [404 Not Found]
{
“links”: [
{
“title”: “Self”,
“rel”: “self”,
“href”: “[Your URL]/api/2.0/list_groups/7”
},
{
“title”: “Home”,
“rel”: “home”,
“href”: “[Your URL]/api/2.0/”
}
],
“error”: {
“code”: “02404”,
“message”: “List Error Occured: Requested Resource Not Found”,
“additional”: null
}
}
Invalid/Missing authorization credentials [401 Unauthorized]
{
“links”: [
{
“title”: “Self”,
“rel”: “self”,
“href”: “[Your URL]/api/2.0/list_groups/999”
},
{
“title”: “Home”,
“rel”: “home”,
“href”: “[Your URL]/api/2.0/”
}
],
“error”: {
“code”: “02001”,
“message”: “List Error Occured: Access Denied: Access Denied”,
“additional”: null
}
}
Get List Groups
Call this endpoint as a GET request to get a list of list groups associated with your account.
Endpoint
Method | URL |
---|---|
GET | [Your URL]/api/2.0/list_groups |
Example Request
–header ‘Authorization: Basic ‘
Response
Status code | Explanation |
---|---|
401 Unauthorized | The provided authorization credentials are incorrect |
200 Ok | List groups retrieved successfully |
Example Responses
{
“links”: [
{
“title”: “Self”,
“rel”: “self”,
“href”: “[Your URL]/api/2.0/list_groups”
},
{
“title”: “Home”,
“rel”: “home”,
“href”: “[Your URL]/api/2.0/”
}
],
“collection”: [
{
“data”: {
“id”: 1,
“name”: “List Group 1”,
“description”: “”
}
},
{
“data”: {
“id”: 2,
“name”: “Test for API”,
“description”: “API Test group”
}
},
]
}
{
“links”: [
{
“title”: “Self”,
“rel”: “self”,
“href”: “[Your URL]/api/2.0/list_groups”
},
{
“title”: “Home”,
“rel”: “home”,
“href”: “[Your URL]/api/2.0/”
}
],
“collection”: []
}
Invalid/Missing authorization credentials [401 Unauthorized]
{
“links”: [
{
“title”: “Self”,
“rel”: “self”,
“href”: “[Your URL]/api/2.0/list_groups/999”
},
{
“title”: “Home”,
“rel”: “home”,
“href”: “[Your URL]/api/2.0/”
}
],
“error”: {
“code”: “02001”,
“message”: “List Error Occured: Access Denied: Access Denied”,
“additional”: null
}
}