SDK Code Examples — WhatsAppInboxController (Conversations) / WhatsAppInboxController (Messaging & Media)
Base URL: https://{tenant}.shumoul.app · Token variable: $TOKEN (bash) / %TOKEN% (cmd) / token (JS/C#/Dart), obtained per §19 SDK Usage Guide.
Conversations
1. POST /api/v1/whatsapp/inbox/GetConversations
Permission: WhatsAppInbox.View
cURL — Linux/macOS:
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/GetConversations?status=Open&onlyUnread=false&showArchived=false" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"draw":1,"start":0,"length":25,"search":{"value":"","regex":false},"order":[{"column":0,"dir":"desc"}],"columns":[{"data":"lastMessageAt","name":"","searchable":true,"orderable":true}]}'
cURL — Windows (cmd.exe):
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/GetConversations?status=Open&onlyUnread=false&showArchived=false" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json" ^
-d "{\"draw\":1,\"start\":0,\"length\":25,\"search\":{\"value\":\"\",\"regex\":false},\"order\":[{\"column\":0,\"dir\":\"desc\"}],\"columns\":[{\"data\":\"lastMessageAt\",\"name\":\"\",\"searchable\":true,\"orderable\":true}]}"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/GetConversations?status=Open&onlyUnread=false&showArchived=false", {
method: "POST",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" },
body: JSON.stringify({
"draw": 1,
"start": 0,
"length": 25,
"search": {
"value": "",
"regex": false
},
"order": [
{
"column": 0,
"dir": "desc"
}
],
"columns": [
{
"data": "lastMessageAt",
"name": "",
"searchable": true,
"orderable": true
}
]
})
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.post(
"https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/GetConversations?status=Open&onlyUnread=false&showArchived=false",
{
"draw": 1,
"start": 0,
"length": 25,
"search": {
"value": "",
"regex": false
},
"order": [
{
"column": 0,
"dir": "desc"
}
],
"columns": [
{
"data": "lastMessageAt",
"name": "",
"searchable": true,
"orderable": true
}
]
},
{ headers: { Authorization: `Bearer ${token}` } }
);
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var payload = new { draw = 1, start = 0, length = 25, search = new { value = "", regex = false }, order = new[] { new { column = 0, dir = "desc" } }, columns = new[] { new { data = "lastMessageAt", name = "", searchable = true, orderable = true } } };
var response = await client.PostAsJsonAsync("/api/v1/whatsapp/inbox/GetConversations?status=Open&onlyUnread=false&showArchived=false", payload);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.post(
"/api/v1/whatsapp/inbox/GetConversations?status=Open&onlyUnread=false&showArchived=false",
data: {
"draw": 1,
"start": 0,
"length": 25,
"search": {
"value": "",
"regex": false
},
"order": [
{
"column": 0,
"dir": "desc"
}
],
"columns": [
{
"data": "lastMessageAt",
"name": "",
"searchable": true,
"orderable": true
}
]
},
options: Options(headers: {"Authorization": "Bearer $token"}),
);
2. GET /api/v1/whatsapp/inbox/GetDetails/{conversationId}
Permission: WhatsAppInbox.View
cURL — Linux/macOS:
curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/GetDetails/c1a2b3c4-0000-0000-0000-000000000001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
cURL — Windows (cmd.exe):
curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/GetDetails/c1a2b3c4-0000-0000-0000-000000000001" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/GetDetails/c1a2b3c4-0000-0000-0000-000000000001", {
method: "GET",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" }
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.get("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/GetDetails/c1a2b3c4-0000-0000-0000-000000000001", { headers: { Authorization: `Bearer ${token}` } });
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.GetAsync("/api/v1/whatsapp/inbox/GetDetails/c1a2b3c4-0000-0000-0000-000000000001");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.get(
"/api/v1/whatsapp/inbox/GetDetails/c1a2b3c4-0000-0000-0000-000000000001",
options: Options(headers: {"Authorization": "Bearer $token"}),
);
3. POST /api/v1/whatsapp/inbox/Assign/{conversationId}
Permission: WhatsAppInbox.Assign
cURL — Linux/macOS:
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Assign/c1a2b3c4-0000-0000-0000-000000000001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"userId":"5f1a3b2c-0000-0000-0000-000000000001"}'
cURL — Windows (cmd.exe):
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Assign/c1a2b3c4-0000-0000-0000-000000000001" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json" ^
-d "{\"userId\":\"5f1a3b2c-0000-0000-0000-000000000001\"}"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Assign/c1a2b3c4-0000-0000-0000-000000000001", {
method: "POST",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" },
body: JSON.stringify({
"userId": "5f1a3b2c-0000-0000-0000-000000000001"
})
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.post(
"https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Assign/c1a2b3c4-0000-0000-0000-000000000001",
{
"userId": "5f1a3b2c-0000-0000-0000-000000000001"
},
{ headers: { Authorization: `Bearer ${token}` } }
);
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var payload = new { userId = "5f1a3b2c-0000-0000-0000-000000000001" };
var response = await client.PostAsJsonAsync("/api/v1/whatsapp/inbox/Assign/c1a2b3c4-0000-0000-0000-000000000001", payload);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.post(
"/api/v1/whatsapp/inbox/Assign/c1a2b3c4-0000-0000-0000-000000000001",
data: {
"userId": "5f1a3b2c-0000-0000-0000-000000000001"
},
options: Options(headers: {"Authorization": "Bearer $token"}),
);
4. POST /api/v1/whatsapp/inbox/Unassign/{conversationId}
Permission: WhatsAppInbox.Assign
cURL — Linux/macOS:
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Unassign/c1a2b3c4-0000-0000-0000-000000000001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
cURL — Windows (cmd.exe):
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Unassign/c1a2b3c4-0000-0000-0000-000000000001" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Unassign/c1a2b3c4-0000-0000-0000-000000000001", {
method: "POST",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" }
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.post("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Unassign/c1a2b3c4-0000-0000-0000-000000000001", { headers: { Authorization: `Bearer ${token}` } });
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.PostAsync("/api/v1/whatsapp/inbox/Unassign/c1a2b3c4-0000-0000-0000-000000000001");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.post(
"/api/v1/whatsapp/inbox/Unassign/c1a2b3c4-0000-0000-0000-000000000001",
options: Options(headers: {"Authorization": "Bearer $token"}),
);
5. POST /api/v1/whatsapp/inbox/Transfer/{conversationId}
Permission: WhatsAppInbox.Transfer
cURL — Linux/macOS:
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Transfer/c1a2b3c4-0000-0000-0000-000000000001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"targetUserId":"5f1a3b2c-0000-0000-0000-000000000002","comment":"Escalating — customer requesting refund"}'
cURL — Windows (cmd.exe):
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Transfer/c1a2b3c4-0000-0000-0000-000000000001" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json" ^
-d "{\"targetUserId\":\"5f1a3b2c-0000-0000-0000-000000000002\",\"comment\":\"Escalating — customer requesting refund\"}"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Transfer/c1a2b3c4-0000-0000-0000-000000000001", {
method: "POST",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" },
body: JSON.stringify({
"targetUserId": "5f1a3b2c-0000-0000-0000-000000000002",
"comment": "Escalating — customer requesting refund"
})
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.post(
"https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Transfer/c1a2b3c4-0000-0000-0000-000000000001",
{
"targetUserId": "5f1a3b2c-0000-0000-0000-000000000002",
"comment": "Escalating — customer requesting refund"
},
{ headers: { Authorization: `Bearer ${token}` } }
);
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var payload = new { targetUserId = "5f1a3b2c-0000-0000-0000-000000000002", comment = "Escalating — customer requesting refund" };
var response = await client.PostAsJsonAsync("/api/v1/whatsapp/inbox/Transfer/c1a2b3c4-0000-0000-0000-000000000001", payload);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.post(
"/api/v1/whatsapp/inbox/Transfer/c1a2b3c4-0000-0000-0000-000000000001",
data: {
"targetUserId": "5f1a3b2c-0000-0000-0000-000000000002",
"comment": "Escalating — customer requesting refund"
},
options: Options(headers: {"Authorization": "Bearer $token"}),
);
6. POST /api/v1/whatsapp/inbox/MarkAsRead/{conversationId}
Permission: WhatsAppInbox.View
cURL — Linux/macOS:
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/MarkAsRead/c1a2b3c4-0000-0000-0000-000000000001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
cURL — Windows (cmd.exe):
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/MarkAsRead/c1a2b3c4-0000-0000-0000-000000000001" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/MarkAsRead/c1a2b3c4-0000-0000-0000-000000000001", {
method: "POST",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" }
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.post("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/MarkAsRead/c1a2b3c4-0000-0000-0000-000000000001", { headers: { Authorization: `Bearer ${token}` } });
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.PostAsync("/api/v1/whatsapp/inbox/MarkAsRead/c1a2b3c4-0000-0000-0000-000000000001");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.post(
"/api/v1/whatsapp/inbox/MarkAsRead/c1a2b3c4-0000-0000-0000-000000000001",
options: Options(headers: {"Authorization": "Bearer $token"}),
);
7. POST /api/v1/whatsapp/inbox/MarkAsUnread/{conversationId}
Permission: WhatsAppInbox.View
cURL — Linux/macOS:
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/MarkAsUnread/c1a2b3c4-0000-0000-0000-000000000001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
cURL — Windows (cmd.exe):
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/MarkAsUnread/c1a2b3c4-0000-0000-0000-000000000001" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/MarkAsUnread/c1a2b3c4-0000-0000-0000-000000000001", {
method: "POST",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" }
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.post("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/MarkAsUnread/c1a2b3c4-0000-0000-0000-000000000001", { headers: { Authorization: `Bearer ${token}` } });
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.PostAsync("/api/v1/whatsapp/inbox/MarkAsUnread/c1a2b3c4-0000-0000-0000-000000000001");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.post(
"/api/v1/whatsapp/inbox/MarkAsUnread/c1a2b3c4-0000-0000-0000-000000000001",
options: Options(headers: {"Authorization": "Bearer $token"}),
);
8. POST /api/v1/whatsapp/inbox/Close/{conversationId}
Permission: WhatsAppInbox.Close
cURL — Linux/macOS:
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Close/c1a2b3c4-0000-0000-0000-000000000001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"reason":"Resolved — refund processed"}'
cURL — Windows (cmd.exe):
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Close/c1a2b3c4-0000-0000-0000-000000000001" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json" ^
-d "{\"reason\":\"Resolved — refund processed\"}"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Close/c1a2b3c4-0000-0000-0000-000000000001", {
method: "POST",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" },
body: JSON.stringify({
"reason": "Resolved — refund processed"
})
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.post(
"https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Close/c1a2b3c4-0000-0000-0000-000000000001",
{
"reason": "Resolved — refund processed"
},
{ headers: { Authorization: `Bearer ${token}` } }
);
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var payload = new { reason = "Resolved — refund processed" };
var response = await client.PostAsJsonAsync("/api/v1/whatsapp/inbox/Close/c1a2b3c4-0000-0000-0000-000000000001", payload);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.post(
"/api/v1/whatsapp/inbox/Close/c1a2b3c4-0000-0000-0000-000000000001",
data: {
"reason": "Resolved — refund processed"
},
options: Options(headers: {"Authorization": "Bearer $token"}),
);
9. POST /api/v1/whatsapp/inbox/Reopen/{conversationId}
Permission: WhatsAppInbox.Close
cURL — Linux/macOS:
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Reopen/c1a2b3c4-0000-0000-0000-000000000001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
cURL — Windows (cmd.exe):
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Reopen/c1a2b3c4-0000-0000-0000-000000000001" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Reopen/c1a2b3c4-0000-0000-0000-000000000001", {
method: "POST",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" }
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.post("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Reopen/c1a2b3c4-0000-0000-0000-000000000001", { headers: { Authorization: `Bearer ${token}` } });
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.PostAsync("/api/v1/whatsapp/inbox/Reopen/c1a2b3c4-0000-0000-0000-000000000001");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.post(
"/api/v1/whatsapp/inbox/Reopen/c1a2b3c4-0000-0000-0000-000000000001",
options: Options(headers: {"Authorization": "Bearer $token"}),
);
10. POST /api/v1/whatsapp/inbox/Archive/{conversationId}
Permission: WhatsAppInbox.Archive
cURL — Linux/macOS:
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Archive/c1a2b3c4-0000-0000-0000-000000000001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
cURL — Windows (cmd.exe):
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Archive/c1a2b3c4-0000-0000-0000-000000000001" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Archive/c1a2b3c4-0000-0000-0000-000000000001", {
method: "POST",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" }
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.post("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Archive/c1a2b3c4-0000-0000-0000-000000000001", { headers: { Authorization: `Bearer ${token}` } });
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.PostAsync("/api/v1/whatsapp/inbox/Archive/c1a2b3c4-0000-0000-0000-000000000001");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.post(
"/api/v1/whatsapp/inbox/Archive/c1a2b3c4-0000-0000-0000-000000000001",
options: Options(headers: {"Authorization": "Bearer $token"}),
);
11. POST /api/v1/whatsapp/inbox/Unarchive/{conversationId}
Permission: WhatsAppInbox.Archive
cURL — Linux/macOS:
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Unarchive/c1a2b3c4-0000-0000-0000-000000000001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
cURL — Windows (cmd.exe):
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Unarchive/c1a2b3c4-0000-0000-0000-000000000001" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Unarchive/c1a2b3c4-0000-0000-0000-000000000001", {
method: "POST",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" }
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.post("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Unarchive/c1a2b3c4-0000-0000-0000-000000000001", { headers: { Authorization: `Bearer ${token}` } });
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.PostAsync("/api/v1/whatsapp/inbox/Unarchive/c1a2b3c4-0000-0000-0000-000000000001");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.post(
"/api/v1/whatsapp/inbox/Unarchive/c1a2b3c4-0000-0000-0000-000000000001",
options: Options(headers: {"Authorization": "Bearer $token"}),
);
12. POST /api/v1/whatsapp/inbox/Pin/{conversationId}
Permission: WhatsAppInbox.Pin
cURL — Linux/macOS:
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Pin/c1a2b3c4-0000-0000-0000-000000000001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
cURL — Windows (cmd.exe):
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Pin/c1a2b3c4-0000-0000-0000-000000000001" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Pin/c1a2b3c4-0000-0000-0000-000000000001", {
method: "POST",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" }
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.post("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Pin/c1a2b3c4-0000-0000-0000-000000000001", { headers: { Authorization: `Bearer ${token}` } });
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.PostAsync("/api/v1/whatsapp/inbox/Pin/c1a2b3c4-0000-0000-0000-000000000001");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.post(
"/api/v1/whatsapp/inbox/Pin/c1a2b3c4-0000-0000-0000-000000000001",
options: Options(headers: {"Authorization": "Bearer $token"}),
);
13. POST /api/v1/whatsapp/inbox/Unpin/{conversationId}
Permission: WhatsAppInbox.Pin
cURL — Linux/macOS:
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Unpin/c1a2b3c4-0000-0000-0000-000000000001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
cURL — Windows (cmd.exe):
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Unpin/c1a2b3c4-0000-0000-0000-000000000001" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Unpin/c1a2b3c4-0000-0000-0000-000000000001", {
method: "POST",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" }
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.post("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Unpin/c1a2b3c4-0000-0000-0000-000000000001", { headers: { Authorization: `Bearer ${token}` } });
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.PostAsync("/api/v1/whatsapp/inbox/Unpin/c1a2b3c4-0000-0000-0000-000000000001");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.post(
"/api/v1/whatsapp/inbox/Unpin/c1a2b3c4-0000-0000-0000-000000000001",
options: Options(headers: {"Authorization": "Bearer $token"}),
);
14. POST /api/v1/whatsapp/inbox/Favorite/{conversationId}
Permission: WhatsAppInbox.Favorite
cURL — Linux/macOS:
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Favorite/c1a2b3c4-0000-0000-0000-000000000001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
cURL — Windows (cmd.exe):
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Favorite/c1a2b3c4-0000-0000-0000-000000000001" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Favorite/c1a2b3c4-0000-0000-0000-000000000001", {
method: "POST",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" }
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.post("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Favorite/c1a2b3c4-0000-0000-0000-000000000001", { headers: { Authorization: `Bearer ${token}` } });
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.PostAsync("/api/v1/whatsapp/inbox/Favorite/c1a2b3c4-0000-0000-0000-000000000001");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.post(
"/api/v1/whatsapp/inbox/Favorite/c1a2b3c4-0000-0000-0000-000000000001",
options: Options(headers: {"Authorization": "Bearer $token"}),
);
15. POST /api/v1/whatsapp/inbox/Unfavorite/{conversationId}
Permission: WhatsAppInbox.Favorite
cURL — Linux/macOS:
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Unfavorite/c1a2b3c4-0000-0000-0000-000000000001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
cURL — Windows (cmd.exe):
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Unfavorite/c1a2b3c4-0000-0000-0000-000000000001" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Unfavorite/c1a2b3c4-0000-0000-0000-000000000001", {
method: "POST",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" }
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.post("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Unfavorite/c1a2b3c4-0000-0000-0000-000000000001", { headers: { Authorization: `Bearer ${token}` } });
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.PostAsync("/api/v1/whatsapp/inbox/Unfavorite/c1a2b3c4-0000-0000-0000-000000000001");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.post(
"/api/v1/whatsapp/inbox/Unfavorite/c1a2b3c4-0000-0000-0000-000000000001",
options: Options(headers: {"Authorization": "Bearer $token"}),
);
16. GET /api/v1/whatsapp/inbox/Favorites
Permission: WhatsAppInbox.Favorite
cURL — Linux/macOS:
curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Favorites" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
cURL — Windows (cmd.exe):
curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Favorites" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Favorites", {
method: "GET",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" }
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.get("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Favorites", { headers: { Authorization: `Bearer ${token}` } });
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.GetAsync("/api/v1/whatsapp/inbox/Favorites");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.get(
"/api/v1/whatsapp/inbox/Favorites",
options: Options(headers: {"Authorization": "Bearer $token"}),
);
17. GET /api/v1/whatsapp/inbox/ReadState/{conversationId}
Permission: WhatsAppInbox.View
cURL — Linux/macOS:
curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/ReadState/c1a2b3c4-0000-0000-0000-000000000001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
cURL — Windows (cmd.exe):
curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/ReadState/c1a2b3c4-0000-0000-0000-000000000001" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/ReadState/c1a2b3c4-0000-0000-0000-000000000001", {
method: "GET",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" }
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.get("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/ReadState/c1a2b3c4-0000-0000-0000-000000000001", { headers: { Authorization: `Bearer ${token}` } });
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.GetAsync("/api/v1/whatsapp/inbox/ReadState/c1a2b3c4-0000-0000-0000-000000000001");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.get(
"/api/v1/whatsapp/inbox/ReadState/c1a2b3c4-0000-0000-0000-000000000001",
options: Options(headers: {"Authorization": "Bearer $token"}),
);
18. GET /api/v1/whatsapp/inbox/CustomerProfile/{customerWaId}
Permission: WhatsAppInbox.CustomerProfile
cURL — Linux/macOS:
curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/CustomerProfile/966501112222" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
cURL — Windows (cmd.exe):
curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/CustomerProfile/966501112222" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/CustomerProfile/966501112222", {
method: "GET",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" }
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.get("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/CustomerProfile/966501112222", { headers: { Authorization: `Bearer ${token}` } });
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.GetAsync("/api/v1/whatsapp/inbox/CustomerProfile/966501112222");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.get(
"/api/v1/whatsapp/inbox/CustomerProfile/966501112222",
options: Options(headers: {"Authorization": "Bearer $token"}),
);
19. GET /api/v1/whatsapp/inbox/Export/{conversationId}/json
Permission: WhatsAppInbox.Export
cURL — Linux/macOS:
curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Export/c1a2b3c4-0000-0000-0000-000000000001/json" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
cURL — Windows (cmd.exe):
curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Export/c1a2b3c4-0000-0000-0000-000000000001/json" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Export/c1a2b3c4-0000-0000-0000-000000000001/json", {
method: "GET",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" }
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.get("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Export/c1a2b3c4-0000-0000-0000-000000000001/json", { headers: { Authorization: `Bearer ${token}` } });
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.GetAsync("/api/v1/whatsapp/inbox/Export/c1a2b3c4-0000-0000-0000-000000000001/json");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.get(
"/api/v1/whatsapp/inbox/Export/c1a2b3c4-0000-0000-0000-000000000001/json",
options: Options(headers: {"Authorization": "Bearer $token"}),
);
20. GET /api/v1/whatsapp/inbox/Export/{conversationId}/text
Permission: WhatsAppInbox.Export
cURL — Linux/macOS:
curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Export/c1a2b3c4-0000-0000-0000-000000000001/text" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
cURL — Windows (cmd.exe):
curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Export/c1a2b3c4-0000-0000-0000-000000000001/text" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Export/c1a2b3c4-0000-0000-0000-000000000001/text", {
method: "GET",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" }
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.get("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Export/c1a2b3c4-0000-0000-0000-000000000001/text", { headers: { Authorization: `Bearer ${token}` } });
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.GetAsync("/api/v1/whatsapp/inbox/Export/c1a2b3c4-0000-0000-0000-000000000001/text");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.get(
"/api/v1/whatsapp/inbox/Export/c1a2b3c4-0000-0000-0000-000000000001/text",
options: Options(headers: {"Authorization": "Bearer $token"}),
);
21. GET /api/v1/whatsapp/inbox/UnreadCount
Permission: WhatsAppInbox.View
cURL — Linux/macOS:
curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/UnreadCount" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
cURL — Windows (cmd.exe):
curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/UnreadCount" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/UnreadCount", {
method: "GET",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" }
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.get("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/UnreadCount", { headers: { Authorization: `Bearer ${token}` } });
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.GetAsync("/api/v1/whatsapp/inbox/UnreadCount");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.get(
"/api/v1/whatsapp/inbox/UnreadCount",
options: Options(headers: {"Authorization": "Bearer $token"}),
);
22. GET /api/v1/whatsapp/inbox/Summary
Permission: WhatsAppInbox.View
cURL — Linux/macOS:
curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Summary" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
cURL — Windows (cmd.exe):
curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Summary" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Summary", {
method: "GET",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" }
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.get("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Summary", { headers: { Authorization: `Bearer ${token}` } });
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.GetAsync("/api/v1/whatsapp/inbox/Summary");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.get(
"/api/v1/whatsapp/inbox/Summary",
options: Options(headers: {"Authorization": "Bearer $token"}),
);
Inbox
23. GET /api/v1/whatsapp/inbox/Dashboard
Permission: WhatsAppInbox.View
cURL — Linux/macOS:
curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Dashboard" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
cURL — Windows (cmd.exe):
curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Dashboard" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Dashboard", {
method: "GET",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" }
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.get("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Dashboard", { headers: { Authorization: `Bearer ${token}` } });
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.GetAsync("/api/v1/whatsapp/inbox/Dashboard");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.get(
"/api/v1/whatsapp/inbox/Dashboard",
options: Options(headers: {"Authorization": "Bearer $token"}),
);
24. POST /api/v1/whatsapp/inbox/GetMessages/{conversationId}
Permission: WhatsAppInbox.View
cURL — Linux/macOS:
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/GetMessages/c1a2b3c4-0000-0000-0000-000000000001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"draw":1,"start":0,"length":25,"search":{"value":"","regex":false},"order":[{"column":0,"dir":"desc"}],"columns":[]}'
cURL — Windows (cmd.exe):
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/GetMessages/c1a2b3c4-0000-0000-0000-000000000001" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json" ^
-d "{\"draw\":1,\"start\":0,\"length\":25,\"search\":{\"value\":\"\",\"regex\":false},\"order\":[{\"column\":0,\"dir\":\"desc\"}],\"columns\":[]}"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/GetMessages/c1a2b3c4-0000-0000-0000-000000000001", {
method: "POST",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" },
body: JSON.stringify({
"draw": 1,
"start": 0,
"length": 25,
"search": {
"value": "",
"regex": false
},
"order": [
{
"column": 0,
"dir": "desc"
}
],
"columns": []
})
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.post(
"https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/GetMessages/c1a2b3c4-0000-0000-0000-000000000001",
{
"draw": 1,
"start": 0,
"length": 25,
"search": {
"value": "",
"regex": false
},
"order": [
{
"column": 0,
"dir": "desc"
}
],
"columns": []
},
{ headers: { Authorization: `Bearer ${token}` } }
);
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var payload = new { draw = 1, start = 0, length = 25, search = new { value = "", regex = false }, order = new[] { new { column = 0, dir = "desc" } }, columns = new[] { } };
var response = await client.PostAsJsonAsync("/api/v1/whatsapp/inbox/GetMessages/c1a2b3c4-0000-0000-0000-000000000001", payload);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.post(
"/api/v1/whatsapp/inbox/GetMessages/c1a2b3c4-0000-0000-0000-000000000001",
data: {
"draw": 1,
"start": 0,
"length": 25,
"search": {
"value": "",
"regex": false
},
"order": [
{
"column": 0,
"dir": "desc"
}
],
"columns": []
},
options: Options(headers: {"Authorization": "Bearer $token"}),
);
25. POST /api/v1/whatsapp/inbox/SendReply/{conversationId}
Permission: WhatsAppInbox.SendReply
cURL — Linux/macOS:
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/SendReply/c1a2b3c4-0000-0000-0000-000000000001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"body":"Thank you for reaching out, checking your order now.","previewUrl":false}'
cURL — Windows (cmd.exe):
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/SendReply/c1a2b3c4-0000-0000-0000-000000000001" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json" ^
-d "{\"body\":\"Thank you for reaching out, checking your order now.\",\"previewUrl\":false}"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/SendReply/c1a2b3c4-0000-0000-0000-000000000001", {
method: "POST",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" },
body: JSON.stringify({
"body": "Thank you for reaching out, checking your order now.",
"previewUrl": false
})
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.post(
"https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/SendReply/c1a2b3c4-0000-0000-0000-000000000001",
{
"body": "Thank you for reaching out, checking your order now.",
"previewUrl": false
},
{ headers: { Authorization: `Bearer ${token}` } }
);
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var payload = new { body = "Thank you for reaching out, checking your order now.", previewUrl = false };
var response = await client.PostAsJsonAsync("/api/v1/whatsapp/inbox/SendReply/c1a2b3c4-0000-0000-0000-000000000001", payload);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.post(
"/api/v1/whatsapp/inbox/SendReply/c1a2b3c4-0000-0000-0000-000000000001",
data: {
"body": "Thank you for reaching out, checking your order now.",
"previewUrl": false
},
options: Options(headers: {"Authorization": "Bearer $token"}),
);
26. POST /api/v1/whatsapp/inbox/SendTemplateReply/{conversationId}
Permission: WhatsAppInbox.SendTemplate
cURL — Linux/macOS:
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/SendTemplateReply/c1a2b3c4-0000-0000-0000-000000000001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"templateName":"order_status_update","languageCode":"ar","components":[{"type":"body","parameters":[{"type":"text","text":"12500 SAR"}]}]}'
cURL — Windows (cmd.exe):
curl -X POST "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/SendTemplateReply/c1a2b3c4-0000-0000-0000-000000000001" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json" ^
-d "{\"templateName\":\"order_status_update\",\"languageCode\":\"ar\",\"components\":[{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"12500 SAR\"}]}]}"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/SendTemplateReply/c1a2b3c4-0000-0000-0000-000000000001", {
method: "POST",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" },
body: JSON.stringify({
"templateName": "order_status_update",
"languageCode": "ar",
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "12500 SAR"
}
]
}
]
})
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.post(
"https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/SendTemplateReply/c1a2b3c4-0000-0000-0000-000000000001",
{
"templateName": "order_status_update",
"languageCode": "ar",
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "12500 SAR"
}
]
}
]
},
{ headers: { Authorization: `Bearer ${token}` } }
);
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var payload = new { templateName = "order_status_update", languageCode = "ar", components = new[] { new { type = "body", parameters = new[] { new { type = "text", text = "12500 SAR" } } } } };
var response = await client.PostAsJsonAsync("/api/v1/whatsapp/inbox/SendTemplateReply/c1a2b3c4-0000-0000-0000-000000000001", payload);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.post(
"/api/v1/whatsapp/inbox/SendTemplateReply/c1a2b3c4-0000-0000-0000-000000000001",
data: {
"templateName": "order_status_update",
"languageCode": "ar",
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "12500 SAR"
}
]
}
]
},
options: Options(headers: {"Authorization": "Bearer $token"}),
);
27. GET /api/v1/whatsapp/inbox/MediaInfo/{messageId}
Permission: WhatsAppInbox.MediaView
cURL — Linux/macOS:
curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/MediaInfo/m1a2b3c4-0000-0000-0000-000000000001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
cURL — Windows (cmd.exe):
curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/MediaInfo/m1a2b3c4-0000-0000-0000-000000000001" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/MediaInfo/m1a2b3c4-0000-0000-0000-000000000001", {
method: "GET",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" }
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.get("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/MediaInfo/m1a2b3c4-0000-0000-0000-000000000001", { headers: { Authorization: `Bearer ${token}` } });
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.GetAsync("/api/v1/whatsapp/inbox/MediaInfo/m1a2b3c4-0000-0000-0000-000000000001");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.get(
"/api/v1/whatsapp/inbox/MediaInfo/m1a2b3c4-0000-0000-0000-000000000001",
options: Options(headers: {"Authorization": "Bearer $token"}),
);
28. GET /api/v1/whatsapp/inbox/Media/{messageId}
Permission: WhatsAppInbox.MediaView
cURL — Linux/macOS:
curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Media/m1a2b3c4-0000-0000-0000-000000000001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
cURL — Windows (cmd.exe):
curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Media/m1a2b3c4-0000-0000-0000-000000000001" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json"
JavaScript — fetch():
const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Media/m1a2b3c4-0000-0000-0000-000000000001", {
method: "GET",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" }
});
const result = await response.json();
JavaScript — Axios:
const { data } = await axios.get("https://{tenant}.shumoul.app/api/v1/whatsapp/inbox/Media/m1a2b3c4-0000-0000-0000-000000000001", { headers: { Authorization: `Bearer ${token}` } });
C# — HttpClient:
var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.GetAsync("/api/v1/whatsapp/inbox/Media/m1a2b3c4-0000-0000-0000-000000000001");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();
Flutter — Dio:
final response = await dio.get(
"/api/v1/whatsapp/inbox/Media/m1a2b3c4-0000-0000-0000-000000000001",
options: Options(headers: {"Authorization": "Bearer $token"}),
);
