curl --request GET \
--url https://api.sendpost.io/api/v1/account/subaccount/{subaccount_id} \
--header 'X-Account-ApiKey: <api-key>'import requests
url = "https://api.sendpost.io/api/v1/account/subaccount/{subaccount_id}"
headers = {"X-Account-ApiKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Account-ApiKey': '<api-key>'}};
fetch('https://api.sendpost.io/api/v1/account/subaccount/{subaccount_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.sendpost.io/api/v1/account/subaccount/{subaccount_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 => [
"X-Account-ApiKey: <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.sendpost.io/api/v1/account/subaccount/{subaccount_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Account-ApiKey", "<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.sendpost.io/api/v1/account/subaccount/{subaccount_id}")
.header("X-Account-ApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendpost.io/api/v1/account/subaccount/{subaccount_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Account-ApiKey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 50441,
"apiKey": "pR0YIuxYSbVwmQi2Y8Qs",
"name": "API",
"labels": [],
"smtpAuths": [
{
"id": 117,
"username": "default@117.sendpost.io",
"password": "default@117.sendpost.io",
"created": 1567512491588004000,
"updated": 1567512491588004000
}
],
"type": 1,
"isPlus": false,
"created": 1733844681120384500,
"created_by": {
"id": 117,
"isVerified": true,
"isForbidden": false,
"firebaseUID": "1234567890",
"email": "raj@piedpiper.com",
"name": "Raj",
"url": "https://www.sendpost.io/logo.png",
"companyName": "SendPost",
"onboardQAnswered": true,
"phoneNumber": "+919876543210",
"notesColor": "#000000",
"created": 1567512491588004000
},
"updated_by": {
"id": 117,
"isVerified": true,
"isForbidden": false,
"firebaseUID": "1234567890",
"email": "raj@piedpiper.com",
"name": "Raj",
"url": "https://www.sendpost.io/logo.png",
"companyName": "SendPost",
"onboardQAnswered": true,
"phoneNumber": "+919876543210",
"notesColor": "#000000",
"created": 1567512491588004000
},
"blocked": false,
"blocked_at": 0,
"block_reason": "",
"hb_exempt": false,
"generate_weekly_report": false,
"handlers": []
}Get Sub-Account
Retrieves a specific sub-account by its ID.
curl --request GET \
--url https://api.sendpost.io/api/v1/account/subaccount/{subaccount_id} \
--header 'X-Account-ApiKey: <api-key>'import requests
url = "https://api.sendpost.io/api/v1/account/subaccount/{subaccount_id}"
headers = {"X-Account-ApiKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Account-ApiKey': '<api-key>'}};
fetch('https://api.sendpost.io/api/v1/account/subaccount/{subaccount_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.sendpost.io/api/v1/account/subaccount/{subaccount_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 => [
"X-Account-ApiKey: <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.sendpost.io/api/v1/account/subaccount/{subaccount_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Account-ApiKey", "<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.sendpost.io/api/v1/account/subaccount/{subaccount_id}")
.header("X-Account-ApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendpost.io/api/v1/account/subaccount/{subaccount_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Account-ApiKey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 50441,
"apiKey": "pR0YIuxYSbVwmQi2Y8Qs",
"name": "API",
"labels": [],
"smtpAuths": [
{
"id": 117,
"username": "default@117.sendpost.io",
"password": "default@117.sendpost.io",
"created": 1567512491588004000,
"updated": 1567512491588004000
}
],
"type": 1,
"isPlus": false,
"created": 1733844681120384500,
"created_by": {
"id": 117,
"isVerified": true,
"isForbidden": false,
"firebaseUID": "1234567890",
"email": "raj@piedpiper.com",
"name": "Raj",
"url": "https://www.sendpost.io/logo.png",
"companyName": "SendPost",
"onboardQAnswered": true,
"phoneNumber": "+919876543210",
"notesColor": "#000000",
"created": 1567512491588004000
},
"updated_by": {
"id": 117,
"isVerified": true,
"isForbidden": false,
"firebaseUID": "1234567890",
"email": "raj@piedpiper.com",
"name": "Raj",
"url": "https://www.sendpost.io/logo.png",
"companyName": "SendPost",
"onboardQAnswered": true,
"phoneNumber": "+919876543210",
"notesColor": "#000000",
"created": 1567512491588004000
},
"blocked": false,
"blocked_at": 0,
"block_reason": "",
"hb_exempt": false,
"generate_weekly_report": false,
"handlers": []
}Authorizations
This api key can be used for all account level operations
Path Parameters
The ID of the sub-account to retrieve.
11
Response
Successfully retrieved the sub-account.
Unique ID for the sub-account.
50441
API key for the sub-account.
"pR0YIuxYSbVwmQi2Y8Qs"
Name of the sub-account.
"API"
Labels associated with the sub-account
[]
SMTP Auths associated with the sub-account
Show child attributes
Show child attributes
Type of the sub-account
0, 1 1
Indicates whether the sub-account is a Plus sub-account
false
UNIX epoch nano timestamp when the sub-account was created.
1733844681120384500
Member who created the sub-account
Show child attributes
Show child attributes
Member who updated the sub-account
Show child attributes
Show child attributes
Indicates whether the sub-account is blocked
false
UNIX epoch nano timestamp when the sub-account was blocked (0 if not blocked)
0
Reason for blocking the sub-account
""
Indicates whether the sub-account is exempt from hard bounce tracking
false
Indicates whether weekly reports are generated for this sub-account
false
Handlers associated with the sub-account
[]
Was this page helpful?