Nuntly.Domains (nuntly v0.1.0)

Copy Markdown View Source

Add and verify sending and receiving domains. Manage DKIM records, SPF configuration, and enable inbound email routing.

Summary

Functions

create_domain(client, body, opts \\ [])

Create Domain

Add a domain for sending or receiving emails.

Arguments

  • client — A Nuntly.Client returned by Nuntly.new/1.
  • body — application/json request body using CreateDomainRequest. Accepted fields:
    • "name" (string, required) — The name of the domain to send e-mails'
    • "sending" (boolean, optional) — Enable sending
    • "receiving" (boolean, optional) — Enable receiving
  • opts — Optional keyword list passed to Req for this request.

Example

client = Nuntly.new(api_key: "ntly_...")

Nuntly.Domains.create_domain(
  client,
  %{
    "name" => "example.com"
  }
)

delete_domain(client, id, opts \\ [])

Delete Domain

Permanently deletes a domain along with its inboxes, received messages, attachments, and sending configuration. This action is irreversible.

Arguments

  • client — A Nuntly.Client returned by Nuntly.new/1.
  • id — Required path parameter, string. The id of the domain
  • opts — Optional keyword list passed to Req for this request.

Example

client = Nuntly.new(api_key: "ntly_...")

Nuntly.Domains.delete_domain(client, "id")

list_domains(client, params \\ %{}, opts \\ [])

List Domains

Returns all domains with their verification and capability status.

Arguments

  • client — A Nuntly.Client returned by Nuntly.new/1.
  • params — Optional map of query parameters:
    • "cursor" — Optional query parameter, string. Pagination cursor from a previous response
    • "limit" — Optional query parameter, integer. Maximum number of items to return Defaults to 30.
  • opts — Optional keyword list passed to Req for this request.

Example

client = Nuntly.new(api_key: "ntly_...")

Nuntly.Domains.list_domains(
  client,
  %{
    "cursor" => "cursor",
    "limit" => 30
  }
)

retrieve_domain(client, id, opts \\ [])

Retrieve Domain

Returns a domain with its DNS record configuration and current verification status for each record.

Arguments

  • client — A Nuntly.Client returned by Nuntly.new/1.
  • id — Required path parameter, string. The id of the domain
  • opts — Optional keyword list passed to Req for this request.

Example

client = Nuntly.new(api_key: "ntly_...")

Nuntly.Domains.retrieve_domain(client, "id")

update_domain(client, id, body, opts \\ [])

Update Domain

Toggle sending, receiving, open tracking, or click tracking capabilities for a domain.

Arguments

  • client — A Nuntly.Client returned by Nuntly.new/1.
  • id — Required path parameter, string. The id of the domain
  • body — application/json request body using UpdateDomainRequest. Accepted fields:
    • "openTracking" (boolean, optional) — Emit an event for each recipient opens an email their email client
    • "clickTracking" (boolean, optional) — Emit an event for each time the recipient clicks a link in the email
    • "sending" (boolean, optional) — Enable or disable sending
    • "receiving" (boolean, optional) — Enable or disable receiving
  • opts — Optional keyword list passed to Req for this request.

Example

client = Nuntly.new(api_key: "ntly_...")

Nuntly.Domains.update_domain(
  client,
  "id",
  %{
    "openTracking" => true
  }
)