Loading...
Loading...
Organise your contacts into lists for targeted campaigns. Create, update and manage contact lists via the API.
Required permissions: readContacts for GET requests,writeContacts for POST, PUT, DELETE requests.
/api/v1/listsList all contact lists with pagination
| page | Page number (default: 1) |
| limit | Items per page (default: 20, max: 100) |
curl -X GET "https://notifyn.net/api/v1/lists?page=1&limit=20" \ -H "Authorization: Bearer ntfn_your_api_key"
{
"success": true,
"lists": [
{
"id": "507f1f77bcf86cd799439011",
"name": "Newsletter Subscribers",
"description": "Main newsletter list",
"contactCount": 1250,
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:15:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 5,
"pages": 1
}
}/api/v1/lists/:idGet details of a specific list
| id | The list ID |
curl -X GET "https://notifyn.net/api/v1/lists/507f1f77bcf86cd799439011" \ -H "Authorization: Bearer ntfn_your_api_key"
/api/v1/listsCreate a new contact list
| name | List name (required, max 100 chars) |
| description | List description (optional, max 500 chars) |
curl -X POST "https://notifyn.net/api/v1/lists" \
-H "Authorization: Bearer ntfn_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "VIP Customers",
"description": "High-value customer segment"
}'{
"success": true,
"list": {
"id": "507f1f77bcf86cd799439012",
"name": "VIP Customers",
"description": "High-value customer segment",
"contactCount": 0,
"createdAt": "2024-01-20T10:30:00Z"
}
}/api/v1/lists/:idUpdate an existing list
| name | List name (optional) |
| description | List description (optional) |
curl -X PUT "https://notifyn.net/api/v1/lists/507f1f77bcf86cd799439012" \
-H "Authorization: Bearer ntfn_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Premium Customers",
"description": "Updated description"
}'/api/v1/lists/:idDelete a contact list
Warning: Deleting a list does not delete the contacts in it. Contacts will remain in your organisation but will no longer be associated with this list.
curl -X DELETE "https://notifyn.net/api/v1/lists/507f1f77bcf86cd799439012" \ -H "Authorization: Bearer ntfn_your_api_key"
{
"success": true,
"message": "List deleted successfully"
}/api/v1/lists/:id/contactsAdd contacts to a list
| contactIds | Array of contact IDs to add (max 100 per request) |
curl -X POST "https://notifyn.net/api/v1/lists/507f1f77bcf86cd799439011/contacts" \
-H "Authorization: Bearer ntfn_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"contactIds": [
"507f1f77bcf86cd799439111",
"507f1f77bcf86cd799439222"
]
}'{
"success": true,
"added": 2,
"message": "Contacts added to list"
}/api/v1/lists/:id/contactsRemove contacts from a list
| contactIds | Array of contact IDs to remove |
curl -X DELETE "https://notifyn.net/api/v1/lists/507f1f77bcf86cd799439011/contacts" \
-H "Authorization: Bearer ntfn_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"contactIds": ["507f1f77bcf86cd799439111"]
}'