AcyMailing
Our siteForumBlog
Sending service
Sending service
  • Quick Start
  • SDKs installation
  • License information
  • Domains
    • Register new domain
    • Update domain
    • Delete domain
  • Send email
Powered by GitBook
On this page
  1. Domains

Register new domain

curl https://api.acymailer.com/api/createDomainIdentity \
 -X POST
 -H 'Content-Type: application/json' \
 -H 'API-KEY: your-license-key' \
 -H 'Version: external' \
 -d '{"domain": "example.com","siteUrl": "https://example.com"}'
<?php
  
$acymailer = new AcyMailer\SendingService('your-license-key');

$domain = $acymailer->addDomain('example.com');
import {AcyMailer} from '@acymailing/sending-service';

const mailer = new AcyMailer('your-license-key');

const domain = await mailer.addDomain({name: 'example.com'});

POST /api/createDomainIdentity

This endpoint allows you to register a new domain identity to send email with

Headers

Name
Value

Content-Type

application/json

API-KEY

<license-key>

Version

Must be "external"

Body

{
    "domain": "example.com",
    "siteUrl": "https://example.com"
}
  • domain must be your root domain, if you register a subdomain it won't work.

  • siteUrl must be https://<your-domain>, even if you don't have a website at this address

Response

{
  "code": 9,
  "message": "Identity created",
  "cnameRecords": [
    {
      "name": "2qsv5cnrrzscxcz2otmdlgnkxu3f7wpv._domainkey.example.com",
      "type": "CNAME",
      "value": "2qsv5cnrrzscxcz2otmdlgnkxu3f7wpv.dkim.acymailer.com"
    },
    {
      "name": "4rngy5xnrec3qmwotcr6p7whqi7ig46z._domainkey.example.com",
      "type": "CNAME",
      "value": "4rngy5xnrec3qmwotcr6p7whqi7ig46z.dkim.acymailer.com"
    },
    {
      "name": "tokt23mkvo5cqtgk3vgpmdy6toscp4uh._domainkey.example.com",
      "type": "CNAME",
      "value": "tokt23mkvo5cqtgk3vgpmdy6toscp4uh.dkim.acymailer.com"
    }
  ]
}
{
  "code": 9,
  "message": "Identity created",
  "cnameRecords": [
    {
      "name": "2qsv5cnrrzscxcz2otmdlgnkxu3f7wpv._domainkey.example.com",
      "type": "CNAME",
      "value": "2qsv5cnrrzscxcz2otmdlgnkxu3f7wpv.dkim.acymailer.com"
    },
    {
      "name": "4rngy5xnrec3qmwotcr6p7whqi7ig46z._domainkey.example.com",
      "type": "CNAME",
      "value": "4rngy5xnrec3qmwotcr6p7whqi7ig46z.dkim.acymailer.com"
    },
    {
      "name": "tokt23mkvo5cqtgk3vgpmdy6toscp4uh._domainkey.example.com",
      "type": "CNAME",
      "value": "tokt23mkvo5cqtgk3vgpmdy6toscp4uh.dkim.acymailer.com"
    }
  ]
}
{
    "code": 19,
    "message": "License not found for this API key"
}
{
    "code": 17,
    "message": "Missing arguments"
}
{
    "code": 11,
    "message": "The domain already exists and it doesn\'t belong to you."
}
{
    "code": 27,
    "message": "You can attach a domain to only one of your licenses."
}
{
    "code": 0,
    "message": "The domain is not valid"
}

{
    "code": 25,
    "message": "An error occurred, see details in the sending service logs file in the configuration"
    "logs": "Message error"
}
PreviousDomainsNextUpdate domain

Last updated 1 year ago