Get a send approval
curl --request GET \
--url https://api.migma.ai/v1/send-approvals/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.migma.ai/v1/send-approvals/{id}"
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/send-approvals/{id}', 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/send-approvals/{id}",
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/send-approvals/{id}"
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/send-approvals/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.migma.ai/v1/send-approvals/{id}")
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": {
"id": "<string>",
"action": "send_email",
"status": "pending",
"summary": {},
"approvalUrl": "<string>",
"editUrl": "<string>",
"result": {},
"error": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"decidedAt": "2023-11-07T05:31:56Z"
},
"error": "<string>"
}{
"success": true,
"data": null,
"error": "<string>"
}{
"success": true,
"data": null,
"error": "<string>"
}{
"success": true,
"data": null,
"error": "<string>"
}Get a send approval
Whether the owner approved, declined, or let the approval expire, and the outcome of the send. Requires the permission the approval needed. A scheduled approval can later become failed, with error and result.status failed, when its send time comes: the campaign, its email, or its segment rules changed, so nothing went out and the campaign is back in draft. Keep checking until the send time has passed. An approval does not follow a later cancel or a person’s edit on the campaign page, so read the campaign for its current status.
GET
/
v1
/
send-approvals
/
{id}
Get a send approval
curl --request GET \
--url https://api.migma.ai/v1/send-approvals/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.migma.ai/v1/send-approvals/{id}"
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/send-approvals/{id}', 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/send-approvals/{id}",
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/send-approvals/{id}"
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/send-approvals/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.migma.ai/v1/send-approvals/{id}")
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": {
"id": "<string>",
"action": "send_email",
"status": "pending",
"summary": {},
"approvalUrl": "<string>",
"editUrl": "<string>",
"result": {},
"error": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"decidedAt": "2023-11-07T05:31:56Z"
},
"error": "<string>"
}{
"success": true,
"data": null,
"error": "<string>"
}{
"success": true,
"data": null,
"error": "<string>"
}{
"success": true,
"data": null,
"error": "<string>"
}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.
Path Parameters
Was this page helpful?