Introduction
Sender api documentation.
This documentation aims to provide all the information you need to work with our API.
Base URL
https://api.sender.net
Authenticating requests
Authenticate requests to this API's endpoints by sending an Authorization
header with the value "Bearer {API_ACCESS_TOKEN}"
.
You can retrieve your token by visiting Settings and clicking Api access tokens.
Campaign Creating and modifying
GET - Get all campaigns
Example request:
curl -X GET \
-G "https://api.sender.net/v2/campaigns" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/campaigns',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"id": 1,
"subject": "campaign subject",
"reply_to": "[email protected]",
"language": "en",
"recipient_count": 144,
"from": "email from",
"schedule_time": null,
"last_action": "step4",
"sent_time": null,
"status": "SENT",
"created": "2020-05-06 13:34:26",
"modified": "2020-11-19 17:04:56",
"title": "campaign title",
"auto_followup_active": 1,
"auto_followup_subject": "followup subject",
"auto_followup_delay": 72,
"editor": "editor",
"opens": 3,
"clicks": 8,
"send_to_all": null,
"html": {
"id": 1,
"thumbnail_url": "https://cdn.sender.net/email_images/....",
"has_preview": true
},
"sent_count": 144
}
],
"links": {
"first": "https://api.sender.net/v2/campaigns?page=1",
"last": "https://api.sender.net/v2/campaigns?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "pagination.previous",
"active": false
},
{
"url": "https://api.sender.net/v2/campaigns?page=1",
"label": 1,
"active": true
},
{
"url": null,
"label": "pagination.next",
"active": false
}
],
"path": "https://api.sender.net/v2/campaigns",
"per_page": 10,
"to": 1,
"total": 1
}
}
Received response:
Request failed with error:
GET - Get one campaign
Example request:
curl -X GET \
-G "https://api.sender.net/v2/campaigns/[campaign_id]" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/campaigns/[campaign_id]',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"id": 1,
"subject": "campaign subject",
"reply_to": "[email protected]",
"language": "en",
"recipient_count": 144,
"from": "email from",
"schedule_time": null,
"last_action": "step4",
"sent_time": null,
"status": "SENT",
"created": "2020-05-06 13:34:26",
"modified": "2020-11-19 17:04:56",
"title": "campaign title",
"auto_followup_active": 1,
"auto_followup_subject": "followup subject",
"auto_followup_delay": 72,
"editor": "editor",
"opens": 3,
"clicks": 8,
"send_to_all": null,
"html": {
"id": 1,
"thumbnail_url": "https://cdn.sender.net/email_images/....",
"has_preview": true
},
"sent_count": 144
}
],
"links": {
"first": "https://api.sender.net/v2/campaigns?page=1",
"last": "https://api.sender.net/v2/campaigns?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "pagination.previous",
"active": false
},
{
"url": "https://api.sender.net/v2/campaigns?page=1",
"label": 1,
"active": true
},
{
"url": null,
"label": "pagination.next",
"active": false
}
],
"path": "https://api.sender.net/v2/campaigns",
"per_page": 10,
"to": 1,
"total": 1
}
}
Received response:
Request failed with error:
GET - Export recipients
Example request:
curl -X GET \
-G "https://api.sender.net/v2/campaigns/[campaign_id]/[type]/export" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/[type]/export"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/campaigns/[campaign_id]/[type]/export',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/[type]/export'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"email": "[email protected]",
"subscriber_created": null,
"created": "2020-03-16 11:12:16",
"subscriber_id": null,
"type": null
}
]
}
Received response:
Request failed with error:
GET - Get preview
Example request:
curl -X GET \
-G "https://api.sender.net/v2/campaigns/[campaign_id]/preview" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/preview"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/campaigns/[campaign_id]/preview',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/preview'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
Will show a preview of your campaign as a html file
Received response:
Request failed with error:
GET - Get social share links
Example request:
curl -X GET \
-G "https://api.sender.net/v2/campaigns/[campaign_id]/share" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/share"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/campaigns/[campaign_id]/share',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/share'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"facebook": "https:www.facebook.com",
"twitter": "https:twitter.com",
"linkedin": "http:www.linkedin.com",
"whatsapp": "https:wa.me",
"pinterest": "http:pinterest.com",
"reddit": "https:www.reddit.com",
"telegram": "https:telegram.me"
}
GET - Get campaign tags
Example request:
curl -X GET \
-G "https://api.sender.net/v2/campaigns/[campaign_id]/tags" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/tags"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/campaigns/[campaign_id]/tags',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/tags'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"id": 32,
"title": "Tag title",
"recipient_count": 0,
"active_subscribers": 0,
"opens_rate": 0,
"click_rate": 0,
"unsubscribed_count": 0,
"bounced_count": 0,
"account_id": 127,
"user_id": 10,
"created": "2021-03-02 16:54:27",
"modified": null
}
]
}
GET - Get one tag
Example request:
curl -X GET \
-G "https://api.sender.net/v2/campaigns/[campaign_id]/tags/[tagId]" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/tags/[tagId]"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/campaigns/[campaign_id]/tags/[tagId]',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/tags/[tagId]'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": {
"id": 32,
"title": "Tag title",
"recipient_count": 0,
"active_subscribers": 0,
"opens_rate": 0,
"click_rate": 0,
"unsubscribed_count": 0,
"bounced_count": 0,
"account_id": 127,
"user_id": 10,
"created": "2021-03-02 16:54:27",
"modified": null
}
}
GET - Get filters
Example request:
curl -X GET \
-G "https://api.sender.net/v2/campaigns/[campaign_id]/filters" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/filters"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/campaigns/[campaign_id]/filters',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/filters'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"id": 311,
"account_id": 4,
"name": "Margaret Extensions",
"conditions": {
"type": "tag",
"operator": "is",
"operand": {
"title": "Unsubscribed",
"value": "unsubscribed",
"id": "unsubscribed"
}
},
"created": "2004-07-07 00:00:00",
"modified": "2018-12-23 00:00:00",
"subscribers": null
}
]
}
Received response:
Request failed with error:
GET - Get one filter
Example request:
curl -X GET \
-G "https://api.sender.net/v2/campaigns/[campaign_id]/filters/[filterId]" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/filters/[filterId]"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/campaigns/[campaign_id]/filters/[filterId]',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/filters/[filterId]'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": {
"id": 311,
"account_id": 4,
"name": "Margaret Extensions",
"conditions": {
"type": "tag",
"operator": "is",
"operand": {
"title": "Unsubscribed",
"value": "unsubscribed",
"id": "unsubscribed"
}
},
"created": "2004-07-07 00:00:00",
"modified": "2018-12-23 00:00:00",
"subscribers": null
}
}
Received response:
Request failed with error:
POST - Create campaign
Example request:
curl -X POST \
"https://api.sender.net/v2/campaigns" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"title":"Enter your campaign title","subject":"Enter the subject for your email campaign","from":"email received from - John Doe","reply_to":"[email protected]","google_analytics":1,"auto_followup_subject":"Follow up of [email protected]","auto_followup_delay":72,"auto_followup_active":false,"preheader":"labore","last_action":"api","content_type":"editor"}'
const url = new URL(
"https://api.sender.net/v2/campaigns"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "Enter your campaign title",
"subject": "Enter the subject for your email campaign",
"from": "email received from - John Doe",
"reply_to": "[email protected]",
"google_analytics": 1,
"auto_followup_subject": "Follow up of [email protected]",
"auto_followup_delay": 72,
"auto_followup_active": false,
"preheader": "labore",
"last_action": "api",
"content_type": "editor"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.sender.net/v2/campaigns',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'title' => 'Enter your campaign title',
'subject' => 'Enter the subject for your email campaign',
'from' => 'email received from - John Doe',
'reply_to' => '[email protected]',
'google_analytics' => 1.0,
'auto_followup_subject' => 'Follow up of [email protected]',
'auto_followup_delay' => 72.0,
'auto_followup_active' => false,
'preheader' => 'labore',
'last_action' => 'api',
'content_type' => 'editor',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns'
payload = {
"title": "Enter your campaign title",
"subject": "Enter the subject for your email campaign",
"from": "email received from - John Doe",
"reply_to": "[email protected]",
"google_analytics": 1,
"auto_followup_subject": "Follow up of [email protected]",
"auto_followup_delay": 72,
"auto_followup_active": false,
"preheader": "labore",
"last_action": "api",
"content_type": "editor"
}
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"success": true,
"message": "Campaign created",
"data": {
"id": "campaign_id",
"subject": "Campaign subject",
"reply_to": "[email protected]",
"language": "eng",
"recipient_count": null,
"from": "email received from - John Doe",
"schedule_time": null,
"last_action": "api",
"sent_time": null,
"status": "DRAFT",
"created": "2020-11-30 18:12:28",
"modified": "2020-11-30 18:12:28",
"title": "Campaign title",
"auto_followup_active": false,
"auto_followup_subject": "Follow up of [email protected]",
"auto_followup_delay": 72,
"editor": "text",
"opens": null,
"clicks": null,
"send_to_all": null,
"html": {
"id": "html_id",
"thumbnail_url": null,
"has_preview": false
},
"sent_count": 0
}
}
Received response:
Request failed with error:
POST - Send campaign
Example request:
curl -X POST \
"https://api.sender.net/v2/campaigns/[campaign_id]/send" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/send"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.sender.net/v2/campaigns/[campaign_id]/send',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/send'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers)
response.json()
Example response (200):
{
"success": true,
"message": "Campaign started to send"
}
Received response:
Request failed with error:
POST - Schedule campaign
Example request:
curl -X POST \
"https://api.sender.net/v2/campaigns/[campaign_id]/schedule" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"schedule_time":"2025-11-19 17:08:17"}'
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/schedule"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"schedule_time": "2025-11-19 17:08:17"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.sender.net/v2/campaigns/[campaign_id]/schedule',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'schedule_time' => '2025-11-19 17:08:17',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/schedule'
payload = {
"schedule_time": "2025-11-19 17:08:17"
}
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"success": true,
"message": "Success scheduled"
}
Received response:
Request failed with error:
POST - Copy campaign
Example request:
curl -X POST \
"https://api.sender.net/v2/campaigns/[campaign_id]/copy" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/copy"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.sender.net/v2/campaigns/[campaign_id]/copy',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/copy'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers)
response.json()
Example response (200):
{
"success": true,
"message": "Campaign duplicated"
}
Received response:
Request failed with error:
POST - Send test mail
Example request:
curl -X POST \
"https://api.sender.net/v2/campaigns/[campaign_id]/send_test_email" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"address":"[email protected]"}'
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/send_test_email"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"address": "[email protected]"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.sender.net/v2/campaigns/[campaign_id]/send_test_email',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'address' => '[email protected]',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/send_test_email'
payload = {
"address": "[email protected]"
}
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"success": false,
"message": "Test email sent to [email protected]"
}
Received response:
Request failed with error:
POST - Set auto follow up
Example request:
curl -X POST \
"https://api.sender.net/v2/campaigns/[campaign_id]/follow_up" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"subject":"Subject text","time":72}'
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/follow_up"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"subject": "Subject text",
"time": 72
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.sender.net/v2/campaigns/[campaign_id]/follow_up',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'subject' => 'Subject text',
'time' => 72,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/follow_up'
payload = {
"subject": "Subject text",
"time": 72
}
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"success": true,
"message": "Campaign auto followup set"
}
Received response:
Request failed with error:
POST - Set tags
Example request:
curl -X POST \
"https://api.sender.net/v2/campaigns/[campaign_id]/tags/set" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"tags_arr":"tag_id1, tag_id2"}'
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/tags/set"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"tags_arr": "tag_id1, tag_id2"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.sender.net/v2/campaigns/[campaign_id]/tags/set',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'tags_arr' => 'tag_id1, tag_id2',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/tags/set'
payload = {
"tags_arr": "tag_id1, tag_id2"
}
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"success": true,
"message": {
"attached": [
"tag_id1, tag_id2"
],
"detached": [
"previously set tags"
],
"updated": []
}
}
POST - Store tag in campaign
Example request:
curl -X POST \
"https://api.sender.net/v2/campaigns/[campaign_id]/tags/[tagId]" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/tags/[tagId]"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.sender.net/v2/campaigns/[campaign_id]/tags/[tagId]',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/tags/[tagId]'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers)
response.json()
Example response (200):
{
"data": {
"id": 32,
"title": "Tag title",
"recipient_count": 0,
"active_subscribers": 0,
"opens_rate": 0,
"click_rate": 0,
"unsubscribed_count": 0,
"bounced_count": 0,
"account_id": 127,
"user_id": 10,
"created": "2021-03-02 16:54:27",
"modified": null
}
}
POST - Store a segment within a campaign
Example request:
curl -X POST \
"https://api.sender.net/v2/campaigns/[campaign_id]/filters" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/filters"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.sender.net/v2/campaigns/[campaign_id]/filters',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/filters'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers)
response.json()
Example response (200):
{
"data": {
"id": null,
"campaign_id": null,
"filter_id": null,
"subscribers_count_will_get_campaign": 0
}
}
Received response:
Request failed with error:
POST - Set filters
Example request:
curl -X POST \
"https://api.sender.net/v2/campaigns/[campaign_id]/filters/set" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"filters_arr":["labore"]}'
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/filters/set"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"filters_arr": [
"labore"
]
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.sender.net/v2/campaigns/[campaign_id]/filters/set',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'filters_arr' => [
'labore',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/filters/set'
payload = {
"filters_arr": [
"labore"
]
}
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"success": true,
"message": {
"attached": [
"filters_arr - send"
],
"detached": [
"previously set filters"
],
"updated": []
}
}
Received response:
Request failed with error:
POST - Cancel auto follow up
Example request:
curl -X POST \
"https://api.sender.net/v2/campaigns/[campaign_id]/cancel_followup" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/cancel_followup"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.sender.net/v2/campaigns/[campaign_id]/cancel_followup',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/cancel_followup'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers)
response.json()
Received response:
Request failed with error:
PATCH - Update campaign
Example request:
curl -X PATCH \
"https://api.sender.net/v2/campaigns/[campaign_id]" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"title":"Updated campaign title","subject":"Updated campaign subject","from":"[email protected]","reply_to":"[email protected]","google_analytics":1,"auto_followup_subject":"Follow up of [email protected]","auto_followup_delay":96,"auto_followup_active":false,"preheader":"labore","content_type":"editor","domain_id":2}'
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "Updated campaign title",
"subject": "Updated campaign subject",
"from": "[email protected]",
"reply_to": "[email protected]",
"google_analytics": 1,
"auto_followup_subject": "Follow up of [email protected]",
"auto_followup_delay": 96,
"auto_followup_active": false,
"preheader": "labore",
"content_type": "editor",
"domain_id": 2
}
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://api.sender.net/v2/campaigns/[campaign_id]',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'title' => 'Updated campaign title',
'subject' => 'Updated campaign subject',
'from' => '[email protected]',
'reply_to' => '[email protected]',
'google_analytics' => 1.0,
'auto_followup_subject' => 'Follow up of [email protected]',
'auto_followup_delay' => 96.0,
'auto_followup_active' => false,
'preheader' => 'labore',
'content_type' => 'editor',
'domain_id' => 2.0,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]'
payload = {
"title": "Updated campaign title",
"subject": "Updated campaign subject",
"from": "[email protected]",
"reply_to": "[email protected]",
"google_analytics": 1,
"auto_followup_subject": "Follow up of [email protected]",
"auto_followup_delay": 96,
"auto_followup_active": false,
"preheader": "labore",
"content_type": "editor",
"domain_id": 2
}
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PATCH', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"success": true,
"message": "Campaign Creating and modifying updated"
}
Received response:
Request failed with error:
DELETE - Delete campaign
Example request:
curl -X DELETE \
"https://api.sender.net/v2/campaigns" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"ids":"all","status":"PENDING","title":"Your campaign title"}'
const url = new URL(
"https://api.sender.net/v2/campaigns"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"ids": "all",
"status": "PENDING",
"title": "Your campaign title"
}
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.sender.net/v2/campaigns',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'ids' => 'all',
'status' => 'PENDING',
'title' => 'Your campaign title',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns'
payload = {
"ids": "all",
"status": "PENDING",
"title": "Your campaign title"
}
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"success": true,
"message": "Deleted campaign"
}
Received response:
Request failed with error:
DELETE - Cancel scheduled campaign
Example request:
curl -X DELETE \
"https://api.sender.net/v2/campaigns/[campaign_id]/schedule" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/schedule"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.sender.net/v2/campaigns/[campaign_id]/schedule',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/schedule'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (200):
{
"success": true,
"message": "Canceled scheduled campaign"
}
Received response:
Request failed with error:
DELETE - Cancel auto follow up
Example request:
curl -X DELETE \
"https://api.sender.net/v2/campaigns/[campaign_id]/follow_up" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/follow_up"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.sender.net/v2/campaigns/[campaign_id]/follow_up',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/follow_up'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (200):
{
"success": true,
"message": "Canceled auto follow up"
}
Received response:
Request failed with error:
DELETE - Detach group from campaign
Example request:
curl -X DELETE \
"https://api.sender.net/v2/campaigns/[campaign_id]/tags/[tagId]" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/tags/[tagId]"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.sender.net/v2/campaigns/[campaign_id]/tags/[tagId]',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/tags/[tagId]'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (200):
{
"data": {
"subscribers_count_will_get_campaign": 0
}
}
DELETE - Detach segment from campaign
Example request:
curl -X DELETE \
"https://api.sender.net/v2/campaigns/[campaign_id]/filters" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"filter_id":5}'
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/filters"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"filter_id": 5
}
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.sender.net/v2/campaigns/[campaign_id]/filters',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'filter_id' => 5,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/filters'
payload = {
"filter_id": 5
}
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"data": {
"subscribers_count_will_get_campaign": 0
}
}
Received response:
Request failed with error:
Campaign Reports and statistics
GET - Get Events
Example request:
curl -X GET \
-G "https://api.sender.net/v2/campaigns/[campaign_id]/events" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/events"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/campaigns/[campaign_id]/events',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/events'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"subscriber_id": 29,
"account_id": null,
"user_id": null,
"firstname": null,
"lastname": null,
"email": null,
"unsubscribed": null,
"unsubscribed_at": null,
"bounced": null,
"bounced_at": null,
"subscriber_created": null,
"created": "2020-05-06 14:34:26",
"type": null
}
],
"links": {
"first": "https://api.sender.net/v2/campaigns/[campaign_id]/events?page=1",
"last": "https://api.sender.net/v2/campaigns/[campaign_id]/events?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "pagination.previous",
"active": false
},
{
"url": "https://api.sender.net/v2/campaigns/[campaign_id]/events?page=1",
"label": 1,
"active": true
},
{
"url": null,
"label": "pagination.next",
"active": false
}
],
"path": "https://api.sender.net/v2/campaigns/[campaign_id]/events",
"per_page": "10",
"to": 1,
"total": 1
}
}
Received response:
Request failed with error:
GET - Get opens
Example request:
curl -X GET \
-G "https://api.sender.net/v2/campaigns/[campaign_id]/opens" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/opens"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/campaigns/[campaign_id]/opens',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/opens'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"email": "[email protected]",
"subscriber_created": null,
"created": "2020-03-16 11:12:16",
"subscriber_id": null,
"type": null
}
],
"links": {
"first": "https://api.sender.net/v2/campaigns/[campaign_id]/opens?page=1",
"last": "https://api.sender.net/v2/campaigns/[campaign_id]/opens?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "pagination.previous",
"active": false
},
{
"url": "https://api.sender.net/v2/campaigns/[campaign_id]/opens?page=1",
"label": 1,
"active": true
},
{
"url": null,
"label": "pagination.next",
"active": false
}
],
"path": "https://api.sender.net/v2/campaigns/[campaign_id]/opens",
"per_page": "10",
"to": 1,
"total": 1
}
}
Received response:
Request failed with error:
GET - Get clicks on campaign
Example request:
curl -X GET \
-G "https://api.sender.net/v2/campaigns/[campaign_id]/clicks" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/clicks"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/campaigns/[campaign_id]/clicks',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/clicks'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"email": "[email protected]",
"subscriber_created": null,
"created": "2020-03-16 11:12:16",
"subscriber_id": null,
"type": null
}
],
"links": {
"first": "https://api.sender.net/v2/campaigns/[campaign_id]/clicks?page=1",
"last": "https://api.sender.net/v2/campaigns/[campaign_id]/clicks?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "pagination.previous",
"active": false
},
{
"url": "https://api.sender.net/v2/campaigns/[campaign_id]/clicks?page=1",
"label": 1,
"active": true
},
{
"url": null,
"label": "pagination.next",
"active": false
}
],
"path": "https://api.sender.net/v2/campaigns/[campaign_id]/clicks",
"per_page": "10",
"to": 1,
"total": 1
}
}
Received response:
Request failed with error:
GET - Get soft bounces
Example request:
curl -X GET \
-G "https://api.sender.net/v2/campaigns/[campaign_id]/soft_bounces" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/soft_bounces"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/campaigns/[campaign_id]/soft_bounces',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/soft_bounces'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"email": "[email protected]",
"subscriber_created": null,
"created": "2020-03-16 11:12:16",
"subscriber_id": null,
"type": null
}
],
"links": {
"first": "https://api.sender.net/v2/campaigns/[campaign_id]/soft_bounces?page=1",
"last": "https://api.sender.net/v2/campaigns/[campaign_id]/soft_bounces?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "pagination.previous",
"active": false
},
{
"url": "https://api.sender.net/v2/campaigns/[campaign_id]/soft_bounces?page=1",
"label": 1,
"active": true
},
{
"url": null,
"label": "pagination.next",
"active": false
}
],
"path": "https://api.sender.net/v2/campaigns/[campaign_id]/soft_bounces",
"per_page": "10",
"to": 1,
"total": 1
}
}
Received response:
Request failed with error:
GET - Get hard bounces
Example request:
curl -X GET \
-G "https://api.sender.net/v2/campaigns/[campaign_id]/hard_bounces" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/hard_bounces"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/campaigns/[campaign_id]/hard_bounces',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/hard_bounces'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"email": "[email protected]",
"subscriber_created": null,
"created": "2020-03-16 11:12:16",
"subscriber_id": null,
"type": null
}
],
"links": {
"first": "https://api.sender.net/v2/campaigns/[campaign_id]/hard_bounces?page=1",
"last": "https://api.sender.net/v2/campaigns/[campaign_id]/hard_bounces?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "pagination.previous",
"active": false
},
{
"url": "https://api.sender.net/v2/campaigns/[campaign_id]/hard_bounces?page=1",
"label": 1,
"active": true
},
{
"url": null,
"label": "pagination.next",
"active": false
}
],
"path": "https://api.sender.net/v2/campaigns/[campaign_id]/hard_bounces",
"per_page": "10",
"to": 1,
"total": 1
}
}
Received response:
Request failed with error:
GET - Get unsubscribes
Example request:
curl -X GET \
-G "https://api.sender.net/v2/campaigns/[campaign_id]/unsubscribes" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/unsubscribes"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/campaigns/[campaign_id]/unsubscribes',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/unsubscribes'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"email": "[email protected]",
"subscriber_created": null,
"created": "2020-03-16 11:12:16",
"subscriber_id": null,
"type": null
}
],
"links": {
"first": "https://api.sender.net/v2/campaigns/[campaign_id]/unsubscribes?page=1",
"last": "https://api.sender.net/v2/campaigns/[campaign_id]/unsubscribes?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "pagination.previous",
"active": false
},
{
"url": "https://api.sender.net/v2/campaigns/[campaign_id]/unsubscribes?page=1",
"label": 1,
"active": true
},
{
"url": null,
"label": "pagination.next",
"active": false
}
],
"path": "https://api.sender.net/v2/campaigns/[campaign_id]/unsubscribes",
"per_page": "10",
"to": 1,
"total": 1
}
}
Received response:
Request failed with error:
GET - Get spam complaints
Example request:
curl -X GET \
-G "https://api.sender.net/v2/campaigns/[campaign_id]/complaints" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/complaints"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/campaigns/[campaign_id]/complaints',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/complaints'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"email": "[email protected]",
"subscriber_created": null,
"created": "2020-03-16 11:12:16",
"subscriber_id": null,
"type": null
}
],
"links": {
"first": "https://api.sender.net/v2/campaigns/[campaign_id]/complaints?page=1",
"last": "https://api.sender.net/v2/campaigns/[campaign_id]/complaints?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "pagination.previous",
"active": false
},
{
"url": "https://api.sender.net/v2/campaigns/[campaign_id]/complaints?page=1",
"label": 1,
"active": true
},
{
"url": null,
"label": "pagination.next",
"active": false
}
],
"path": "https://api.sender.net/v2/campaigns/[campaign_id]/complaints",
"per_page": "10",
"to": 1,
"total": 1
}
}
Received response:
Request failed with error:
GET - Get unopens
Example request:
curl -X GET \
-G "https://api.sender.net/v2/campaigns/[campaign_id]/unopens" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/unopens"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/campaigns/[campaign_id]/unopens',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/unopens'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"email": "[email protected]",
"subscriber_created": null,
"created": "2020-03-16 11:12:16",
"subscriber_id": null,
"type": null
}
],
"links": {
"first": "https://api.sender.net/v2/campaigns/[campaign_id]/unopens?page=1",
"last": "https://api.sender.net/v2/campaigns/[campaign_id]/unopens?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "pagination.previous",
"active": false
},
{
"url": "https://api.sender.net/v2/campaigns/[campaign_id]/unopens?page=1",
"label": 1,
"active": true
},
{
"url": null,
"label": "pagination.next",
"active": false
}
],
"path": "https://api.sender.net/v2/campaigns/[campaign_id]/unopens",
"per_page": "10",
"to": 1,
"total": 1
}
}
Received response:
Request failed with error:
GET - Get errors
Example request:
curl -X GET \
-G "https://api.sender.net/v2/campaigns/[campaign_id]/errors" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/campaigns/[campaign_id]/errors"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/campaigns/[campaign_id]/errors',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/campaigns/[campaign_id]/errors'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"errors": [
{
"title": "No credit/plan",
"details": "There is not enough credit/plan",
"route": "settings"
},
{
"title": "Unsubscribe link",
"details": "There is no unsubscribe link in the email",
"route": "editor"
}
],
"warnings": [
{
"title": "Has default links",
"details": "Your email contains default links",
"route": "editor"
},
{
"title": "SPF record is not verified",
"details": "Your domain's SPF record is not verified",
"route": "settings"
},
{
"title": "DKIM record is not verified",
"details": "Your domain's DKIM record is not verified",
"route": "settings"
}
]
}
Received response:
Request failed with error:
Commerce
GET - Get Cart
Example request:
curl -X GET \
-G "https://api.sender.net/v2/carts/[cart_hash]" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/carts/[cart_hash]"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/carts/[cart_hash]',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/carts/[cart_hash]'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"id": 71,
"remote_id": "remote_id",
"url": "www.url.com",
"recipient_id": "recipient_id",
"subscriber": {
"id": "subscriber_id",
"email": "[email protected]",
"statuses": [
"ACTIVE"
]
},
"cartLines": [
{
"id": "cartLine_id",
"cart_id": "cart_id",
"sku": "product_sku",
"name": "product_name",
"price": "15.00",
"price_display": "15 EUR",
"quantity": 1,
"image": "www.link.jpg"
}
]
}
]
}
Received response:
Request failed with error:
GET - Get All Carts
Example request:
curl -X GET \
-G "https://api.sender.net/v2/carts" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/carts"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/carts',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/carts'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"id": 71,
"remote_id": "remote_id",
"url": "www.url.com",
"recipient_id": "recipient_id",
"subscriber": {
"id": "subscriber_id",
"email": "[email protected]",
"statuses": [
"ACTIVE"
]
},
"cartLines": [
{
"id": "cartLine_id",
"cart_id": "cart_id",
"sku": "product_sku",
"name": "product_name",
"price": "15.00",
"price_display": "15 EUR",
"quantity": 1,
"image": "www.link.jpg"
}
]
}
],
"links": {
"first": "https://api.sender.net/v2/carts?page=1",
"last": "https://api.sender.net/v2/carts?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "pagination.previous",
"active": false
},
{
"url": "https://api.sender.net/v2/carts?page=1",
"label": 1,
"active": true
},
{
"url": null,
"label": "pagination.next",
"active": false
}
],
"path": "https://api.sender.net/v2/carts",
"per_page": 10,
"to": 1,
"total": 1
}
}
Received response:
Request failed with error:
POST - Track Cart
Example request:
curl -X POST \
"https://api.sender.net/v2/carts" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"external_id":12345,"email":"[email protected]","url":"www.store-url-of-cart-information.com","products":[{"sku":"sku number","name":"product name","price":"26.00","price_display":"26 EUR","qty":1,"image":"www.link-to-the-product-image.jpg"}],"currency":"eur","order_total":"30","tax_total":"4"}'
const url = new URL(
"https://api.sender.net/v2/carts"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"external_id": 12345,
"email": "[email protected]",
"url": "www.store-url-of-cart-information.com",
"products": [
{
"sku": "sku number",
"name": "product name",
"price": "26.00",
"price_display": "26 EUR",
"qty": 1,
"image": "www.link-to-the-product-image.jpg"
}
],
"currency": "eur",
"order_total": "30",
"tax_total": "4"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.sender.net/v2/carts',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'external_id' => 12345,
'email' => '[email protected]',
'url' => 'www.store-url-of-cart-information.com',
'products' => [
[
'sku' => 'sku number',
'name' => 'product name',
'price' => '26.00',
'price_display' => '26 EUR',
'qty' => 1.0,
'image' => 'www.link-to-the-product-image.jpg',
],
],
'currency' => 'eur',
'order_total' => '30',
'tax_total' => '4',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/carts'
payload = {
"external_id": 12345,
"email": "[email protected]",
"url": "www.store-url-of-cart-information.com",
"products": [
{
"sku": "sku number",
"name": "product name",
"price": "26.00",
"price_display": "26 EUR",
"qty": 1,
"image": "www.link-to-the-product-image.jpg"
}
],
"currency": "eur",
"order_total": "30",
"tax_total": "4"
}
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"success": true,
"message": "Cart successfully tracked"
}
Received response:
Request failed with error:
POST - Convert Cart
Example request:
curl -X POST \
"https://api.sender.net/v2/carts/[external_id]/convert" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/carts/[external_id]/convert"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.sender.net/v2/carts/[external_id]/convert',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/carts/[external_id]/convert'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers)
response.json()
Example response (200):
{
"success": true,
"message": "Cart converted"
}
Received response:
Request failed with error:
DELETE - Delete Cart
Example request:
curl -X DELETE \
"https://api.sender.net/v2/carts/[external_id]" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/carts/[external_id]"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.sender.net/v2/carts/[external_id]',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/carts/[external_id]'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (200):
{
"success": true,
"message": "Deleted Cart"
}
Received response:
Request failed with error:
Field
GET - Get all fields
Example request:
curl -X GET \
-G "https://api.sender.net/v2/fields" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/fields"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/fields',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/fields'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"id": 4,
"title": "extra",
"account_id": "account_id",
"user_id": "user_id",
"created": "2020-12-17 06:46:00",
"modified": "2020-12-17 06:46:00",
"type": "text",
"show": null,
"field_name": "{$extra}",
"position": null
}
],
"links": {
"first": "https://api.sender.net/v2/fields?page=1",
"last": "https://api.sender.net/v2/fields?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "pagination.previous",
"active": false
},
{
"url": "https://api.sender.net/v2/fields?page=1",
"label": 1,
"active": true
},
{
"url": null,
"label": "pagination.next",
"active": false
}
],
"path": "https://api.sender.net/v2/fields",
"per_page": 10,
"to": 1,
"total": 1
}
}
Received response:
Request failed with error:
POST - Create field
Example request:
curl -X POST \
"https://api.sender.net/v2/fields" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"title":"extra","type":"text"}'
const url = new URL(
"https://api.sender.net/v2/fields"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "extra",
"type": "text"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.sender.net/v2/fields',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'title' => 'extra',
'type' => 'text',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/fields'
payload = {
"title": "extra",
"type": "text"
}
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"success": true,
"message": "Field successfully created",
"data": {
"id": 1,
"title": "extra",
"account_id": "account_id",
"user_id": "user_id",
"created": "2020-12-17 06:46:00",
"modified": "2020-12-17 06:46:00",
"type": "text",
"show": null,
"field_name": "{$extra}",
"position": null
}
}
Received response:
Request failed with error:
PATCH - Update field
Example request:
curl -X PATCH \
"https://api.sender.net/v2/fields/[field_id]" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"title":"Updated title","show":true}'
const url = new URL(
"https://api.sender.net/v2/fields/[field_id]"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "Updated title",
"show": true
}
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://api.sender.net/v2/fields/[field_id]',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'title' => 'Updated title',
'show' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/fields/[field_id]'
payload = {
"title": "Updated title",
"show": true
}
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PATCH', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"success": true,
"message": "Field updated"
}
Received response:
Request failed with error:
DELETE - Delete field
Example request:
curl -X DELETE \
"https://api.sender.net/v2/fields/[field_id]" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/fields/[field_id]"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.sender.net/v2/fields/[field_id]',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/fields/[field_id]'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (200):
{
"success": true,
"message": "Deleted field"
}
Received response:
Request failed with error:
Groups
GET - Get one group
Example request:
curl -X GET \
-G "https://api.sender.net/v2/tags/[groups_id]" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/tags/[groups_id]"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/tags/[groups_id]',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/tags/[groups_id]'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": {
"id": 32,
"title": "Tag title",
"recipient_count": 0,
"active_subscribers": 0,
"opens_rate": 0,
"click_rate": 0,
"unsubscribed_count": 0,
"bounced_count": 0,
"account_id": 127,
"user_id": 10,
"created": "2021-03-02 16:54:27",
"modified": null
}
}
GET - Get all groups
Example request:
curl -X GET \
-G "https://api.sender.net/v2/tags" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/tags"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/tags',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/tags'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"id": 32,
"title": "Tag title",
"recipient_count": 0,
"active_subscribers": 0,
"opens_rate": 0,
"click_rate": 0,
"unsubscribed_count": 0,
"bounced_count": 0,
"account_id": 127,
"user_id": 10,
"created": "2021-03-02 16:54:27",
"modified": null
}
],
"links": {
"first": "https://api.sender.net/v2/tags?page=1",
"last": "https://api.sender.net/v2/tags?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "pagination.previous",
"active": false
},
{
"url": "https://api.sender.net/v2/tags?page=1",
"label": 1,
"active": true
},
{
"url": null,
"label": "pagination.next",
"active": false
}
],
"path": "https://api.sender.net/v2/tags",
"per_page": "10",
"to": 1,
"total": 1
}
}
POST - Add subscriber to group
Example request:
curl -X POST \
"https://api.sender.net/v2/subscribers/tags/[tagId]" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"subscribers":"12"}'
const url = new URL(
"https://api.sender.net/v2/subscribers/tags/[tagId]"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"subscribers": "12"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.sender.net/v2/subscribers/tags/[tagId]',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'subscribers' => '12',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/subscribers/tags/[tagId]'
payload = {
"subscribers": "12"
}
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"success": true,
"message": "Added tag"
}
POST - Create group
Example request:
curl -X POST \
"https://api.sender.net/v2/tags" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"title":"Tag title"}'
const url = new URL(
"https://api.sender.net/v2/tags"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "Tag title"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.sender.net/v2/tags',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'title' => 'Tag title',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/tags'
payload = {
"title": "Tag title"
}
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"data": {
"id": 18,
"title": "Tag title",
"recipient_count": 0,
"active_subscribers": 0,
"opens_rate": 0,
"click_rate": 0,
"unsubscribed_count": 0,
"bounced_count": 0,
"account_id": 127,
"user_id": 10,
"created": "2021-03-02 16:54:27",
"modified": null
}
}
PATCH - Update group
Example request:
curl -X PATCH \
"https://api.sender.net/v2/tags/[groups_id]" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"title":"New Title"}'
const url = new URL(
"https://api.sender.net/v2/tags/[groups_id]"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "New Title"
}
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://api.sender.net/v2/tags/[groups_id]',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'title' => 'New Title',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/tags/[groups_id]'
payload = {
"title": "New Title"
}
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PATCH', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"success": true,
"message": "Groups updated"
}
DELETE - Delete group
Example request:
curl -X DELETE \
"https://api.sender.net/v2/tags/[groups_id]" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/tags/[groups_id]"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.sender.net/v2/tags/[groups_id]',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/tags/[groups_id]'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (200):
{
"success": true,
"message": "Deleted group"
}
Segment
GET - Get all segments
Example request:
curl -X GET \
-G "https://api.sender.net/v2/filters" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/filters"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/filters',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/filters'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"id": 311,
"account_id": 4,
"name": "Margaret Extensions",
"conditions": {
"type": "tag",
"operator": "is",
"operand": {
"title": "Unsubscribed",
"value": "unsubscribed",
"id": "unsubscribed"
}
},
"created": "2004-07-07 00:00:00",
"modified": "2018-12-23 00:00:00",
"subscribers": null
}
],
"links": {
"first": "https://api.sender.net/v2/filters?page=1",
"last": "https://api.sender.net/v2/filters?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "pagination.previous",
"active": false
},
{
"url": "https://api.sender.net/v2/filters?page=1",
"label": 1,
"active": true
},
{
"url": null,
"label": "pagination.next",
"active": false
}
],
"path": "https://api.sender.net/v2/filters",
"per_page": "10",
"to": 1,
"total": 1
}
}
Received response:
Request failed with error:
GET - Get one segment
Example request:
curl -X GET \
-G "https://api.sender.net/v2/filters/[segment_id]" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/filters/[segment_id]"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/filters/[segment_id]',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/filters/[segment_id]'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": {
"id": 311,
"account_id": 4,
"name": "Margaret Extensions",
"conditions": {
"type": "tag",
"operator": "is",
"operand": {
"title": "Unsubscribed",
"value": "unsubscribed",
"id": "unsubscribed"
}
},
"created": "2004-07-07 00:00:00",
"modified": "2018-12-23 00:00:00",
"subscribers": null
}
}
Received response:
Request failed with error:
DELETE - Delete segment
Example request:
curl -X DELETE \
"https://api.sender.net/v2/filters/[segment_id]" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/filters/[segment_id]"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.sender.net/v2/filters/[segment_id]',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/filters/[segment_id]'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (200):
{
"success": true,
"message": "Deleted segment"
}
Received response:
Request failed with error:
Subscriber
GET - Get all unsubscribes
Example request:
curl -X GET \
-G "https://api.sender.net/v2/unsubscribes" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/unsubscribes"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/unsubscribes',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/unsubscribes'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"email": "[email protected]",
"subscriber_created": "2020-01-16 11:12:16",
"created": "2020-03-16 11:12:16",
"subscriber_id": "subscriber_id",
"type": "UNSUBSCRIBE"
}
],
"links": {
"first": "https://api.sender.net/v2/unsubscribes?page=1",
"last": "https://api.sender.net/v2/unsubscribes?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "pagination.previous",
"active": false
},
{
"url": "https://api.sender.net/v2/unsubscribes?page=1",
"label": 1,
"active": true
},
{
"url": null,
"label": "pagination.next",
"active": false
}
],
"path": "https://api.sender.net/v2/unsubscribes",
"per_page": 10,
"to": 1,
"total": 1
}
}
Received response:
Request failed with error:
GET - Subscribers events
Example request:
curl -X GET \
-G "https://api.sender.net/v2/subscribers/[subscriber_id]/events" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/subscribers/[subscriber_id]/events"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/subscribers/[subscriber_id]/events',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/subscribers/[subscriber_id]/events'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Received response:
Request failed with error:
GET - View subscriber
Example request:
curl -X GET \
-G "https://api.sender.net/v2/subscribers/[subscriber_id]" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/subscribers/[subscriber_id]"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/subscribers/[subscriber_id]',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/subscribers/[subscriber_id]'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": {
"id": 24,
"email": "[email protected]",
"firstname": "",
"lastname": "",
"unsubscribed_at": "2020-05-14 09:55:05",
"bounced_at": null,
"created": "2020-03-29 16:32:42",
"unsubscribed": 0,
"bounced": 0,
"spam_reported": 0,
"sent_count": 0,
"opened_count": 2,
"clicked_count": 1,
"subscriber_tags": [],
"columns": [
{
"value_id": "value_id",
"value_type": "datetime",
"account_id": "account_id",
"subscriber_id": "24",
"field_id": "field_id",
"field_title": "date2",
"value": {
"id": "value_id",
"value": "2020-08-02 14:15:00",
"field_id": "field_id"
}
}
]
}
}
Received response:
Request failed with error:
GET - Get subscriber by email
Example request:
curl -X GET \
-G "https://api.sender.net/v2/subscribers/by_email/[email]" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/subscribers/by_email/[email]"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/subscribers/by_email/[email]',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/subscribers/by_email/[email]'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": {
"id": 24,
"email": "[email protected]",
"firstname": "",
"lastname": "",
"unsubscribed_at": "2020-05-14 09:55:05",
"bounced_at": null,
"created": "2020-03-29 16:32:42",
"unsubscribed": 0,
"bounced": 0,
"spam_reported": 0,
"sent_count": 0,
"opened_count": 2,
"clicked_count": 1,
"subscriber_tags": [],
"columns": [
{
"value_id": "value_id",
"value_type": "datetime",
"account_id": "account_id",
"subscriber_id": "24",
"field_id": "field_id",
"field_title": "date2",
"value": {
"id": "value_id",
"value": "2020-08-02 14:15:00",
"field_id": "field_id"
}
}
]
}
}
Received response:
Request failed with error:
POST - Add subscriber
Example request:
curl -X POST \
"https://api.sender.net/v2/subscribers" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"email":"[email protected]","firstname":"firstname","lastname":"lastname","tags":["title1"]}'
const url = new URL(
"https://api.sender.net/v2/subscribers"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "[email protected]",
"firstname": "firstname",
"lastname": "lastname",
"tags": [
"title1"
]
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.sender.net/v2/subscribers',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'email' => '[email protected]',
'firstname' => 'firstname',
'lastname' => 'lastname',
'tags' => [
'title1',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/subscribers'
payload = {
"email": "[email protected]",
"firstname": "firstname",
"lastname": "lastname",
"tags": [
"title1"
]
}
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"success": true,
"message": "Success",
"data": {
"id": 10000085,
"email": "[email protected]",
"firstname": "firstname",
"lastname": "lastname",
"unsubscribed_at": null,
"bounced_at": null,
"created": "2022-11-24 12:44:08",
"unsubscribed": null,
"location": null,
"bounced": null,
"spam_reported": null,
"subscriber_tags": [
{
"id": 1,
"title": "title1",
"recipient_count": 0,
"unsubscribed_count": 0,
"bounced_count": 0,
"account_id": "account_id",
"user_id": "user_id",
"created": "2020-11-26 12:11:16",
"modified": null
},
{
"id": 2,
"title": "title2",
"recipient_count": 0,
"unsubscribed_count": 0,
"bounced_count": 0,
"account_id": "account_id",
"user_id": "user_id",
"created": "2020-11-28 12:11:16",
"modified": null
}
],
"columns": []
}
}
Received response:
Request failed with error:
PATCH - Edit subscriber
Example request:
curl -X PATCH \
"https://api.sender.net/v2/subscribers/[subscriber_id]" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"firstname":"John","lastname":"Doe","created":"2015-04-28","status":0}'
const url = new URL(
"https://api.sender.net/v2/subscribers/[subscriber_id]"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"firstname": "John",
"lastname": "Doe",
"created": "2015-04-28",
"status": 0
}
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://api.sender.net/v2/subscribers/[subscriber_id]',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'firstname' => 'John',
'lastname' => 'Doe',
'created' => '2015-04-28',
'status' => 0.0,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/subscribers/[subscriber_id]'
payload = {
"firstname": "John",
"lastname": "Doe",
"created": "2015-04-28",
"status": 0
}
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PATCH', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"success": true,
"message": "Subscriber updated"
}
Received response:
Request failed with error:
PATCH - Add field to subscriber
Example request:
curl -X PATCH \
"https://api.sender.net/v2/subscribers/[subscriber_id]/fields/[fieldId]" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"value":"new value"}'
const url = new URL(
"https://api.sender.net/v2/subscribers/[subscriber_id]/fields/[fieldId]"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"value": "new value"
}
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://api.sender.net/v2/subscribers/[subscriber_id]/fields/[fieldId]',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'value' => 'new value',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/subscribers/[subscriber_id]/fields/[fieldId]'
payload = {
"value": "new value"
}
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PATCH', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"success": true,
"message": "Subscriber updated"
}
Received response:
Request failed with error:
DELETE - Remove subscriber from a group
Example request:
curl -X DELETE \
"https://api.sender.net/v2/subscribers/tags/[tagId]" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"conditions":"all","subscribers":["subscriber_id","other_subscriber_id"]}'
const url = new URL(
"https://api.sender.net/v2/subscribers/tags/[tagId]"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"conditions": "all",
"subscribers": [
"subscriber_id",
"other_subscriber_id"
]
}
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.sender.net/v2/subscribers/tags/[tagId]',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'conditions' => 'all',
'subscribers' => [
'subscriber_id',
'other_subscriber_id',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/subscribers/tags/[tagId]'
payload = {
"conditions": "all",
"subscribers": [
"subscriber_id",
"other_subscriber_id"
]
}
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"success": true,
"message": "Removed subscriber from a group"
}
DELETE - Remove subscriber
Example request:
curl -X DELETE \
"https://api.sender.net/v2/subscribers" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"conditions":"all","subscribers":["subscriber_id","other_subscriber_id"]}'
const url = new URL(
"https://api.sender.net/v2/subscribers"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"conditions": "all",
"subscribers": [
"subscriber_id",
"other_subscriber_id"
]
}
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.sender.net/v2/subscribers',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'conditions' => 'all',
'subscribers' => [
'subscriber_id',
'other_subscriber_id',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/subscribers'
payload = {
"conditions": "all",
"subscribers": [
"subscriber_id",
"other_subscriber_id"
]
}
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"success": true,
"message": "Removed subscriber"
}
Received response:
Request failed with error:
Webhook
GET - Show the subscribed to hooks
Example request:
curl -X GET \
-G "https://api.sender.net/v2/current/hooks" \
-H "Authorization: Bearer [your-token]" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sender.net/v2/current/hooks"
);
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.sender.net/v2/current/hooks',
[
'headers' => [
'Authorization' => 'Bearer [your-token]',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.sender.net/v2/current/hooks'
headers = {
'Authorization': 'Bearer [your-token]',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"id": 160,
"account_id": 137,
"user_id": 242,
"url": "https://example.webhook-information-to-be-post-to.com",
"hook_trigger": "new_subscriber_in_tag"
}
],
"links": {
"first": "https://api.sender.net/v2/current/hooks?page=1",
"last": "https://api.sender.net/v2/current/hooks?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "pagination.previous",
"active": false
},
{
"url": "https://api.sender.net/v2/current/hooks?page=1",
"label": 1,
"active": true
},
{
"url": null,
"label": "pagination.next",
"active": false
}
],
"path": "https://api.sender.net/v2/current/hooks",
"per_page": "10",
"to": 1,
"total": 1
}
}
Received response:
Request failed with error: