import sendpost_python_sdk
from sendpost_python_sdk.apis.tags import domain_api
with sendpost_python_sdk.ApiClient() as api_client:
api_instance = domain_api.DomainApi(api_client)
x_sub_account_api_key = "your_api_key"
try:
domains = api_instance.get_all_domains(
header_params={ 'X-SubAccount-ApiKey': x_sub_account_api_key }
)
print(domains)
except sendpost_python_sdk.ApiException as e:
print(f"Exception: {e}")
[
{
"id": 117,
"name": "piedpiper.com",
"dkim": {
"host": "1587987845._domainkey.hooli.com",
"type": "TXT",
"textValue": "v=DKIM1;k=rsa;s=email;h=sha256;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDsGMUVM1bqebA0bgtf0HQ6P/FZJy42k/OHP0OgVv4WMSsHOvCFre1/6d1GTx3ldeJf612K3L7wV4iJfDMh2FEpuQ+z+pOro3FarWuawoiJbBudgQQ8rResnZ4Sg3W1Zr3tcZgBCEQ9WoLDv/B2dd01p3ZJ40hsco+Fw75Ldnrd3wIDAQAB"
},
"returnPath": {
"host": "sp-bounces.hooli.com",
"type": "CNAME",
"textValue": "sp.sendpost.email"
},
"track": {
"host": "track.hooli.com",
"type": "CNAME",
"textValue": "api.sendpost.io"
},
"dmarc": {
"host": "_dmarc.hooli.com",
"type": "TXT",
"textValue": "v=DMARC1; p=none;"
},
"dkimConfig": "<string>",
"dkimVerified": false,
"dmarcVerified": false,
"returnPathVerified": false,
"trackVerified": true,
"created": 1567512491587205000
}
]
Retrieve a list of all domains associated with the sub-account, including their DNS records and authentication status.
import sendpost_python_sdk
from sendpost_python_sdk.apis.tags import domain_api
with sendpost_python_sdk.ApiClient() as api_client:
api_instance = domain_api.DomainApi(api_client)
x_sub_account_api_key = "your_api_key"
try:
domains = api_instance.get_all_domains(
header_params={ 'X-SubAccount-ApiKey': x_sub_account_api_key }
)
print(domains)
except sendpost_python_sdk.ApiException as e:
print(f"Exception: {e}")
[
{
"id": 117,
"name": "piedpiper.com",
"dkim": {
"host": "1587987845._domainkey.hooli.com",
"type": "TXT",
"textValue": "v=DKIM1;k=rsa;s=email;h=sha256;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDsGMUVM1bqebA0bgtf0HQ6P/FZJy42k/OHP0OgVv4WMSsHOvCFre1/6d1GTx3ldeJf612K3L7wV4iJfDMh2FEpuQ+z+pOro3FarWuawoiJbBudgQQ8rResnZ4Sg3W1Zr3tcZgBCEQ9WoLDv/B2dd01p3ZJ40hsco+Fw75Ldnrd3wIDAQAB"
},
"returnPath": {
"host": "sp-bounces.hooli.com",
"type": "CNAME",
"textValue": "sp.sendpost.email"
},
"track": {
"host": "track.hooli.com",
"type": "CNAME",
"textValue": "api.sendpost.io"
},
"dmarc": {
"host": "_dmarc.hooli.com",
"type": "TXT",
"textValue": "v=DMARC1; p=none;"
},
"dkimConfig": "<string>",
"dkimVerified": false,
"dmarcVerified": false,
"returnPathVerified": false,
"trackVerified": true,
"created": 1567512491587205000
}
]
This api key can be used only for sub account level operations
Number of records to return per request
x >= 1
Number of initial records to skip
x >= 0
Case insensitive search against domain names
List of domains retrieved successfully
The response is of type object[]
.