cURL
curl -X GET 'https://api.nuntly.com/messages' \
-H 'Authorization: Bearer apk_xxx'import { Nuntly } from '@nuntly/sdk';
const client = new Nuntly({
apiKey: process.env['NUNTLY_API_KEY'],
});
const response = await client.messages.list();import com.nuntly.sdk.Nuntly;
import com.nuntly.sdk.ClientOptions;
var nuntly = Nuntly.create(ClientOptions.builder()
.apiKey(System.getenv("NUNTLY_API_KEY"))
.build());
var response = nuntly.messages().list();import requests
url = "https://api.nuntly.com/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nuntly.com/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nuntly.com/messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.nuntly.com/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"createdAt": "<string>",
"inboxId": "<string>",
"threadId": "<string>",
"messageId": "<string>",
"from": "<string>",
"to": [
"<string>"
],
"cc": "carlo43@gmail.com",
"bcc": "archive@company.com",
"replyTo": "support@company.com",
"subject": "<string>",
"receivedAt": "<string>",
"labels": [
"<string>"
],
"attachmentCount": 123
}
],
"nextCursor": "<string>"
}{
"error": {
"status": 123,
"code": "<string>",
"title": "<string>",
"details": {}
}
}Messages
List Messages
List all received messages across inboxes.
GET
/
messages
cURL
curl -X GET 'https://api.nuntly.com/messages' \
-H 'Authorization: Bearer apk_xxx'import { Nuntly } from '@nuntly/sdk';
const client = new Nuntly({
apiKey: process.env['NUNTLY_API_KEY'],
});
const response = await client.messages.list();import com.nuntly.sdk.Nuntly;
import com.nuntly.sdk.ClientOptions;
var nuntly = Nuntly.create(ClientOptions.builder()
.apiKey(System.getenv("NUNTLY_API_KEY"))
.build());
var response = nuntly.messages().list();import requests
url = "https://api.nuntly.com/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nuntly.com/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nuntly.com/messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.nuntly.com/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"createdAt": "<string>",
"inboxId": "<string>",
"threadId": "<string>",
"messageId": "<string>",
"from": "<string>",
"to": [
"<string>"
],
"cc": "carlo43@gmail.com",
"bcc": "archive@company.com",
"replyTo": "support@company.com",
"subject": "<string>",
"receivedAt": "<string>",
"labels": [
"<string>"
],
"attachmentCount": 123
}
],
"nextCursor": "<string>"
}{
"error": {
"status": 123,
"code": "<string>",
"title": "<string>",
"details": {}
}
}Authorizations
Use an API key from https://nuntly.com/api-keys. Required on every endpoint.
Query Parameters
Pagination cursor from a previous response
Maximum number of items to return
Required range:
1 <= x <= 30Filter by domain.
Filter by sender address.
⌘I
