curl --request GET \
--url https://api.sendpost.io/api/v1/account/subaccount/ \
--header 'X-Account-ApiKey: <api-key>'import requests
url = "https://api.sendpost.io/api/v1/account/subaccount/"
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/', 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/",
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/"
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/")
.header("X-Account-ApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendpost.io/api/v1/account/subaccount/")
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,
"accountId": 4021,
"name": "Transactional - Production",
"apiKey": "pR0YIuxYSbVwmQi2Y8Qs",
"type": 1,
"isPlus": false,
"labels": [],
"blocked": false,
"created": 1704067200000000000
}
]List Sub-Accounts
Retrieve all sub-accounts under your main account. Sub-accounts allow you to segment email sending for different applications, brands, or use cases.
Sub-Account Types:
| Type | Value | Description |
|---|---|---|
| Default | 0 | Primary sub-account created with your account (cannot be deleted) |
| Custom | 1 | Additional sub-accounts you create |
Each Sub-Account Has:
- Unique
X-SubAccount-ApiKeyfor API authentication - Independent suppression list
- Isolated email statistics
- Own domain configurations
- SMTP credentials (if enabled)
Use Cases:
- Separate transactional and marketing emails
- Multi-tenant SaaS applications (one sub-account per customer)
- Different brands or product lines
- Development/staging/production environments
Note: isPlus indicates SendX Plus customers with premium features.
curl --request GET \
--url https://api.sendpost.io/api/v1/account/subaccount/ \
--header 'X-Account-ApiKey: <api-key>'import requests
url = "https://api.sendpost.io/api/v1/account/subaccount/"
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/', 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/",
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/"
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/")
.header("X-Account-ApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendpost.io/api/v1/account/subaccount/")
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,
"accountId": 4021,
"name": "Transactional - Production",
"apiKey": "pR0YIuxYSbVwmQi2Y8Qs",
"type": 1,
"isPlus": false,
"labels": [],
"blocked": false,
"created": 1704067200000000000
}
]Authorizations
This api key can be used for all account level operations
Query Parameters
Number of records to return per request. Default 20.
10
Number of initial records to skip for pagination.
0
Case-insensitive search against sub-account names.
"Production"
Response
List of sub-accounts.
Unique identifier for the sub-account
50441
Identifier of the parent account this sub-account belongs to
4021
Display name for the sub-account. Must be unique within your account. Use descriptive names.
100"Transactional - Production"
API key for this sub-account. Use this as the X-SubAccount-ApiKey header
when making API calls for this sub-account (sending emails, managing domains, etc.).
Security: Treat this like a password. Rotate if compromised.
"pR0YIuxYSbVwmQi2Y8Qs"
Type of sub-account:
0= Default (the primary sub-account created with your account)1= Custom (additional sub-accounts you create)
Note: The default sub-account cannot be deleted.
0, 1 1
Whether this sub-account belongs to a SendX Plus customer. SendX Plus is a premium tier that provides enhanced features and support.
false
Custom labels for organizing and filtering sub-accounts
Show child attributes
Show child attributes
Whether the sub-account is blocked from sending. A blocked sub-account cannot send emails. Common reasons:
- High bounce/spam rates
- Billing issues
- Policy violations
- Manual suspension by administrator
false
UNIX epoch timestamp in nanoseconds when the sub-account was created
1704067200000000000
Was this page helpful?