curl --request GET \
--url https://api.nylon.dev/v1/inbox/conversations \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nylon.dev/v1/inbox/conversations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.nylon.dev/v1/inbox/conversations"
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.nylon.dev/v1/inbox/conversations",
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;
}require 'uri'
require 'net/http'
url = URI("https://api.nylon.dev/v1/inbox/conversations")
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>",
"profile_id": "<string>",
"network": "instagram",
"kind": "dm",
"status": "open",
"unread_count": 123,
"last_message": {
"text": "<string>",
"at": "2023-11-07T05:31:56Z"
},
"profile_external_id": "102938475610111",
"external_id": "<string>",
"participant": {
"id": "<string>",
"name": "<string>",
"handle": "<string>",
"avatar_url": "<string>"
},
"url": "<string>",
"referral": {},
"created_at": "2023-11-07T05:31:56Z"
}
],
"meta": {
"pagination": {
"limit": 25,
"has_more": true,
"next_cursor": "<string>"
}
}
}{
"error": {
"code": "unauthorized",
"message": "A valid Nylon API key is required."
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests. Retry after the window resets."
}
}{
"error": {
"code": "unauthorized",
"message": "A valid Nylon API key is required.",
"details": [
{
"message": "Instagram requires at least 1 media item — text-only posts are not supported.",
"field": "profile_ids",
"network": "instagram",
"code": "invalid_request"
}
]
}
}List conversations
Threads across every connected account, newest activity first.
curl --request GET \
--url https://api.nylon.dev/v1/inbox/conversations \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nylon.dev/v1/inbox/conversations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.nylon.dev/v1/inbox/conversations"
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.nylon.dev/v1/inbox/conversations",
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;
}require 'uri'
require 'net/http'
url = URI("https://api.nylon.dev/v1/inbox/conversations")
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>",
"profile_id": "<string>",
"network": "instagram",
"kind": "dm",
"status": "open",
"unread_count": 123,
"last_message": {
"text": "<string>",
"at": "2023-11-07T05:31:56Z"
},
"profile_external_id": "102938475610111",
"external_id": "<string>",
"participant": {
"id": "<string>",
"name": "<string>",
"handle": "<string>",
"avatar_url": "<string>"
},
"url": "<string>",
"referral": {},
"created_at": "2023-11-07T05:31:56Z"
}
],
"meta": {
"pagination": {
"limit": 25,
"has_more": true,
"next_cursor": "<string>"
}
}
}{
"error": {
"code": "unauthorized",
"message": "A valid Nylon API key is required."
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests. Retry after the window resets."
}
}{
"error": {
"code": "unauthorized",
"message": "A valid Nylon API key is required.",
"details": [
{
"message": "Instagram requires at least 1 media item — text-only posts are not supported.",
"field": "profile_ids",
"network": "instagram",
"code": "invalid_request"
}
]
}
}Authorizations
An API key beginning with nylon_live_.
Query Parameters
1 <= x <= 100From a previous response's meta.pagination.next_cursor.
Comma-separated networks.
"instagram"
Comma-separated thread kinds.
"dm"
open, closed Only conversations with unread messages.
Response
The conversations.
Hide child attributes
Hide child attributes
The connected account this thread is on.
A network Nylon publishes to.
facebook, instagram, x, linkedin, pinterest, bluesky, threads, tiktok, youtube, google_business, mastodon, discord, dribbble, kick, twitch, whop, devto "instagram"
A comment thread is public; a dm is not.
dm, comment, mention open, closed Cleared only by POST .../read, never by reading the messages.
That account's id on the network itself — a Page id, an Instagram account id — so a thread can be matched to an account without a second call.
"102938475610111"
The thread's id on the network.
Where to open this on the network itself.
How the conversation started, when the network says so — an ad, a ref link, a post.