Generated from Postwind commit a19b2e4 OpenAPI 0.1.0 synced

Domains HTTP API

PATCH/api/v1/projects/{project_id}/domains/{domain_id}

update_sending_domain

Changes a sending domain’s ip_pool, tracking_host or dns_provider.

Call it
to move a domain to another IP pool or tracking host, or to switch its DNS provider.
Needs
an admin key with project_id, or a project key with scope write (its own project; the argument is ignored), and the domain’s id; an ip_pool must be a pool of the node. A changed ip_pool or tracking_host moves the domain back to pending and the result carries the new required_records; a changed dns_provider does not.
Returns
the domain and required_records (null unless it went back to pending). The same as PATCH /api/v1/projects/{project_id}/domains/{domain_id}.

Arguments

  • object
  • domain_idstring · uuidrequired

    The domain’s id.

  • dns_providerstring

    Who applies the records: porkbun or manual; leave it out to keep it.

    example manual

  • ip_poolstring

    The IP pool to send from (get_server_info lists them); leave it out to keep it. Changing it moves the domain to pending.

    example default

  • project_idstring · uuid | null

    The domain’s project. An admin key must pass it; a project key’s own project is used and this is ignored.

  • tracking_hoststring | null

    A host for tracking and unsubscribe links; null clears it, leave it out to keep it. Changing it moves the domain to pending.

No other arguments are accepted.

Result

The result comes back as structuredContent, with the same JSON as a text block.

  • object · all fields required
  • bounce_subdomainstring
  • checksarray of DomainCheck

    One entry per check that ran, in the canonical order; empty until the domain is first verified.

    3 fields
    • DomainCheck object · all fields required
    • detailstring | null

      What was found instead of what was expected; null when ok.

    • namestring

      spf_bounce, mx_bounce, dkim, dmarc, tracking_cname, tracking_tls or ptr.

    • How one verification check came out.

      ok The required record is present and matches.

      missing No record of this kind is in DNS yet.

      mismatch A record is there, but not the one Postwind needs.

      warning Not ok, but it does not fail the domain (ptr).

  • created_atstring · date-time
  • dkim_public_keystring

    The DKIM public key: base64 of its DER SubjectPublicKeyInfo, the p= of the DKIM record.

  • dkim_selectorstring
  • dns_providerDnsProviderOutput

    Who applies a domain’s DNS records.

    porkbun Porkbun’s API.

    manual Nobody: the records are for entry by hand.

  • domainstring

    In punycode for an international name.

  • idstring · uuid
  • ip_poolstring
  • last_checked_atstring · date-time | null

    When the records were last checked; null until then.

  • project_idstring · uuid
  • required_recordsarray of RequiredRecord | null

    The records to create after an ip_pool or tracking_host change; null otherwise.

    6 fields
    • RequiredRecord object · all fields required
    • contentstring

      The whole value.

    • create_only_if_absentboolean

      Create it only if the name has no record of this type, and never change one that is there (the DMARC record).

    • namestring

      The owner name, without a trailing dot.

    • priorityinteger · uint16 | null

      The MX priority; null for other types.

      0–65535

    • What a required record is for.

      spf_bounce SPF of the bounce subdomain.

      mx_bounce MX of the bounce subdomain.

      dkim The DKIM public key.

      dmarc The DMARC policy.

      tracking_cname The tracking host’s CNAME.

    • The type of a DNS record.

      • txt
      • mx
      • cname
  • Where a sending domain stands.

    pending Its records are not checked yet, or changed since.

    verified Every required record checked out.

    failed A required record is missing or wrong.

  • tracking_hoststring | null

    null: none.

  • updated_atstring · date-time

Definitions

CheckStatusOutput

How one verification check came out.

string · enum

ok The required record is present and matches.

missing No record of this kind is in DNS yet.

mismatch A record is there, but not the one Postwind needs.

warning Not ok, but it does not fail the domain (ptr).

DnsProviderOutput

Who applies a domain’s DNS records.

string · enum

porkbun Porkbun’s API.

manual Nobody: the records are for entry by hand.

DomainCheck

One verification check.

  • object · all fields required
  • detailstring | null

    What was found instead of what was expected; null when ok.

  • namestring

    spf_bounce, mx_bounce, dkim, dmarc, tracking_cname, tracking_tls or ptr.

  • How one verification check came out.

    ok The required record is present and matches.

    missing No record of this kind is in DNS yet.

    mismatch A record is there, but not the one Postwind needs.

    warning Not ok, but it does not fail the domain (ptr).

DomainStatusOutput

Where a sending domain stands.

string · enum

pending Its records are not checked yet, or changed since.

verified Every required record checked out.

failed A required record is missing or wrong.

RecordPurposeOutput

What a required record is for.

string · enum

spf_bounce SPF of the bounce subdomain.

mx_bounce MX of the bounce subdomain.

dkim The DKIM public key.

dmarc The DMARC policy.

tracking_cname The tracking host’s CNAME.

RecordTypeOutput

The type of a DNS record.

string · enum

  • txt
  • mx
  • cname

RequiredRecord

A DNS record a sending domain needs.

  • object · all fields required
  • contentstring

    The whole value.

  • create_only_if_absentboolean

    Create it only if the name has no record of this type, and never change one that is there (the DMARC record).

  • namestring

    The owner name, without a trailing dot.

  • priorityinteger · uint16 | null

    The MX priority; null for other types.

    0–65535

  • What a required record is for.

    spf_bounce SPF of the bounce subdomain.

    mx_bounce MX of the bounce subdomain.

    dkim The DKIM public key.

    dmarc The DMARC policy.

    tracking_cname The tracking host’s CNAME.

  • The type of a DNS record.

    • txt
    • mx
    • cname

Errors

A failed call answers isError: true with a code from the same table as the HTTP API, and detail. How tools report errors

HTTP API

The same operation over HTTP: PATCH /api/v1/projects/{project_id}/domains/{domain_id}