List subscribed newsletters
curl --request GET \
--url https://api.wsapi.chat/newsletters \
--header 'X-Api-Key: <api-key>' \
--header 'X-Instance-Id: <x-instance-id>'import requests
url = "https://api.wsapi.chat/newsletters"
headers = {
"X-Instance-Id": "<x-instance-id>",
"X-Api-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Instance-Id': '<x-instance-id>', 'X-Api-Key': '<api-key>'}
};
fetch('https://api.wsapi.chat/newsletters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));using RestSharp;
var options = new RestClientOptions("https://api.wsapi.chat/newsletters");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Instance-Id", "<x-instance-id>");
request.AddHeader("X-Api-Key", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
[
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"subscriberCount": 123,
"verificationState": "<string>",
"pictureUrl": "<string>",
"inviteCode": "<string>",
"role": "<string>",
"mute": "<string>",
"state": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
]{
"status": 400,
"detail": "invalid request body"
}{
"status": 401,
"detail": "unauthorized"
}{
"status": 403,
"detail": "device not paired"
}{
"status": 503,
"detail": "instance not available"
}Newsletters
List subscribed newsletters
Returns all newsletters the current user is subscribed to.
GET
/
newsletters
List subscribed newsletters
curl --request GET \
--url https://api.wsapi.chat/newsletters \
--header 'X-Api-Key: <api-key>' \
--header 'X-Instance-Id: <x-instance-id>'import requests
url = "https://api.wsapi.chat/newsletters"
headers = {
"X-Instance-Id": "<x-instance-id>",
"X-Api-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Instance-Id': '<x-instance-id>', 'X-Api-Key': '<api-key>'}
};
fetch('https://api.wsapi.chat/newsletters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));using RestSharp;
var options = new RestClientOptions("https://api.wsapi.chat/newsletters");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Instance-Id", "<x-instance-id>");
request.AddHeader("X-Api-Key", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
[
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"subscriberCount": 123,
"verificationState": "<string>",
"pictureUrl": "<string>",
"inviteCode": "<string>",
"role": "<string>",
"mute": "<string>",
"state": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
]{
"status": 400,
"detail": "invalid request body"
}{
"status": 401,
"detail": "unauthorized"
}{
"status": 403,
"detail": "device not paired"
}{
"status": 503,
"detail": "instance not available"
}Authorizations
Instance or customer-level API key. Either the instance's own API key or the customer's API key is accepted. Must be paired with the X-Instance-Id header to identify the target instance.
Headers
The ID of the WhatsApp instance to use
Response
List of newsletters
Newsletter JID
Newsletter name
Newsletter description
Number of subscribers
Verification state of the newsletter
Profile picture URL
Invite code for the newsletter
Current user's role in the newsletter
Mute state for the current user
Newsletter state
Creation timestamp
⌘I