Forms
You can see your existing forms and their basic stats.
List all forms
If you want to list all forms in your account, send this GET
request
GET https://connect.mailerlite.com/api/forms/{type}
1
Type value is required and can be popup
, embedded
, or promotion
.
Request parameters
Parameter | Type | Required | Limitations |
---|---|---|---|
limit | integer | no | |
page | integer | no | Count starts from 1 |
filter[name] | string | no | Returns partial matches |
sort | string | no | Can be one of: created_at , name , conversions_count , opens_count , visitors , conversion_rate , last_registration_at . Defaults to ascending order; prepend - , e.g. -created_at for descending order. |
Response
Response Code: 200 OK
1
{
"data": [
{
"id": "38965245585131492",
"type": "embedded",
"slug": "Ec7t3n",
"name": "inventore provident ut",
"created_at": "2021-11-17 14:42:33",
"conversions_count": 0,
"opens_count": 0,
"conversion_rate": {
"float": 0,
"string": "0%"
},
"settings": [],
"last_registration_at": null,
"active": false,
"is_broken": false,
"has_content": false,
"can": {
"update": true
},
"used_in_automations": false,
"warnings": [],
"double_optin": null,
"screenshot_url": null
}
],
"links": {
"first": "https://connect.mailerlite.com/api/forms/embedded?page=1",
"last": "https://connect.mailerlite.com/api/forms/embedded?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://connect.mailerlite.com/api/forms/embedded?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "https://connect.mailerlite.com/api/forms/embedded",
"per_page": 25,
"to": 1,
"total": 1,
"aggregations": {
"popup": 3,
"embedded": 1,
"promotion": 1
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Get a form
If you want to fetch a specific form you can use this GET
request
GET https://connect.mailerlite.com/api/forms/{form_id}
1
Response
Response code: 200 OK
1
{
"data": {
"id": "38965245585131492",
"type": "embedded",
"slug": "Ec7t3n",
"name": "inventore provident ut",
"created_at": "2021-11-17 14:42:33",
"conversions_count": 0,
"opens_count": 0,
"conversion_rate": {
"float": 0,
"string": "0%"
},
"settings": [],
"last_registration_at": null,
"active": false,
"is_broken": false,
"has_content": false,
"can": {
"update": true
},
"used_in_automations": false,
"warnings": [],
"double_optin": null,
"screenshot_url": null
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Error
When the form id is invalid
Response code: 404 Not Found
1
Update a form
If you want to update a form use this PUT
request
PUT https://connect.mailerlite.com/api/forms/{form_id}
1
The id must a valid form id that belongs to the account
Request body
Parameter | Type | Required | Limitations |
---|---|---|---|
name | string | yes | Maximum length of 255 characters |
Response
Response code: 200 OK
1
{
"data": {
"id": "38965245585131492",
"type": "embedded",
"slug": "Ec7t3n",
"name": "inventore provident ut",
"created_at": "2021-11-17 14:42:33",
"conversions_count": 0,
"opens_count": 0,
"conversion_rate": {
"float": 0,
"string": "0%"
},
"settings": [],
"last_registration_at": null,
"active": false,
"is_broken": false,
"has_content": false,
"can": {
"update": true
},
"used_in_automations": false,
"warnings": [],
"double_optin": null,
"screenshot_url": null
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Error
When the form id is invalid
Response code: 404 Not Found
1
If invalid data has been passed
Response Code: 422 Unprocessable Entity
1
{
"message": "The given data was invalid.",
"errors": {
"name": ["The name may not be greater than 255 characters."]
}
}
1
2
3
4
5
6
2
3
4
5
6
Delete a form
Use this DELETE
request to delete a form
DELETE https://connect.mailerlite.com/api/forms/{form_id}
1
The id must a valid form id that belongs to the account.
Response
Response code: 204 No Content
1
Error
When the form id is invalid
Response code: 404 Not Found
1
Get subscribers who signed up to a specific form
If you want to fetch all the subscribers who signed up to a specific form use this GET
request
GET https://connect.mailerlite.com/api/forms/{form_id}/subscribers
1
Request parameters
Parameter | Type | Required | Limitations |
---|---|---|---|
filter[status] | string | no | Must be one of the possible statuses: active, unsubscribed, unconfirmed, bounced or junk. Defaults to active. |
limit | integer | no | Defaults to 25 |
cursor | string | no | Defaults to first page. Cursor value available in response body |
Response
Response code: 200 OK
1
{
"data": [
{
"id": "31986843064993537",
"email": "dummy@example.com",
"status": "active",
"source": "api",
"sent": 0,
"opens_count": 0,
"clicks_count": 0,
"open_rate": 0,
"click_rate": 0,
"ip_address": null,
"subscribed_at": "2021-09-01 14:03:50",
"unsubscribed_at": null,
"created_at": "2021-09-01 14:03:50",
"updated_at": "2021-09-01 14:03:50",
"fields": {
"city": null,
"company": null,
"country": null,
"last_name": "Testerson",
"name": "Dummy",
"phone": null,
"state": null,
"z_i_p": null
},
"groups": [],
"opted_in_at": null,
"optin_ip": null
}
],
"links": {
"first": null,
"last": null,
"prev": "https://connect.mailerlite.com/api/forms/1234567890/subscribers?cursor=eyJpZCI6NzI1ODIxNjQ2NDU5Mzg1NTksIl9wb2ludHNUb05leHRJdGVtcyI6ZmFsc2V9",
"next": "https://connect.mailerlite.com/api/forms/1234567890/subscribers?cursor=eyJpZCI6NzI1ODIxNjQ2NDY5ODcxMzYsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0"
},
"meta": {
"path": "https://connect.mailerlite.com/api/forms/1234567890/subscribers",
"per_page": 25,
"next_cursor": "eyJpZCI6NzI1ODIxNjQ2NDY5ODcxMzYsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
"prev_cursor": "eyJpZCI6NzI1ODIxNjQ2NDU5Mzg1NTksIl9wb2ludHNUb05leHRJdGVtcyI6ZmFsc2V9"
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Error
When the form id is invalid
Response code: 404 Not Found
1