« Back to Documentation Overview

set_campaign_domain

Section: Campaigns
Version: 1.5.0


Assign account domain to campaign. Assigned domain will be used in links in messages sent from this campaign.

Warning: Any messages sent from now on from this campaign will use this domain in links, even if message was scheduled before domain assignment.


Parameters
stringAPI_KEY
object
stringcampaignCAMPAIGN_ID
stringaccount_domainACCOUNT_DOMAIN_ID
Return Value
integerupdated1

Example Request JSON

[
    "API_KEY",
    {
        "campaign": "CAMPAIGN_ID",
        "account_domain": "ACCOUNT_DOMAIN_ID"
    }
]

Example Response JSON

{
    "updated": 1
}

Example Error Response JSON

{
    "code": -1,
    "message": "Missing account domain"
}
Method-specific Errors
Missing campaign
Missing account domain
API-wide Errors
API key verification failed API key verification failed
API client IP not allowed API client IP not allowed
Invalid params Attribute params must be reference to hash