Zapmail
latest
  • latest
  • v1
  1. dns
Zapmail
latest
  • latest
  • v1
  • Zapmail Docs
  • users
    • Retrieve User Details
      GET
  • workspaces
    • Retrieve all workspaces
      GET
    • Create new workspace
      POST
    • Update workspace
      PUT
  • billing
    • Add Billing Details
      POST
    • Update Billing Details
      PUT
  • mailbox
    • Retrieve All Mailboxes
      GET
    • Get Mailbox Details by ID
      GET
    • Assign New Mailboxes to Domains
      POST
    • Update mailbox
      PUT
    • Remove mailboxes on next renewal
      PUT
    • Get Authenticator code
      GET
  • payments & wallet
    • Add balance to wallet
      POST
    • Get wallet balance
      GET
    • Enable auto recharge
      POST
  • export
    • Export mailboxes
      POST
    • Add third party account details
      POST
    • Update third party account details
      PUT
  • subscriptions
    • Get all subscriptions
    • Cancel subscription
    • Upgrade existing subscription
  • domains
    • Retrieve All Domains
    • List Assignable Domains
    • Add DMARC record
    • Add Domain forwarding
    • Get Name servers to connect domain
    • Verify Name Server Propagation
    • Connect Domain with Zapmail
    • Enable email forwarding
    • Remove email forwarding
    • Enable catch all emails
    • Remove catch all emails
    • Check DNS records
    • Remove unused domains
    • Get available domains for registration
    • Get domains purchase payment link
  • dns
    • Get dns records
      GET
    • Add dns records
      POST
    • Update dns records
      PUT
    • Delete dns records
      DELETE
  1. dns

Get dns records

GET
/v2/dns/
This endpoint retrieves all DNS records for a domain associated with a user. The domain is identified by the id parameter provided in the request.

Request Parameters#

Query Parameters#

ParameterTypeRequiredDescription
idstringYesThe unique identifier (ID) of the domain for which DNS records are fetched.

Request

Query Params
id
string 
required
Example:
{{domain-id}}
Header Params
x-auth-zapmail
string 
required
Example:
{{x-auth-zapmail}}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request GET 'https://api.zapmail.ai/api/v2/dns/?id={{domain-id}}' \
--header 'x-auth-zapmail: '

Responses

🟢200Success
application/json
Body
object {0}
Example
{
  "status": 200,
  "message": "Dns records fetched successfully",
  "data": {
    "records": [
      {
        "id": "11111111-1111-1111-1111-111111111111",
        "assignedDomainId": "22222222-2222-2222-2222-222222222222",
        "cdfRecordId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "cdfResponse": {
          "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
          "name": "dummy.com.dns-records.test",
          "type": "A",
          "content": "123.123.123.123"
        },
        "recordType": "A",
        "value": "123.123.123.123",
        "host": "dummy.com",
        "priority": null,
        "createdAt": "2025-01-31T09:03:21.984Z",
        "updatedAt": "2025-01-31T09:03:21.984Z",
        "deletedAt": null
      },
      {
        "id": "33333333-3333-3333-3333-333333333333",
        "assignedDomainId": "22222222-2222-2222-2222-222222222222",
        "cdfRecordId": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
        "cdfResponse": {
          "id": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
          "name": "mail.dummy.com.dns-records.test",
          "type": "CNAME",
          "content": "dummy-mailserver.com"
        },
        "recordType": "CNAME",
        "value": "dummy-mailserver.com",
        "host": "mail.dummy.com",
        "priority": null,
        "createdAt": "2025-01-31T09:03:21.984Z",
        "updatedAt": "2025-01-31T09:03:21.984Z",
        "deletedAt": null
      }
    ],
    "disabledRecords": [
      {
        "id": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
        "zone_id": "44444444-4444-4444-4444-444444444444",
        "name": "mail.dummy.com.dns-records.test",
        "type": "CNAME",
        "content": "dummy-mailserver.com",
        "ttl": 1
      },
      {
        "id": "cccccccccccccccccccccccccccccccc",
        "zone_id": "44444444-4444-4444-4444-444444444444",
        "name": "_dmarc.dns-records.test",
        "type": "TXT",
        "content": "v=DMARC1; p=reject; rua=mailto:dummy@dummy.com; ruf=mailto:dummy@dummy.com; fo=0; pct=100; rf=afrf; ri=604800; sp=reject; aspf=r; adkim=r",
        "ttl": 1
      }
    ]
  }
}
Previous
Get domains purchase payment link
Next
Add dns records
Built with