AddClientLinks Service Operation


Initiates the client link process to manage the account of another customer. Sends an invitation from an agency to a potential client. For more information about the client link lifecycle, see Link to Client Accounts.

System_CAPS_ICON_note.jpg Note

The client account must have a valid payment instrument set up for post-pay billing. Prepaid accounts are not supported for management by agencies.

Only an agency may call this service operation. For more information about becoming an agency, see the Resources for agency partners.

The role of the user calling this operation must be Super Admin. For more information, see User Roles and Available Service Operations.

There is no set limit to the amount of client accounts that can be linked to an agency.

System_CAPS_ICON_note.jpg Note

This feature is not supported in sandbox.

Request | Response

Error Codes

Service: CustomerManagementService.svc v11 | Namespace:

Request Body

The AddClientLinksRequest object defines the elements of the request’s body. The elements must be in the same order as shown in the SOAP Request SOAP.

ElementDescriptionData Type
ClientLinksThe list of client links to add.

You should limit your request to 10 client links per call.
ClientLink array

Request Headers

Set the required header elements for each service request. New customers are required to sign up for Bing Ads with a Microsoft Account, and to manage those accounts you must use OAuth. Existing users with legacy Bing Ads credentials may continue to specify the UserName and Password header elements. In future versions of the API, Bing Ads will transition exclusively to Microsoft Account authentication. For more information, see Getting Started With the Bing Ads API.

OAuth Authentication

These request headers are required for Authentication with OAuth.

ElementDescriptionData Type
AuthenticationTokenThe OAuth access token that represents a Microsoft Account user who has permissions to Bing Ads accounts.string
DeveloperTokenThe developer token used to access the Bing Ads API.string

Password Authentication

These request headers are required for legacy username and password authentication.

ElementDescriptionData Type
DeveloperTokenThe developer token used to access the Bing Ads API.string
PasswordThe Bing Ads user's sign-in password.string
UserNameThe Bing Ads user's sign-in user name. You must not set this element to a Microsoft account or email address. To authenticate a Microsoft account, use the AuthenticationToken header instead of UserName and Password.string

Request SOAP

The following example shows the complete request envelope.

<s:Envelope xmlns:i="" xmlns:s="">
  <s:Header xmlns="">
    <Action mustUnderstand="1">AddClientLinks</Action>
    <ApplicationToken i:nil="false"></ApplicationToken>
    <AuthenticationToken i:nil="false"></AuthenticationToken>
    <DeveloperToken i:nil="false"></DeveloperToken>
    <Password i:nil="false"></Password>
    <UserName i:nil="false"></UserName>
    <AddClientLinksRequest xmlns="">
      <ClientLinks xmlns:e3="" i:nil="false">
          <e3:ClientAccountId i:nil="false"></e3:ClientAccountId>
          <e3:ClientAccountNumber i:nil="false"></e3:ClientAccountNumber>
          <e3:ManagingCustomerId i:nil="false"></e3:ManagingCustomerId>
          <e3:ManagingCustomerNumber i:nil="false"></e3:ManagingCustomerNumber>
          <e3:Note i:nil="false"></e3:Note>
          <e3:Name i:nil="false"></e3:Name>
          <e3:InviterEmail i:nil="false"></e3:InviterEmail>
          <e3:InviterName i:nil="false"></e3:InviterName>
          <e3:InviterPhone i:nil="false"></e3:InviterPhone>
          <e3:StartDate i:nil="false"></e3:StartDate>
          <e3:Status i:nil="false"></e3:Status>
          <e3:Timestamp i:nil="false"></e3:Timestamp>
          <ForwardCompatibilityMap xmlns:e4="" i:nil="false">
              <e4:key i:nil="false"></e4:key>
              <e4:value i:nil="false"></e4:value>

Response Body

ElementDescriptionData Type
OperationErrorsA list of one or more reasons why the service operation failed, and no client links were added.OperationError array
PartialErrorsAn array of OperationError lists that contain details for any client links that were not successfully added.

Results are returned in the same order corresponding to the requested client links. The number of first dimension list elements is equal to the requested client links count. For successfully added client links, the OperationError element at the corresponding index is null.
OperationError [][]

Response Header

ElementDescriptionData Type
TrackingIdThe identifier of the log entry that contains the details of the API call.string

Response SOAP

The following example shows the complete response envelope.

<s:Envelope xmlns:s="">
  <s:Header xmlns="">
    <TrackingId p4:nil="false" xmlns:p4=""></TrackingId>
    <AddClientLinksResponse xmlns="">
      <OperationErrors xmlns:e5="" p5:nil="false" xmlns:p5="">
          <e5:Details p5:nil="false"></e5:Details>
          <e5:Message p5:nil="false"></e5:Message>
      <PartialErrors xmlns:e6="" p5:nil="false" xmlns:p5="">
            <e6:Details p5:nil="false"></e6:Details>
            <e6:Message p5:nil="false"></e6:Message>

If the service operation fails, it throws a FaultException, which contains one or more of the Bing Ads API error data objects. For information about the fault detail objects, see Customer Management Error Data Objects and Handling Service Errors and Exceptions.The following are example error codes that the error objects can include when using this service operation. For all documented error codes, please see Bing Ads Operation Error Codes.

Error Code