Developer API

Domains

Each domain gets three DNS records: a DKIM TXT record, and an MX + SPF TXT record on the send. subdomain (custom return path). If your account already verified the domain for Email Marketing or iResendly Mail, it's imported as verified and imported: true is returned. A domain verified by another iResendly account returns 409 domain_in_use — claim it from the console with a TXT record.

Create domain

POST/domains

Adds a domain (or subdomain such as mail.acme.com) and returns the DNS records to publish.

Body parameters

namestringrequired

The domain name.

Request

curl -X POST 'https://api.iresendly.com/domains' \
  -H 'Authorization: Bearer irs_xxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "acme.com"
}'

Response

{
  "object": "domain",
  "id": "d91cd9bd-1176-453e-8fc1-35364d380206",
  "name": "acme.com",
  "status": "pending",
  "region": "eu-north-1",
  "imported": false,
  "records": [
    {
      "record": "DKIM",
      "name": "iresendly._domainkey",
      "type": "TXT",
      "ttl": "Auto",
      "status": "pending",
      "value": "p=MIGfMA0GCSqGSIb3DQEB..."
    },
    {
      "record": "SPF",
      "name": "send",
      "type": "MX",
      "ttl": "Auto",
      "status": "pending",
      "value": "feedback-smtp.eu-north-1.amazonses.com",
      "priority": 10
    },
    {
      "record": "SPF",
      "name": "send",
      "type": "TXT",
      "ttl": "Auto",
      "status": "pending",
      "value": "v=spf1 include:amazonses.com ~all"
    }
  ]
}

Retrieve domain

GET/domains/{id}

Domain with records and status.

Request

curl -X GET 'https://api.iresendly.com/domains/{id}' \
  -H 'Authorization: Bearer irs_xxxxxxxxx'

Response

{
  "object": "domain",
  "id": "d91cd9bd-…",
  "name": "acme.com",
  "status": "verified"
}

Verify domain

POST/domains/{id}/verify

Checks DNS now. We also re-check automatically.

Request

curl -X POST 'https://api.iresendly.com/domains/{id}/verify' \
  -H 'Authorization: Bearer irs_xxxxxxxxx'

Response

{
  "object": "domain",
  "id": "d91cd9bd-…",
  "status": "pending"
}

Update domain

PATCH/domains/{id}

Open/click tracking and TLS policy.

Body parameters

open_trackingboolean

Add an open-tracking pixel.

click_trackingboolean

Rewrite links to track clicks.

tls"opportunistic" | "enforced"

Enforced only delivers over TLS.

Request

curl -X PATCH 'https://api.iresendly.com/domains/{id}' \
  -H 'Authorization: Bearer irs_xxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
  "open_tracking": true,
  "click_tracking": true
}'

Response

{
  "object": "domain",
  "id": "d91cd9bd-…"
}

List domains

GET/domains

All domains on the account.

Request

curl -X GET 'https://api.iresendly.com/domains' \
  -H 'Authorization: Bearer irs_xxxxxxxxx'

Response

{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "object": "domain",
      "name": "acme.com",
      "status": "verified"
    }
  ]
}

Delete domain

DELETE/domains/{id}

Removes the domain from the Developer API. If Email Marketing or Mail still use it, it stays verified there.

Request

curl -X DELETE 'https://api.iresendly.com/domains/{id}' \
  -H 'Authorization: Bearer irs_xxxxxxxxx'

Response

{
  "object": "domain",
  "id": "d91cd9bd-…",
  "deleted": true
}