Generate a service-of-notice attachment
curl --request POST \
--url https://api.platform.arb.inc/service-of-notice/attachments/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mailType": "pressureSealed",
"url": "https://www.example.com/notice-image"
}
'import requests
url = "https://api.platform.arb.inc/service-of-notice/attachments/create"
payload = {
"mailType": "pressureSealed",
"url": "https://www.example.com/notice-image"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({mailType: 'pressureSealed', url: 'https://www.example.com/notice-image'})
};
fetch('https://api.platform.arb.inc/service-of-notice/attachments/create', 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.platform.arb.inc/service-of-notice/attachments/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mailType' => 'pressureSealed',
'url' => 'https://www.example.com/notice-image'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.platform.arb.inc/service-of-notice/attachments/create"
payload := strings.NewReader("{\n \"mailType\": \"pressureSealed\",\n \"url\": \"https://www.example.com/notice-image\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.platform.arb.inc/service-of-notice/attachments/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mailType\": \"pressureSealed\",\n \"url\": \"https://www.example.com/notice-image\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platform.arb.inc/service-of-notice/attachments/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mailType\": \"pressureSealed\",\n \"url\": \"https://www.example.com/notice-image\"\n}"
response = http.request(request)
puts response.read_body"<string>""mailType not found""Failed to load webpage URL"service-of-notice
Generate a service-of-notice attachment
Takes a screenshot of the provided URL and returns it as a PNG image sized for the specified mail type. Use this to programmatically generate the optional image that appears on a service-of-notice mailing.
POST
/
service-of-notice
/
attachments
/
create
Generate a service-of-notice attachment
curl --request POST \
--url https://api.platform.arb.inc/service-of-notice/attachments/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mailType": "pressureSealed",
"url": "https://www.example.com/notice-image"
}
'import requests
url = "https://api.platform.arb.inc/service-of-notice/attachments/create"
payload = {
"mailType": "pressureSealed",
"url": "https://www.example.com/notice-image"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({mailType: 'pressureSealed', url: 'https://www.example.com/notice-image'})
};
fetch('https://api.platform.arb.inc/service-of-notice/attachments/create', 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.platform.arb.inc/service-of-notice/attachments/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mailType' => 'pressureSealed',
'url' => 'https://www.example.com/notice-image'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.platform.arb.inc/service-of-notice/attachments/create"
payload := strings.NewReader("{\n \"mailType\": \"pressureSealed\",\n \"url\": \"https://www.example.com/notice-image\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.platform.arb.inc/service-of-notice/attachments/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mailType\": \"pressureSealed\",\n \"url\": \"https://www.example.com/notice-image\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platform.arb.inc/service-of-notice/attachments/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mailType\": \"pressureSealed\",\n \"url\": \"https://www.example.com/notice-image\"\n}"
response = http.request(request)
puts response.read_body"<string>""mailType not found""Failed to load webpage URL"Authorizations
access token
Body
application/json
The mail type identifier. Must support attachments.
Example:
"pressureSealed"
URL of the webpage to screenshot. The page will be captured and returned as a PNG image sized to fit the attachment area of the specified mail type.
Maximum string length:
500Example:
"https://www.example.com/notice-image"
Response
Screenshot captured successfully. Returns raw PNG image data.
The response is of type file.
⌘I