Skip to main content
GET
/
subaccount
/
domain
Python SDK
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": "sp-dkim._domainkey.example.com",
      "type": "TXT",
      "textValue": "v=DKIM1;k=rsa;s=email;h=sha256;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDU9T3mqruDth2rHXCqNiPzr4oRbHqcUMkqCA4sTZgK7WrhjzerHVyqNAfq4Tyx9s4Tqj0CVfAuENp9mHFKt9Kow5csxqTeVkBoi5UaonafsDstm39ggxFQhKTlRpRoV+VNE5jU9WYlv3wywv28DY2woKYG6QBM6JPSKN1dYQpR4QIDAQAB"
    },
    "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,
    "verified": false,
    "domainRegisteredDate": "1995-08-14",
    "created": 1766394250613907000,
    "gptVerified": false,
    "gpt": {
      "host": "example.com",
      "type": "TXT",
      "textValue": ""
    },
    "dmarcFailureReason": "",
    "dkimFailureReason": "",
    "trackFailureReason": "",
    "returnPathFailureReason": ""
  }
]

Authorizations

X-SubAccount-ApiKey
string
header
required

This api key can be used only for sub account level operations

Query Parameters

limit
integer

Number of records to return per request

Required range: x >= 1
offset
integer

Number of initial records to skip

Required range: x >= 0

Case insensitive search against domain names

Response

200 - application/json

List of domains retrieved successfully

id
integer

Unique ID for the domain.

Example:

117

name
string

Name of the domain.

Example:

"piedpiper.com"

dkim
object

DKIM record host, type and value

returnPath
object

ReturnPath record host, type and value

track
object

Track record host, type and value. This domain will be used for link tracking while rewriting links in your email message

dmarc
object

DMARC record host, type and value

dkimConfig
string

DKIM configuration

dkimVerified
boolean

Status of DKIM verification ( true or false )

Example:

false

dmarcVerified
boolean

Status of DMARC verification ( true or false)

Example:

false

returnPathVerified
boolean

Status of ReturnPath verification ( true or false )

Example:

false

trackVerified
boolean

Status of Track verification ( true or false )

Example:

true

verified
boolean

Overall verification status of the domain

Example:

false

domainRegisteredDate
string

Date when the domain was registered

Example:

"1995-08-14"

created
integer<int64>

UNIX epoch timestamp in nanoseconds.

Example:

1766394250613907000

gptVerified
boolean

Status of GPT verification ( true or false )

Example:

false

gpt
object

GPT record host, type and value

dmarcFailureReason
string

Reason for DMARC verification failure

Example:

""

dkimFailureReason
string

Reason for DKIM verification failure

Example:

""

trackFailureReason
string

Reason for Track verification failure

Example:

""

returnPathFailureReason
string

Reason for ReturnPath verification failure

Example:

""