MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_API_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by visiting your Team's dashboard and clicking Generate API token.

Contact management

APIs for managing contacts

Get contact list

requires authentication

This endpoint allows you to get a full list of contacts for a team

Example request:
curl --request GET \
    --get "http://localhost/api/v1/contacts" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/contacts"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
import requests
import json

url = 'http://localhost/api/v1/contacts'
headers = {
  'Authorization': 'Bearer {YOUR_API_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'http://localhost/api/v1/contacts',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

using System.Net.Http.Headers;

var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "{YOUR_API_KEY}");
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("http://localhost/api/v1/contacts"),
};
using (var response = await client.SendAsync(request))
{
    //response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/contacts

Headers

Authorization      

Example: Bearer {YOUR_API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

requires authentication

This endpoint allows you to search for a contact using any custom field values returns 0+ records

Example request:
curl --request GET \
    --get "http://localhost/api/v1/contacts/search?limit=19&order_by=last_name&page=2" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/contacts/search"
);

const params = {
    "limit": "19",
    "order_by": "last_name",
    "page": "2",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
import requests
import json

url = 'http://localhost/api/v1/contacts/search'
params = {
  'limit': '19',
  'order_by': 'last_name',
  'page': '2',
}
headers = {
  'Authorization': 'Bearer {YOUR_API_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'http://localhost/api/v1/contacts/search',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'limit' => '19',
            'order_by' => 'last_name',
            'page' => '2',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

using System.Net.Http.Headers;

var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "{YOUR_API_KEY}");
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("http://localhost/api/v1/contacts/search?limit=19&order_by=last_name&page=2"),
};
using (var response = await client.SendAsync(request))
{
    //response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Create a new contact

requires authentication

This endpoint allows you to create a new contact

Example request:
curl --request POST \
    "http://localhost/api/v1/contacts/create" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/contacts/create"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
import requests
import json

url = 'http://localhost/api/v1/contacts/create'
headers = {
  'Authorization': 'Bearer {YOUR_API_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost/api/v1/contacts/create',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

using System.Net.Http.Headers;

var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "{YOUR_API_KEY}");
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

var data = new MultipartFormDataContent();

var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("http://localhost/api/v1/contacts/create"),
    Content = data
};
using (var response = await client.SendAsync(request))
{
    //response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}

Request      

POST api/v1/contacts/create

Headers

Authorization      

Example: Bearer {YOUR_API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Get a contact by id

requires authentication

This endpoint allows you to get a single contact by their ID

magic here that i did not expect the call from ContactTest::test_api_get_contact passes a $contact model (which is really passing an ID???) by the time we get here, the $contact param is an object we got from the db??

Example request:
curl --request GET \
    --get "http://localhost/api/v1/contacts/1" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/contacts/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
import requests
import json

url = 'http://localhost/api/v1/contacts/1'
headers = {
  'Authorization': 'Bearer {YOUR_API_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'http://localhost/api/v1/contacts/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

using System.Net.Http.Headers;

var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "{YOUR_API_KEY}");
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("http://localhost/api/v1/contacts/1"),
};
using (var response = await client.SendAsync(request))
{
    //response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/contacts/{contact_id}

Headers

Authorization      

Example: Bearer {YOUR_API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

contact_id   integer   

The ID of the contact. Example: 1

Update an existing contact

requires authentication

This endpoint allows you to update an existing contact

Example request:
curl --request PUT \
    "http://localhost/api/v1/contacts/1/update" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/contacts/1/update"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
import requests
import json

url = 'http://localhost/api/v1/contacts/1/update'
headers = {
  'Authorization': 'Bearer {YOUR_API_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'http://localhost/api/v1/contacts/1/update',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

using System.Net.Http.Headers;

var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "{YOUR_API_KEY}");
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

var data = new MultipartFormDataContent();

var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("http://localhost/api/v1/contacts/1/update"),
    Content = data
};
using (var response = await client.SendAsync(request))
{
    //response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}

Request      

PUT api/v1/contacts/{id}/update

Headers

Authorization      

Example: Bearer {YOUR_API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the contact. Example: 1

Delete a contact

requires authentication

This endpoint allows you to delete a contact

Example request:
curl --request DELETE \
    "http://localhost/api/v1/contacts/1" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/contacts/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
import requests
import json

url = 'http://localhost/api/v1/contacts/1'
headers = {
  'Authorization': 'Bearer {YOUR_API_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'http://localhost/api/v1/contacts/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

using System.Net.Http.Headers;

var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "{YOUR_API_KEY}");
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

var data = new MultipartFormDataContent();

var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("http://localhost/api/v1/contacts/1"),
    Content = data
};
using (var response = await client.SendAsync(request))
{
    //response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}

Request      

DELETE api/v1/contacts/{contact_id}

Headers

Authorization      

Example: Bearer {YOUR_API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

contact_id   integer   

The ID of the contact. Example: 1

Email management

APIs for managing emails

Send an email

requires authentication

This endpoint allows you to send an email via HTTP

Example request:
curl --request POST \
    "http://localhost/api/v1/email/send" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "to=vquigley@example.org"\
    --form "from=sydney87@example.org"\
    --form "subject=nostrum"\
    --form "merge_data=["alias","aliquid"]"\
    --form "cc[]=peichmann@example.net"\
    --form "bcc[]=rogelio21@example.net"\
    --form "attachments[]=@/tmp/phpq0napkbtefrp3McWM2z" 
const url = new URL(
    "http://localhost/api/v1/email/send"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('to', 'vquigley@example.org');
body.append('from', 'sydney87@example.org');
body.append('subject', 'nostrum');
body.append('merge_data', '["alias","aliquid"]');
body.append('cc[]', 'peichmann@example.net');
body.append('bcc[]', 'rogelio21@example.net');
body.append('attachments[]', document.querySelector('input[name="attachments[]"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());
import requests
import json

url = 'http://localhost/api/v1/email/send'
files = {
  'to': (None, 'vquigley@example.org'),
  'from': (None, 'sydney87@example.org'),
  'subject': (None, 'nostrum'),
  'merge_data': (None, '["alias","aliquid"]'),
  'cc[]': (None, 'peichmann@example.net'),
  'bcc[]': (None, 'rogelio21@example.net'),
  'attachments[]': open('/tmp/phpq0napkbtefrp3McWM2z', 'rb')}
payload = {
    "to": "vquigley@example.org",
    "from": "sydney87@example.org",
    "subject": "nostrum",
    "merge_data": "[\"alias\",\"aliquid\"]",
    "cc": [
        "peichmann@example.net"
    ],
    "bcc": [
        "rogelio21@example.net"
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_API_KEY}',
  'Content-Type': 'multipart/form-data',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, files=files)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost/api/v1/email/send',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
        ],
        'multipart' => [
            [
                'name' => 'to',
                'contents' => 'vquigley@example.org'
            ],
            [
                'name' => 'from',
                'contents' => 'sydney87@example.org'
            ],
            [
                'name' => 'subject',
                'contents' => 'nostrum'
            ],
            [
                'name' => 'merge_data',
                'contents' => '["alias","aliquid"]'
            ],
            [
                'name' => 'cc[]',
                'contents' => 'peichmann@example.net'
            ],
            [
                'name' => 'bcc[]',
                'contents' => 'rogelio21@example.net'
            ],
            [
                'name' => 'attachments[]',
                'contents' => fopen('/tmp/phpq0napkbtefrp3McWM2z', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

using System.Net.Http.Headers;

var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "{YOUR_API_KEY}");
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

var data = new MultipartFormDataContent();
data.Add(new StringContent("vquigley@example.org"), "to");
data.Add(new StringContent("sydney87@example.org"), "from");
data.Add(new StringContent("nostrum"), "subject");
data.Add(new StringContent("["alias","aliquid"]"), "merge_data");
data.Add(new StringContent("peichmann@example.net"), "cc[]");
data.Add(new StringContent("rogelio21@example.net"), "bcc[]");

var file = new ByteArrayContent(System.IO.File.ReadAllBytes("/tmp/phpq0napkbtefrp3McWM2z"));
data.Add(file, "attachments[]", "test.png");

var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("http://localhost/api/v1/email/send"),
    Content = data
};
using (var response = await client.SendAsync(request))
{
    //response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}

Request      

POST api/v1/email/send

Headers

Authorization      

Example: Bearer {YOUR_API_KEY}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

to   string   

Must be a valid email address. Example: vquigley@example.org

from   string   

Must be a valid email address. Example: sydney87@example.org

subject   string   

Example: nostrum

html   string  optional  
plaintext   string  optional  
message_id   string  optional  
campaign   string  optional  
merge_data   string  optional  

Must be a valid JSON string. Example: ["alias","aliquid"]

cc   string[]  optional  

Must be a valid email address.

bcc   string[]  optional  

Must be a valid email address.

attachments   file[]  optional  

Must be a file.

Endpoints

GET api/v1/lists/{list_id}/subscribers

requires authentication

Example request:
curl --request GET \
    --get "http://localhost/api/v1/lists/1/subscribers?limit=8&order_by=last_name&page=10" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/lists/1/subscribers"
);

const params = {
    "limit": "8",
    "order_by": "last_name",
    "page": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
import requests
import json

url = 'http://localhost/api/v1/lists/1/subscribers'
params = {
  'limit': '8',
  'order_by': 'last_name',
  'page': '10',
}
headers = {
  'Authorization': 'Bearer {YOUR_API_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'http://localhost/api/v1/lists/1/subscribers',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'limit' => '8',
            'order_by' => 'last_name',
            'page' => '10',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

using System.Net.Http.Headers;

var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "{YOUR_API_KEY}");
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("http://localhost/api/v1/lists/1/subscribers?limit=8&order_by=last_name&page=10"),
};
using (var response = await client.SendAsync(request))
{
    //response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/lists/{list_id}/subscribers

Headers

Authorization      

Example: Bearer {YOUR_API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

list_id   integer   

The ID of the list. Example: 1

Query Parameters

limit   integer  optional  

Limit number of records in the search. Example: 8

order_by   string  optional  

Field tag to order the results by. Example: last_name

page   integer  optional  

Page to return results for. Example: 10

Create a new Subscription

requires authentication

This endpoint allows you to create a new subscription

Example request:
curl --request POST \
    "http://localhost/api/v1/lists/1/subscribers?email=okohler%40example.net&contact_id=13&limit=3&order_by=last_name&page=15" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/lists/1/subscribers"
);

const params = {
    "email": "okohler@example.net",
    "contact_id": "13",
    "limit": "3",
    "order_by": "last_name",
    "page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
import requests
import json

url = 'http://localhost/api/v1/lists/1/subscribers'
params = {
  'email': 'okohler@example.net',
  'contact_id': '13',
  'limit': '3',
  'order_by': 'last_name',
  'page': '15',
}
headers = {
  'Authorization': 'Bearer {YOUR_API_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost/api/v1/lists/1/subscribers',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'email' => 'okohler@example.net',
            'contact_id' => '13',
            'limit' => '3',
            'order_by' => 'last_name',
            'page' => '15',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

using System.Net.Http.Headers;

var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "{YOUR_API_KEY}");
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

var data = new MultipartFormDataContent();

var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("http://localhost/api/v1/lists/1/subscribers?email=okohler%40example.net&contact_id=13&limit=3&order_by=last_name&page=15"),
    Content = data
};
using (var response = await client.SendAsync(request))
{
    //response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}

Request      

POST api/v1/lists/{list_id}/subscribers

Headers

Authorization      

Example: Bearer {YOUR_API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

list_id   integer   

The ID of the list. Example: 1

Query Parameters

email   string   

Must be a valid email address. Example: okohler@example.net

contact_id   integer  optional  

Example: 13

limit   integer  optional  

Limit number of records in the search. Example: 3

order_by   string  optional  

Field tag to order the results by. Example: last_name

page   integer  optional  

Page to return results for. Example: 15

PUT api/v1/subscriptions/{id}/update

requires authentication

Example request:
curl --request PUT \
    "http://localhost/api/v1/subscriptions/1/update" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/subscriptions/1/update"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
import requests
import json

url = 'http://localhost/api/v1/subscriptions/1/update'
headers = {
  'Authorization': 'Bearer {YOUR_API_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'http://localhost/api/v1/subscriptions/1/update',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

using System.Net.Http.Headers;

var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "{YOUR_API_KEY}");
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

var data = new MultipartFormDataContent();

var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("http://localhost/api/v1/subscriptions/1/update"),
    Content = data
};
using (var response = await client.SendAsync(request))
{
    //response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}

Request      

PUT api/v1/subscriptions/{id}/update

Headers

Authorization      

Example: Bearer {YOUR_API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the subscription. Example: 1

GET api/public/token

requires authentication

Example request:
curl --request GET \
    --get "http://localhost/api/public/token" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/public/token"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
import requests
import json

url = 'http://localhost/api/public/token'
headers = {
  'Authorization': 'Bearer {YOUR_API_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'http://localhost/api/public/token',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

using System.Net.Http.Headers;

var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "{YOUR_API_KEY}");
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("http://localhost/api/public/token"),
};
using (var response = await client.SendAsync(request))
{
    //response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: XSRF-TOKEN=eyJpdiI6IlZaODRXMk15SFF2VVMvcjhKekVROHc9PSIsInZhbHVlIjoiaHFuTkNwRlZscXlvaEhrZVJabEtNaFIrK3NQdk9wbjBGZjBKS09iYUhJaTlkOWRBQVZmNWIyRXZoK2Y3RU9mbDVEeXFyMWpsTm9tQ0FuRWRFeDFDdDBUMnZPUEQ4YmpFK0FMcXpNYzJObG5BSG5UejZ2R1Q3b09EcHFLc285T0QiLCJtYWMiOiIwMDFkYWM2NDBjM2Q2NWNkOWE2Mzc5N2UwYmUyY2FjMTBiZGUxN2IzMDBkNWIwNTY2NTczY2JjNTlmYTYwYjFhIiwidGFnIjoiIn0%3D; expires=Mon, 28 Jul 2025 17:20:03 GMT; Max-Age=7200; path=/; samesite=lax; sally_jo_session=eyJpdiI6Iko0WDVRbWp5ZUExUFd5OUgyN3JVQUE9PSIsInZhbHVlIjoiU0hQMzRUREo3dnZ5bXBYbUNxWnZzUWxIbExFdWtmREtBY01XcklZbWhzZFljM2pKRnBYbWJBTFk5elJhUjZpMy9nbFhheGFmWFZjY0N5L01zVVlzalAvd0Zab3c2T0c4Smo5TkEzblNxMWd2SC9yd0FzZ0VFN1VpRGpLQ09VZVIiLCJtYWMiOiJlMDRiMjE3YmIxY2RiMDJiNjk2NDVjYTIwZDZkZjIwOTA1ZTNiYzU1MzRkYzNkMjA4MTkzZGI3OGVlNGVkZjZiIiwidGFnIjoiIn0%3D; expires=Mon, 28 Jul 2025 17:20:03 GMT; Max-Age=7200; path=/; httponly; samesite=lax
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/public/token

Headers

Authorization      

Example: Bearer {YOUR_API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Link management

APIs for managing emails

requires authentication

This endpoint allows you to create a new short link

Example request:
curl --request POST \
    "http://localhost/api/v1/links/create" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"destination_url\": \"https:\\/\\/zemlak.org\\/et-voluptatum-molestiae-hic-consequuntur-quia-sit.html\"
}"
const url = new URL(
    "http://localhost/api/v1/links/create"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "destination_url": "https:\/\/zemlak.org\/et-voluptatum-molestiae-hic-consequuntur-quia-sit.html"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json

url = 'http://localhost/api/v1/links/create'
payload = {
    "destination_url": "https:\/\/zemlak.org\/et-voluptatum-molestiae-hic-consequuntur-quia-sit.html"
}
headers = {
  'Authorization': 'Bearer {YOUR_API_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost/api/v1/links/create',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'destination_url' => 'https://zemlak.org/et-voluptatum-molestiae-hic-consequuntur-quia-sit.html',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

using System.Net.Http.Headers;

var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "{YOUR_API_KEY}");
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

var data = new MultipartFormDataContent();
data.Add(new StringContent("https://zemlak.org/et-voluptatum-molestiae-hic-consequuntur-quia-sit.html"), "destination_url");

var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("http://localhost/api/v1/links/create"),
    Content = data
};
using (var response = await client.SendAsync(request))
{
    //response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}

SMS List management

APIs for managing SMS lists and subscriptions

Get SMS list subscribers

requires authentication

This endpoint allows you to get subscribers for an SMS list

Example request:
curl --request GET \
    --get "http://localhost/api/v1/sms/lists/1/subscribers" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/sms/lists/1/subscribers"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
import requests
import json

url = 'http://localhost/api/v1/sms/lists/1/subscribers'
headers = {
  'Authorization': 'Bearer {YOUR_API_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'http://localhost/api/v1/sms/lists/1/subscribers',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

using System.Net.Http.Headers;

var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "{YOUR_API_KEY}");
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("http://localhost/api/v1/sms/lists/1/subscribers"),
};
using (var response = await client.SendAsync(request))
{
    //response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/sms/lists/{list_id}/subscribers

Headers

Authorization      

Example: Bearer {YOUR_API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

list_id   integer   

The ID of the list. Example: 1

SMS management

APIs for managing text messages

Send an SMS message

requires authentication

This endpoint allows you to send an SMS message via HTTP

Example request:
curl --request POST \
    "http://localhost/api/v1/sms/send" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"to\": \"quis\",
    \"from\": \"repellendus\",
    \"message\": \"quos\"
}"
const url = new URL(
    "http://localhost/api/v1/sms/send"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "to": "quis",
    "from": "repellendus",
    "message": "quos"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json

url = 'http://localhost/api/v1/sms/send'
payload = {
    "to": "quis",
    "from": "repellendus",
    "message": "quos"
}
headers = {
  'Authorization': 'Bearer {YOUR_API_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost/api/v1/sms/send',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'to' => 'quis',
            'from' => 'repellendus',
            'message' => 'quos',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

using System.Net.Http.Headers;

var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "{YOUR_API_KEY}");
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

var data = new MultipartFormDataContent();
data.Add(new StringContent("quis"), "to");
data.Add(new StringContent("repellendus"), "from");
data.Add(new StringContent("quos"), "message");

var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("http://localhost/api/v1/sms/send"),
    Content = data
};
using (var response = await client.SendAsync(request))
{
    //response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}

Request      

POST api/v1/sms/send

Headers

Authorization      

Example: Bearer {YOUR_API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

to   string   

Example: quis

from   string   

Example: repellendus

message   string   

Example: quos

Team management

APIs for managing teams

GET api/v1/team

requires authentication

Example request:
curl --request GET \
    --get "http://localhost/api/v1/team" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/team"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
import requests
import json

url = 'http://localhost/api/v1/team'
headers = {
  'Authorization': 'Bearer {YOUR_API_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'http://localhost/api/v1/team',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

using System.Net.Http.Headers;

var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "{YOUR_API_KEY}");
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("http://localhost/api/v1/team"),
};
using (var response = await client.SendAsync(request))
{
    //response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/v1/team

Headers

Authorization      

Example: Bearer {YOUR_API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json