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

Update domain

Update a domain limit and credits if you have a multisite license only

For multisite license only

 curl https://api.acymailer.com/api/domains/{domain-id} \
 -X PATCH \
 -H 'Content-Type: application/merge-patch+json' \
 -H 'API-KEY: your-license-key' \
 -H 'Version: external' \
 -d '{"isLimited": true,"creditsAllowed": 10000}'
<?php
  
$acymailer = new AcyMailer\SendingService('your-license-key');

$acymailer->updateDomain(2009, true, 10000);
import {AcyMailer} from '@acymailing/sending-service';

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

const domain = {
    id: 2009,
    isLimited: true,
    creditsAllowed: 100000
};

await mailer.updateDomain(domain);

POST /api/domains/{domain-id}

This endpoint allows you to update the domain limit and credits

Headers

Name
Value

Content-Type

application/merge-patch+json

API-KEY

<license-key>

Version

Must be "external"

Body

{
    "isLimited": true,
    "creditsAllowed": 10000
}
  • isLimited to limit your domain when sending emails, if you set false the limit of credits will be your license

  • creditsAllowed are the credits allowed to the domain if isLimited is set to true, if isLimited is set to false this parameters is not taken into account

Response

NULL
{
  "message": "You are not allowed to update this domain"
}

{
  "message": "You must provide isLimited and creditsAllowed"
}
{
  "message": "Not found"
}
PreviousRegister new domainNextDelete domain

Last updated 1 year ago