Skip to content

Verify the sending domain

API v2 is in public beta: endpoints and fields can change before general availability. See the changelog

POST/account/sending/verify_domain

Costs 2 rate-limit points · Rate limits

Check the domain of the merchant's own sending address (sender_address) now, with Amazon SES and with a DNS lookup of each record SES expects, and return where it stands: the same sender_domain object GET /account/sending returns, checked fresh.

status: verified | pending (SES has not seen the records yet, or is re-checking) | failed (SES gave up looking) | not_started (SES has no check for the domain) | not_set (use_custom_email_address is off, or the address is STOQ's or on a free mail domain) | error (SES did not answer). records lists each CNAME to add: host, expected value, the value DNS holds now (found) and status ok | missing | wrong_value | lookup_failed. next_step: add_records | fix_records | wait_for_ses | restart_verification | none. in_use is true when the domain is verified and the plan allows a custom sender. This call registers the domain with SES the first time (not_started) and restarts a failed check once the records are right, then answers with the status after that. The answer is saved, so custom_address_status follows it at once. DNS changes can take up to 72 hours to reach SES.

Also searched asverify sending domaincheck dkimdkim recordsis my email domain verifiedrestart domain verificationwhich dns record is missing

Headers

  • Idempotency-Keystring

    A fresh unique key for every write (a new UUID, say); reuse it only to retry that write. Keys are remembered for 1 hour: the same key and the same request within that hour returns the first result, with Idempotent-Replayed: true, without running again; the same key with a different method, path or body is refused (422 idempotency_key_reused); a retry while the first is still running gets 409 idempotency_key_in_progress. Keys are per store. Server errors and rate limits are not kept, so their retry runs.

Returns

  • domainstring
    Example: stridesupply.com
  • dkim_verifiedboolean
    Example: false
  • dkim_enabledboolean
    Example: false
  • dns_recordsarray of objects
    Show 3 child attributesHide child attributes
    • namestring
      Example: exampletoken1aaaabbbbccccdddd._domainkey.stridesupply.com
    • typestring
      Example: CNAME
    • valuestring
      Example: exampletoken1aaaabbbbccccdddd.dkim.amazonses.com

Errors

409
idempotency_key_in_progress

An earlier request with the same Idempotency-Key is still running. Wait, then resend the same request with the same key.

422
invalid_params

One or more fields failed the action's schema.

422
validation_failed

The request failed validation.

Any request can also fail with auth_invalid (401) or rate_limited (429).

Every error has the same shape: see Errors and the list of error codes.

POST/account/sending/verify_domain
curl -X POST "https://app.stoqapp.com/api/v2/external/account/sending/verify_domain" \
  -H "X-Auth-Token: $STOQ_API_KEY"
Response
{
  "domain": "stridesupply.com",
  "dkim_verified": false,
  "dkim_enabled": false,
  "dns_records": [
    {
      "name": "exampletoken1aaaabbbbccccdddd._domainkey.stridesupply.com",
      "type": "CNAME",
      "value": "exampletoken1aaaabbbbccccdddd.dkim.amazonses.com"
    },
    {
      "name": "exampletoken2eeeeffffgggghhhh._domainkey.stridesupply.com",
      "type": "CNAME",
      "value": "exampletoken2eeeeffffgggghhhh.dkim.amazonses.com"
    }
  ]
}