HydraCore
API by router

Email domains

List Email Domains

List all custom email domains for the current tenant.

"Show me the domains!" — Jerry Maguire (modified)

GET
/v1/email/domains
AuthorizationBearer <token>

In: header

Header Parameters

X-Api-Key?X-Api-Key

Response Body

curl -X GET "https://loading/v1/email/domains" \  -H "X-Api-Key: string"
[
  {
    "created_at": "2019-08-24T14:15:22Z",
    "dns_records": [
      {
        "name": "string",
        "priority": 0,
        "record": "string",
        "status": "string",
        "ttl": "string",
        "type": "string",
        "value": "string"
      }
    ],
    "domain": "string",
    "from_email": "string",
    "from_name": "string",
    "full_from_address": "string",
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "is_active": true,
    "region": "string",
    "resend_domain_id": "string",
    "status": "string",
    "updated_at": "2019-08-24T14:15:22Z",
    "verified_at": "2019-08-24T14:15:22Z"
  }
]
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Create Email Domain

Register a custom email domain via Resend.

Returns DNS records that need to be configured for verification. "I'll have what she's having." — When Harry Met Sally (about domain envy)

POST
/v1/email/domains
AuthorizationBearer <token>

In: header

Header Parameters

X-Api-Key?X-Api-Key
domainDomain

Custom domain name (e.g. mail.mattsplumbing.com.au)

Length3 <= length <= 255
from_email?From Email

Email prefix (e.g. 'noreply')

from_name?From Name

Display name in From: header

region?Region

Resend region for email delivery

Default"us-east-1"

Response Body

curl -X POST "https://loading/v1/email/domains" \  -H "X-Api-Key: string" \  -H "Content-Type: application/json" \  -d '{    "domain": "string"  }'
{
  "created_at": "2019-08-24T14:15:22Z",
  "dns_records": [
    {
      "name": "string",
      "priority": 0,
      "record": "string",
      "status": "string",
      "ttl": "string",
      "type": "string",
      "value": "string"
    }
  ],
  "domain": "string",
  "from_email": "string",
  "from_name": "string",
  "full_from_address": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "is_active": true,
  "region": "string",
  "resend_domain_id": "string",
  "status": "string",
  "updated_at": "2019-08-24T14:15:22Z",
  "verified_at": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get Active Sender

Get the active From: address for this tenant's outbound emails.

Returns the custom domain sender if verified and active, otherwise falls back to the platform default.

"Who am I? I'm Spider-Man." — Peter Parker (about sender identity)

GET
/v1/email/domains/active-sender
AuthorizationBearer <token>

In: header

Header Parameters

X-Api-Key?X-Api-Key

Response Body

curl -X GET "https://loading/v1/email/domains/active-sender" \  -H "X-Api-Key: string"
{}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Update Email Domain

Update from_name or from_email prefix for a domain.

"I'm not a number, I'm a free man!" — The Prisoner (about customising your From: header)

PATCH
/v1/email/domains/{domain_id}
AuthorizationBearer <token>

In: header

Path Parameters

domain_idDomain Id
Formatuuid

Header Parameters

X-Api-Key?X-Api-Key
from_email?From Email
from_name?From Name

Response Body

curl -X PATCH "https://loading/v1/email/domains/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "X-Api-Key: string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "created_at": "2019-08-24T14:15:22Z",
  "dns_records": [
    {
      "name": "string",
      "priority": 0,
      "record": "string",
      "status": "string",
      "ttl": "string",
      "type": "string",
      "value": "string"
    }
  ],
  "domain": "string",
  "from_email": "string",
  "from_name": "string",
  "full_from_address": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "is_active": true,
  "region": "string",
  "resend_domain_id": "string",
  "status": "string",
  "updated_at": "2019-08-24T14:15:22Z",
  "verified_at": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Delete Email Domain

Remove a custom email domain. Deletes from Resend too.

"Hasta la vista, baby." — T-800, Terminator 2 (about removing domains)

DELETE
/v1/email/domains/{domain_id}
AuthorizationBearer <token>

In: header

Path Parameters

domain_idDomain Id
Formatuuid

Header Parameters

X-Api-Key?X-Api-Key

Response Body

curl -X DELETE "https://loading/v1/email/domains/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "X-Api-Key: string"
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Verify Email Domain

Trigger DNS verification check for a domain.

After Matt configures the DNS records, he hits this to tell Resend to check them. Returns updated status and record statuses.

"Trust, but verify." — Ronald Reagan (about DNS records)

POST
/v1/email/domains/{domain_id}/verify
AuthorizationBearer <token>

In: header

Path Parameters

domain_idDomain Id
Formatuuid

Header Parameters

X-Api-Key?X-Api-Key

Response Body

curl -X POST "https://loading/v1/email/domains/497f6eca-6276-4993-bfeb-53cbbbba6f08/verify" \  -H "X-Api-Key: string"
{
  "created_at": "2019-08-24T14:15:22Z",
  "dns_records": [
    {
      "name": "string",
      "priority": 0,
      "record": "string",
      "status": "string",
      "ttl": "string",
      "type": "string",
      "value": "string"
    }
  ],
  "domain": "string",
  "from_email": "string",
  "from_name": "string",
  "full_from_address": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "is_active": true,
  "region": "string",
  "resend_domain_id": "string",
  "status": "string",
  "updated_at": "2019-08-24T14:15:22Z",
  "verified_at": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}