UpdateAccount v3.1

This API call is used to modify an account. It is available only Agency customers.

Prior Versions

  • none

Required Parameters

Parameter Description
Action CreateAccount
AccountId The MessageGears account id to which this item belongs.
ApiKey A secret key only known by you. Keep this key confidential.
Id The ID of the account to be updated

Optional Parameters

Parameter Description
Name Change the name of the account
AutoTrack Change the default value for all jobs sent through this account to “true” or “false”
UrlAppend Change the default string to be appended to all tracking links for this account
CustomTrackingDomain Change the default domain to be used for all tracking URLs (click, open, unsubscribe)

Programming Examples

Request

https://api.messagegears.net/3.1/WebService
?Action=UpdateAccount
&AccountId=123456789
&ApiKey=8bb6118f8fd6935ad0876a3be34a717d32708ffd
&Id=70916599
&Name=Quality Assurance Account

Response

<UpdateAccountResponse>
    <RequestId>e311-89fff13f-9866-4e5d-856f-7bd01cb612d3</RequestId>
    <Result>REQUEST_SUCCESSFUL</Result>
</UpdateAccountResponse>

Click here to see more details about using the MessageGears Java SDK
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package com.messagegears.examples;
 
import com.messagegears.sdk.MessageGearsClient;
import com.messagegears.sdk.MessageGearsProperties;
import com.messagegears.sdk.model.request.UpdateAccountRequest;
import com.messagegears.sdk.output.ScreenWriter;
import com.messagegears.sdk.v3_1.UpdateAccountResponse;
 
public class UpdateAccount {
    public static final String MY_EMAIL_ADDRESS = "place your email address here";
    public static final String MY_MESSAGEGEARS_ACCOUNT_ID = "place your MessageGears account id here";
    public static final String MY_MESSAGEGEARS_API_KEY = "place your MessageGears api key here";
 
    public static void main(String[] args) {
        // Update the properties object containing the necessary properties
        MessageGearsProperties properties = new MessageGearsProperties();
        properties.setMyMessageGearsAccountId(MY_MESSAGEGEARS_ACCOUNT_ID);
        properties.setMyMessageGearsApiKey(MY_MESSAGEGEARS_API_KEY);
 
        // Update the main client object
        MessageGearsClient client = new MessageGearsClient(properties);
 
        // Update a bulk campaign request
        UpdateAccountRequest request = new UpdateAccountRequest();
 
        // Set the URL where the recipient XML file can be retrieved
        request.setName("QA Account");
        
        // Set auto link tracking to true
        request.setAutoTrack(true);
        
        // Execute the request
        UpdateAccountResponse response = client.updateAccount(request);
 
        // Print the result (success or failure)
        ScreenWriter.printResponse(response);
    }
 
}
package com.messagegears.examples;

import com.messagegears.sdk.MessageGearsClient;
import com.messagegears.sdk.MessageGearsProperties;
import com.messagegears.sdk.model.request.UpdateAccountRequest;
import com.messagegears.sdk.output.ScreenWriter;
import com.messagegears.sdk.v3_1.UpdateAccountResponse;

public class UpdateAccount {
	public static final String MY_EMAIL_ADDRESS = "place your email address here";
	public static final String MY_MESSAGEGEARS_ACCOUNT_ID = "place your MessageGears account id here";
	public static final String MY_MESSAGEGEARS_API_KEY = "place your MessageGears api key here";

	public static void main(String[] args) {
		// Update the properties object containing the necessary properties
		MessageGearsProperties properties = new MessageGearsProperties();
		properties.setMyMessageGearsAccountId(MY_MESSAGEGEARS_ACCOUNT_ID);
		properties.setMyMessageGearsApiKey(MY_MESSAGEGEARS_API_KEY);

		// Update the main client object
		MessageGearsClient client = new MessageGearsClient(properties);

		// Update a bulk campaign request
		UpdateAccountRequest request = new UpdateAccountRequest();

		// Set the URL where the recipient XML file can be retrieved
		request.setName("QA Account");
		
		// Set auto link tracking to true
		request.setAutoTrack(true);
		
		// Execute the request
		UpdateAccountResponse response = client.updateAccount(request);

		// Print the result (success or failure)
		ScreenWriter.printResponse(response);
	}

}

Click here to see more details about using the MessageGears .Net SDK
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
using MessageGears;
using MessageGears.Model;
using MessageGears.Model.Generated;
 
namespace MessageGears.Sample
{
    public class UpdateAccountSample
    {
        // Replace this value with your email address
        public const String MY_EMAIL_ADDRESS = "place your email address here";
        public const String MY_MESSAGEGEARS_ACCOUNT_ID = "place your MessageGears account id here";
        public const String MY_MESSAGEGEARS_API_KEY = "place your MessageGears api key here";
 
        public static void Main ()
        {
            // Create the properties object containing the necessary properties
            MessageGearsProperties props = new MessageGearsProperties();
            props.MyMessageGearsAccountId = MY_MESSAGEGEARS_ACCOUNT_ID;
            props.MyMessageGearsApiKey = MY_MESSAGEGEARS_API_KEY;
 
            // Create the main client object
            MessageGearsClient client = new MessageGearsClient(props);
 
            // Create a bulk campaign request
            UpdateAccountRequest request = new UpdateAccountRequest();
 
            // Set the Account Name
            request.Name = "QA Account";
 
            // Set the default for Auto Tracking of links
            request.AutoTrack = false;
 
            // Execute the request
            UpdateAccountResponse response = client.UpdateAccount(request);
 
            // Print the result (success or failure)
            client.PrintResponse(response);
        }
    }
}
using System;
using MessageGears;
using MessageGears.Model;
using MessageGears.Model.Generated;
 
namespace MessageGears.Sample
{
    public class UpdateAccountSample
    {
        // Replace this value with your email address
        public const String MY_EMAIL_ADDRESS = "place your email address here";
        public const String MY_MESSAGEGEARS_ACCOUNT_ID = "place your MessageGears account id here";
        public const String MY_MESSAGEGEARS_API_KEY = "place your MessageGears api key here";
 
        public static void Main ()
        {
            // Create the properties object containing the necessary properties
            MessageGearsProperties props = new MessageGearsProperties();
            props.MyMessageGearsAccountId = MY_MESSAGEGEARS_ACCOUNT_ID;
            props.MyMessageGearsApiKey = MY_MESSAGEGEARS_API_KEY;
 
            // Create the main client object
            MessageGearsClient client = new MessageGearsClient(props);
 
            // Create a bulk campaign request
            UpdateAccountRequest request = new UpdateAccountRequest();
 
            // Set the Account Name
            request.Name = "QA Account";

			// Set the default for Auto Tracking of links
			request.AutoTrack = false;
 
            // Execute the request
            UpdateAccountResponse response = client.UpdateAccount(request);
 
            // Print the result (success or failure)
            client.PrintResponse(response);
        }
    }
}