Code examples
List resource
Lists |
Subscribers |
Custom fields
Type: GET
Url: https://subscribers.dialogapi.no/api/public/v2/subscriberlists
curl --request GET \
--user 'user_id:api_key' \
--header 'content-type: application/json' \
--url 'https://subscribers.dialogapi.no/api/public/v2/subscriberlists/' \
--include
Example response:
[{
"id": 1466,
"title": "My first list",
"date_created": "2020-01-20T11:37:07.558Z",
"date_updated": "2020-01-22T11:39:42.623Z",
"subscriber_emails": 24414,
"subscriber_sms": 24304
}, {
"id": 1468,
"title": "My second list",
"date_created": "2020-01-20T12:35:12.624Z",
"date_updated": "2020-01-22T11:39:42.966Z",
"subscriber_emails": 19350,
"subscriber_sms": 0
}]
Type: POST
Url: https://subscribers.dialogapi.no/api/public/v2/subscriberlists
curl --request POST \
--user 'user_id:api_key' \
--header 'content-type: application/json' \
--data '{ "title": "My subscribers" }' \
--url 'https://subscribers.dialogapi.no/api/public/v2/subscriberlists' \
--include
Example response:
{
"id":1495,
"title":"My subscribers",
"date_created":"2020-01-23T12:55:00.235Z",
"date_updated":"2020-01-23T12:55:00.235Z",
"subscriber_emails":0,
"subscriber_sms":0
}
Type: PATCH
Url: https://subscribers.dialogapi.no/api/public/v2/subscriberlists/{list_id}
curl --request PATCH \
--user 'user_id:api_key' \
--header 'content-type: application/json' \
--data '{ "title": "Rename title" }' \
--url 'https://subscribers.dialogapi.no/api/public/v2/subscriberlists/{list_id}' \
--include
Example response:
{
"id":1495,
"title":"Rename title",
"date_created":"2020-01-23T12:55:00.235Z",
"date_updated":"2020-01-23T12:58:30.501Z",
"subscriber_emails":0,
"subscriber_sms":0
}
Type: GET
Url: https://subscribers.dialogapi.no/api/public/v2/subscriberlists/{list_id}
curl --request GET \
--user 'user_id:api_key' \
--header 'content-type: application/json' \
--url 'https://subscribers.dialogapi.no/api/public/v2/subscriberlists/{list_id}' \
--include
Example response:
{
"id":1495,
"title":"Rename title",
"date_created":"2020-01-23T12:55:00.235Z",
"date_updated":"2020-01-23T12:58:30.501Z",
"subscriber_emails":0,
"subscriber_sms":0
}
Type: DELETE
Url: https://subscribers.dialogapi.no/api/public/v2/subscriberlists/{list_id}
curl --request DELETE \
--user 'user_id:api_key' \
--header 'content-type: application/json' \
--url 'https://subscribers.dialogapi.no/api/public/v2/subscriberlists/{list_id}' \
--include
Example response:
{
"status":"200 Success"
}
Subscriber resource
Type: POST
Url: https://subscribers.dialogapi.no/api/public/v2/subscribers?subscriber_list_id={list_id}
The property (String) "status" controls the state of the subscriber in the Make system.
The three available states are: active, unsubscribed and bounce. If left unset, the property
defaults to "active".
curl --request POST \
--user 'user_id:api_key' \
--header 'content-type: application/json' \
--data '{ "email": "stianb@make.as", "firstname": "Stian", "lastname": "Pedersen", "status": "active|unsubscribed|bounce" }' \
--url 'https://subscribers.dialogapi.no/api/public/v2/subscribers?subscriber_list_id={list_id}' \
--include
Example response:
{
"status":"200 Success"
}
Type: GET
Url: https://subscribers.dialogapi.no/api/public/v2/subscribers/{id}
curl --request GET \
--user 'user_id:api_key' \
--header 'content-type: application/json' \
--url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/{id}' \
--include
Example response:
{
"id":618786,
"email":"stianb@make.as",
"firstname":"Stian",
"lastname":"Pedersen",
"address":"",
"zip":"",
"city":"",
"phone":null,
"company":"",
"birthday":null,
"gender":"",
"date_created":"2020-01-14T11:50:40.380Z",
"date_updated":"2020-01-23T13:08:20.514Z",
"SAMTYKKEEPOST":null,
"SAMTYKKESMS":null,
"SAMTYKKEEPOSTOGSMS":null,
"PERSONVERNERKLRING":null,
"EXTRA1":null,
"EXTRA3":null,
"EXTRA4":null,
"EXTRA5":null,
"EXTRA6":null,
"EXTRA7":null,
"EXTRA8":null,
"EXTRA9":null,
"EXTRA10":null,
"EXTRA11":null,
"EXTRA12":null
}
Type: POST
Url: https://subscribers.dialogapi.no/api/public/v2/subscribers/{id}/unsubscribe
curl --request POST \
--user 'user_id:api_key' \
--header 'content-type: application/json' \
--url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/{id}/unsubscribe' \
--include
Example response:
{
"status":"200 Success"
}
Type: DELETE
Url: https://subscribers.dialogapi.no/api/public/v2/subscribers/{id}
curl --request DELETE \
--user 'user_id:api_key' \
--header 'content-type: application/json' \
--url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/{id}' \
--include
Example response:
{
"status":"200 Success"
}
Type: POST
Url: https://subscribers.dialogapi.no/api/public/v2/subscribers/bulkinsert?subscriber_list_id={list_id}
Queryparams: subscriber_list_id
NB: There is a 1000 rows limit on each request
curl --request POST \
--user 'user_id:api_key' \
--header 'content-type: application/json' \
--url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/bulkinsert?subscriber_list_id={list_id}' \
--data '[{ "email": "bulk10@make.as" }, { "email": "bulk11@make.as" }, { "email": "bulk12@make.as" }]' \
--include
Success: { "status":"200 Success" }
Error: { "status":"422 Unprocessable entity" }
Type: POST
Url: https://subscribers.dialogapi.no/api/public/v2/subscribers/bulkinsert?subscriber_list_id={list_id}&status=active|bounce|unsubscribed
Queryparams: subscriber_list_id, status
Available statuses: active, unsubscribed, bounce
NB: There is a 1000 rows limit on each request
curl --request POST \
--user 'user_id:api_key' \
--header 'content-type: application/json' \
--url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/bulkinsert?subscriber_list_id={list_id}&status=active|bounce|unsubscribed' \
--data '[{ "email": "bulk10@make.as" }, { "email": "bulk11@make.as" }, { "email": "bulk12@make.as" }]' \
--include
Success: { "status":"200 Success" }
Error: { "status":"422 Unprocessable entity" }
Custom fields
Type: GET
Url: https://subscribers.dialogapi.no/api/public/v2/custom_fields
curl --request GET \
--user 'user_id:api_key' \
--header 'content-type: application/json' \
--url 'https://subscribers.dialogapi.no/api/public/v2/custom_fields' \
--include
Example response:
[{
"id": 5,
"label": "I am a string",
"value": "EXTRA1",
"datatype": "string"
}, {
"id": 11,
"label": "Orderdate",
"value": "EXTRA8",
"datatype": "date"
}, {
"id": 12,
"label": "Training",
"value": "EXTRA9",
"datatype": "single_choice",
"choices": ["Strength", "Cardio", "None"]
}, {
"id": 13,
"label": "Interests",
"value": "EXTRA10",
"datatype": "multiple_choice",
"choices": ["Golf", "Fishing", "Movies"]
}]
Type: POST
Url: https://subscribers.dialogapi.no/api/public/v2/custom_fields
Available datatypes: string, number, date, single_choice, multiple_choice, dropdown
curl --request POST \
--user 'user_id:api_key' \
--header 'content-type: application/json' \
--url 'https://subscribers.dialogapi.no/api/public/v2/custom_fields/' \
--data '{ "label": "My custom field", "datatype": "string"}' \
--include
Example response:
{
"id":16,
"label":"My custom field",
"value":"EXTRA13",
"datatype":"string"
}
Type: GET
Url: https://subscribers.dialogapi.no/api/public/v2/custom_fields/{id}
curl --request GET \
--user 'user_id:api_key' \
--header 'content-type: application/json' \
--url 'https://subscribers.dialogapi.no/api/public/v2/custom_fields/{id}' \
--include
Example response:
{
"id":16,
"label":"My custom field",
"value":"EXTRA13",
"datatype":"string"
}
Type: PATCH
Url: https://subscribers.dialogapi.no/api/public/v2/custom_fields/{id}
NB: Datatype cannot be changed
curl --request PATCH \
--user 'user_id:api_key' \
--header 'content-type: application/json' \
--url 'https://subscribers.dialogapi.no/api/public/v2/custom_fields/{id}' \
--data '{ "label": "Rename me, but I am still a string" }' \
--include
Example response:
{
"id":16,
"label":"Rename me, but I am still a string",
"value":"EXTRA13",
"datatype":"string"
}
Type: DELETE
Url: https://subscribers.dialogapi.no/api/public/v2/custom_fields/{id}
curl --request DELETE \
--user 'user_id:api_key' \
--header 'content-type: application/json' \
--url 'https://subscribers.dialogapi.no/api/public/v2/custom_fields/16' \
--include
Example response:
{
"status":"200 Success"
}
Subscriber status
Type: GET
Url: https://subscribers.dialogapi.no/api/public/v2/subscriberstatus
curl --request GET \
--user 'user_id:api_key' \
--header 'content-type: application/json' \
--url 'https://subscribers.dialogapi.no/api/public/v2/subscriberstatus' \
--include