Get Sending Metrics
curl --request GET \
--url https://api.migma.ai/v1/metrics/sending \
--header 'Authorization: <api-key>'import requests
url = "https://api.migma.ai/v1/metrics/sending"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.migma.ai/v1/metrics/sending', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.migma.ai/v1/metrics/sending",
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: <api-key>"
],
]);
$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.migma.ai/v1/metrics/sending"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.migma.ai/v1/metrics/sending")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.migma.ai/v1/metrics/sending")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"period": "2026-07",
"monthly": {
"sent": 0,
"delivered": 0,
"bounced": 0,
"complained": 0
},
"today": {
"sent": 0,
"reserved": 0,
"dailyLimit": 0,
"remainingToday": 0
},
"monthlyLimit": 0,
"remainingMonth": 0,
"history": [
{
"period": "2026-06",
"sent": 0,
"delivered": 0,
"bounced": 0,
"complained": 0
}
]
}
}{
"success": false,
"error": "<string>",
"code": "<string>",
"data": {}
}{
"success": false,
"error": "<string>",
"code": "<string>",
"data": {}
}{
"success": false,
"error": "<string>",
"code": "<string>",
"data": {}
}Get Sending Metrics
Get account-level sending totals, quota usage, and optional monthly history. Requires API key with email:read permission.
GET
/
v1
/
metrics
/
sending
Get Sending Metrics
curl --request GET \
--url https://api.migma.ai/v1/metrics/sending \
--header 'Authorization: <api-key>'import requests
url = "https://api.migma.ai/v1/metrics/sending"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.migma.ai/v1/metrics/sending', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.migma.ai/v1/metrics/sending",
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: <api-key>"
],
]);
$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.migma.ai/v1/metrics/sending"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.migma.ai/v1/metrics/sending")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.migma.ai/v1/metrics/sending")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"period": "2026-07",
"monthly": {
"sent": 0,
"delivered": 0,
"bounced": 0,
"complained": 0
},
"today": {
"sent": 0,
"reserved": 0,
"dailyLimit": 0,
"remainingToday": 0
},
"monthlyLimit": 0,
"remainingMonth": 0,
"history": [
{
"period": "2026-06",
"sent": 0,
"delivered": 0,
"bounced": 0,
"complained": 0
}
]
}
}{
"success": false,
"error": "<string>",
"code": "<string>",
"data": {}
}{
"success": false,
"error": "<string>",
"code": "<string>",
"data": {}
}{
"success": false,
"error": "<string>",
"code": "<string>",
"data": {}
}Authorizations
API key authentication. Use 'Authorization: Bearer YOUR_API_KEY' where YOUR_API_KEY is obtained from the Migma dashboard under Settings → Developers → API Keys.
Query Parameters
Number of previous monthly periods to include in history. Omit to exclude history.
Required range:
1 <= x <= 12Was this page helpful?
⌘I