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

Add dns records

POST
/v2/dns
This endpoints lets you add dns records on a domain.

Fields Description#

NameTypeDescription
assignedDomainIdstringThe unique identifier for the domain to which DNS records are assigned. (domainId)
recordsarrayA list of DNS records associated with the domain.

records Array Structure#

NameTypeDescription
hoststringThe domain or subdomain for which the DNS record applies.
valuestringThe corresponding value of the DNS record, such as an IP address or another domain.
recordTypestringThe type of DNS record (e.g., A, CNAME, MX, TXT).

Request

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 --request POST 'https://api.zapmail.ai/api/v2/dns' \
--header 'x-auth-zapmail: '

Responses

🟢200Success
application/json
Body
object {0}
Example
{
  "status": 200,
  "message": "Dns records added successfully",
  "data": [
    {
      "id": "11111111-1111-1111-1111-111111111111",
      "value": "123.123.123.123",
      "host": "dummy.com",
      "recordType": "A",
      "assignedDomainId": "22222222-2222-2222-2222-222222222222",
      "cdfRecordId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "cdfResponse": {
        "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "name": "dummy.com.dns-records.test",
        "type": "A",
        "content": "123.123.123.123"
      },
      "priority": null,
      "createdAt": "2025-01-31T09:03:21.984Z",
      "updatedAt": "2025-01-31T09:03:21.984Z",
      "deletedAt": null
    },
    {
      "id": "33333333-3333-3333-3333-333333333333",
      "value": "dummy-mailserver.com",
      "host": "mail.dummy.com",
      "recordType": "CNAME",
      "assignedDomainId": "22222222-2222-2222-2222-222222222222",
      "cdfRecordId": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
      "cdfResponse": {
        "id": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
        "name": "mail.dummy.com.dns-records.test",
        "type": "CNAME",
        "content": "dummy-mailserver.com"
      },
      "priority": null,
      "createdAt": "2025-01-31T09:03:21.984Z",
      "updatedAt": "2025-01-31T09:03:21.984Z",
      "deletedAt": null
    }
  ]
}
Previous
Get dns records
Next
Update dns records
Built with